메소드 | 설명 | |
---|---|---|
Claim ( long sequence ) : void |
Claim a specific sequence when only one publisher is involved.
|
|
GetHighestPublishedSequence ( long nextSequence, long availableSequence ) : long |
Get the highest sequence number that can be safely read from the ring buffer. Depending on the implementation of the Sequencer this call may need to scan a number of values in the Sequencer. The scan will range from nextSequence to availableSequence. If there are no available values
|
|
GetRemainingCapacity ( ) : long |
Get the remaining capacity for this sequencer. return The number of slots remaining.
|
|
HasAvailableCapacity ( int requiredCapacity ) : bool |
Has the buffer got capacity to allocate another sequence. This is a concurrent method so the response should only be taken as an indication of available capacity.
|
|
IsAvailable ( long sequence ) : bool |
Confirms if a sequence is published and the event is available for use; non-blocking.
|
|
Next ( ) : long |
Claim the next event in sequence for publishing.
|
|
Next ( int n ) : long |
Claim the next n events in sequence for publishing. This is for batch event producing. Using batch producing requires a little care and some math.
|
|
Publish ( long sequence ) : void |
Publish an event and make it visible to IEventProcessors
|
|
Publish ( long lo, long hi ) : void |
Batch publish sequences. Called when all of the events have been filled.
|
|
SingleProducerSequencer ( int bufferSize, IWaitStrategy waitStrategy ) : System | ||
TryNext ( ) : long |
Attempt to claim the next event in sequence for publishing. Will return the number of the slot if there is at least
|
|
TryNext ( int n ) : long |
Attempt to claim the next event in sequence for publishing. Will return the number of the slot if there is at least slots available.
|
public GetHighestPublishedSequence ( long nextSequence, long availableSequence ) : long | ||
nextSequence | long | The sequence to start scanning from. |
availableSequence | long | The sequence to scan to. |
리턴 | long |
public HasAvailableCapacity ( int requiredCapacity ) : bool | ||
requiredCapacity | int | requiredCapacity in the buffer |
리턴 | bool |
public IsAvailable ( long sequence ) : bool | ||
sequence | long | sequence of the buffer to check |
리턴 | bool |
public Publish ( long sequence ) : void | ||
sequence | long | sequence to be published |
리턴 | void |
public Publish ( long lo, long hi ) : void | ||
lo | long | first sequence number to publish |
hi | long | last sequence number to publish |
리턴 | void |
public SingleProducerSequencer ( int bufferSize, IWaitStrategy waitStrategy ) : System | ||
bufferSize | int | |
waitStrategy | IWaitStrategy | |
리턴 | System |