Package io.deephaven.base.queue
Class ProducerConsumerWithTake<T>
java.lang.Object
io.deephaven.base.queue.ProducerConsumerWithTake<T>
- All Implemented Interfaces:
ProducerConsumer<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.base.queue.ProducerConsumer
ProducerConsumer.MultiConsumer<T>, ProducerConsumer.MultiProducer<T>, ProducerConsumer.MultiProducerConsumer<T>, ProducerConsumer.SingleProducerConsumer<T>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconsume()
This method should never block (but it may spin for a finite amount of time) Returns null when there is nothing to consume [may create new objects on the fly if necessary]boolean
This method should never block (but it may spin for a finite amount of time) Returns true when t was successfully produced, else falseint
size()
take()
-
Constructor Details
-
ProducerConsumerWithTake
-
-
Method Details
-
produce
Description copied from interface:ProducerConsumer
This method should never block (but it may spin for a finite amount of time) Returns true when t was successfully produced, else false- Specified by:
produce
in interfaceProducerConsumer<T>
-
consume
Description copied from interface:ProducerConsumer
This method should never block (but it may spin for a finite amount of time) Returns null when there is nothing to consume [may create new objects on the fly if necessary]- Specified by:
consume
in interfaceProducerConsumer<T>
-
take
-
size
public int size()
-