public Cache getOverflowCache() {
return overflowCache;
}
public void initialize() {
Disruptor disruptor = new Disruptor<MessageEvent>(
MessageEvent.EVENT_FACTORY,
configuration.getRingSize(),
executor,
ProducerType.MULTI,
configuration.getProcessorWaitStrategy()
);
LOG.info("Initialized OutputBuffer with ring size <{}> "
+ "and wait strategy <{}>.", configuration.getRingSize(),
configuration.getProcessorWaitStrategy().getClass().getSimpleName());
int outputBufferProcessorCount = configuration.getOutputBufferProcessors();
OutputBufferProcessor[] processors = new OutputBufferProcessor[outputBufferProcessorCount];
for (int i = 0; i < outputBufferProcessorCount; i++) {
processors[i] = outputBufferProcessorFactory.create(i, outputBufferProcessorCount);
}
disruptor.handleEventsWith(processors);
ringBuffer = disruptor.start();
}