|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.lmax.disruptor.Sequencer
com.lmax.disruptor.RingBuffer<T>
T - implementation storing the data for sharing during exchange or parallel coordination of an event.public final class RingBuffer<T>
Ring based store of reusable entries containing the data representing an event being exchanged between event publisher and EventProcessors.
| Field Summary |
|---|
| Fields inherited from class com.lmax.disruptor.Sequencer |
|---|
INITIAL_CURSOR_VALUE |
| Constructor Summary | |
|---|---|
RingBuffer(EventFactory<T> eventFactory,
ClaimStrategy claimStrategy,
WaitStrategy waitStrategy)
Construct a RingBuffer with the full option set. |
|
RingBuffer(EventFactory<T> eventFactory,
int bufferSize)
Construct a RingBuffer with default strategies of: MultiThreadedClaimStrategy and BlockingWaitStrategy |
|
| Method Summary | |
|---|---|
T |
get(long sequence)
Get the event for a given sequence in the RingBuffer. |
| Methods inherited from class com.lmax.disruptor.Sequencer |
|---|
claim, forcePublish, getBufferSize, getCursor, hasAvailableCapacity, newBarrier, newBatchDescriptor, next, next, publish, publish, remainingCapacity, setGatingSequences, tryNext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RingBuffer(EventFactory<T> eventFactory,
ClaimStrategy claimStrategy,
WaitStrategy waitStrategy)
eventFactory - to newInstance entries for filling the RingBufferclaimStrategy - threading strategy for publisher claiming entries in the ring.waitStrategy - waiting strategy employed by processorsToTrack waiting on entries becoming available.
java.lang.IllegalArgumentException - if bufferSize is not a power of 2
public RingBuffer(EventFactory<T> eventFactory,
int bufferSize)
MultiThreadedClaimStrategy and BlockingWaitStrategy
eventFactory - to newInstance entries for filling the RingBufferbufferSize - of the RingBuffer that will be rounded up to the next power of 2| Method Detail |
|---|
public T get(long sequence)
sequence - for the event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||