T - the type of entries stored in the bufferC - the type of consumerpublic final class RepositoryRingBufferBuilder<T,C> extends RingBufferBuilder<T,C>
RingBufferBuilder which adds functionality required by the repository.RingBufferBuilderDEFAULT_BUFFER_SIZE, DEFAULT_GARBAGE_COLLECT_ENTITIES, DEFAULT_NAME| Modifier | Constructor and Description |
|---|---|
protected |
RepositoryRingBufferBuilder(Executor executor,
RingBuffer.ConsumerAdapter<T,C> adapter,
RepositoryStatistics statistics) |
| Modifier and Type | Method and Description |
|---|---|
protected Cursor |
defaultCursor(int bufferSize,
WaitStrategy waitStrategy) |
static <T,C> RingBufferBuilder<T,C> |
withMultipleProducers(Executor executor,
RingBuffer.ConsumerAdapter<T,C> adapter,
RepositoryStatistics statistics)
Create a builder for ring buffers that use the supplied
Executor to create consumer threads and the supplied
RingBuffer.ConsumerAdapter to adapt to custom consumer implementations. |
build, defaultWaitStrategy, garbageCollect, multipleProducers, named, ofSize, singleProducer, waitUsing, withMultipleProducers, withMultipleProducers, withSingleProducer, withSingleProducerprotected RepositoryRingBufferBuilder(Executor executor, RingBuffer.ConsumerAdapter<T,C> adapter, RepositoryStatistics statistics)
public static <T,C> RingBufferBuilder<T,C> withMultipleProducers(Executor executor, RingBuffer.ConsumerAdapter<T,C> adapter, RepositoryStatistics statistics)
Executor to create consumer threads and the supplied
RingBuffer.ConsumerAdapter to adapt to custom consumer implementations. The ring buffer will allow entries to be added from
multiple threads.executor - the executor that should be used to create threads to run consumers; may not be nulladapter - the adapter to the desired consumer interface; may not be nullstatistics - a RepositoryStatistics instance; may be null.RingBufferBuilder.withMultipleProducers(Executor, RingBuffer.ConsumerAdapter)protected Cursor defaultCursor(int bufferSize, WaitStrategy waitStrategy)
defaultCursor in class RingBufferBuilder<T,C>Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.