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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
claim()
Attempt to claim the next element in the channel.boolean
commit()
E
currentElement()
Gets the flyweight to write via.
-
-
-
Method Detail
-
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
-
-