Package org.jctools.channels
Interface ChannelProducer<E>
- Type Parameters:
E
- element type
- All Known Implementing Classes:
MpscChannelProducer
,SpscChannelProducer
public interface ChannelProducer<E>
A producer used by a single thread for writing into a channel.
-
Method Details
-
claim
boolean claim()Attempt to claim the next element in the channel.- Returns:
- true if claimed, false if there is insufficient space in the channel.
-
currentElement
E currentElement()Gets the flyweight to write via.- Returns:
- the flyweight object to write to
-
commit
boolean commit()- Returns:
- true if
-