Start making types more general.

This commit is contained in:
Deklan Dieterly 2014-02-25 08:31:55 -07:00
parent a5cd98156b
commit 382ccfee5c
1 changed files with 3 additions and 4 deletions

View File

@ -5,7 +5,6 @@ import com.google.inject.Provider;
import com.hpcloud.configuration.MonPersisterConfiguration;
import com.hpcloud.event.StringEvent;
import com.hpcloud.event.StringEventFactory;
import com.hpcloud.event.StringEventHandler;
import com.hpcloud.event.StringEventHandlerFactory;
import com.lmax.disruptor.EventHandler;
import com.lmax.disruptor.ExceptionHandler;
@ -54,15 +53,15 @@ public class DisruptorProvider implements Provider<Disruptor> {
int numOutputProcessors = configuration.getDisruptorConfiguration().getNumProcessors();
logger.debug("Number of output processors [" + numOutputProcessors + "]");
EventHandler[] stringEventHandlers = new StringEventHandler[numOutputProcessors];
EventHandler[] eventHandlers = new EventHandler[numOutputProcessors];
for (int i = 0; i < numOutputProcessors; ++i) {
stringEventHandlers[i] = stringEventHandlerFactory.create(i, numOutputProcessors, batchSize);
eventHandlers[i] = stringEventHandlerFactory.create(i, numOutputProcessors, batchSize);
}
disruptor.handleEventsWith(stringEventHandlers);
disruptor.handleEventsWith(eventHandlers);
disruptor.start();
logger.debug("Instance of disruptor successfully started");