Package org.jctools.channels.spsc
Class SpscChannelProducer<E>
java.lang.Object
org.jctools.channels.proxy.ProxyChannelRingBuffer
org.jctools.channels.OffHeapFixedMessageSizeRingBuffer
org.jctools.channels.spsc.SpscOffHeapFixedSizeRingBuffer
org.jctools.channels.spsc.SpscChannelProducer<E>
- Type Parameters:
E
- element type.
- All Implemented Interfaces:
ChannelProducer<E>
public abstract class SpscChannelProducer<E>
extends SpscOffHeapFixedSizeRingBuffer
implements ChannelProducer<E>
Package Scoped: not part of public API.
-
Field Summary
FieldsFields inherited from class org.jctools.channels.spsc.SpscOffHeapFixedSizeRingBuffer
EOF
Fields inherited from class org.jctools.channels.OffHeapFixedMessageSizeRingBuffer
bufferAddress, consumerIndexAddress, HEADER_SIZE, mask, MESSAGE_INDICATOR_SIZE, messageSize, producerIndexAddress, READ_ACQUIRE_INDICATOR, READ_RELEASE_INDICATOR, referenceMessageSize, references, WRITE_ACQUIRE_INDICATOR, WRITE_RELEASE_INDICATOR
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.jctools.channels.spsc.SpscOffHeapFixedSizeRingBuffer
getLookaheadStep, readAcquire, readRelease, writeAcquire, writeRelease, writeRelease
Methods inherited from class org.jctools.channels.OffHeapFixedMessageSizeRingBuffer
arrayIndexForCursor, arrayIndexForCursor, capacity, consumerReferenceArrayIndex, createReferenceArray, getRequiredArraySize, getRequiredBufferSize, isEmpty, isReadReleased, lpConsumerIndex, lpProducerIndex, lvConsumerIndex, lvProducerIndex, offsetForIndex, offsetForIndex, producerReferenceArrayIndex, readAcquireState, readReference, readReleaseState, relativeIndexForOffset, relativeIndexForOffset, size, soConsumerIndex, soProducerIndex, writeAcquireState, writeReference, writeReleaseState
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jctools.channels.ChannelProducer
currentElement
-
Field Details
-
pointer
protected long pointer
-
-
Constructor Details
-
SpscChannelProducer
-
-
Method Details
-
claim
public final boolean claim()Description copied from interface:ChannelProducer
Attempt to claim the next element in the channel.- Specified by:
claim
in interfaceChannelProducer<E>
- Returns:
- true if claimed, false if there is insufficient space in the channel.
-
commit
public final boolean commit()- Specified by:
commit
in interfaceChannelProducer<E>
- Returns:
- true if
-