Package org.ojalgo.type.function
Class QueuedConsumer<T>
java.lang.Object
org.ojalgo.type.function.QueuedConsumer<T>
- All Implemented Interfaces:
AutoCloseable
,Consumer<T>
,AutoConsumer<T>
,AutoFunctional
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private final int
private final Future<?>[]
private final BlockingQueue
<T> Fields inherited from interface org.ojalgo.type.function.AutoConsumer
NULL
-
Constructor Summary
ConstructorsConstructorDescriptionQueuedConsumer
(ExecutorService executor, BlockingQueue<T> queue, Consumer<T>... consumers) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
(package private) int
(package private) boolean
void
Write the item to the consumer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ojalgo.type.function.AutoConsumer
accept, writeBatch
-
Field Details
-
myActive
private volatile boolean myActive -
myBatchSize
private final int myBatchSize -
myConsumers
-
myFutures
-
myQueue
-
-
Constructor Details
-
QueuedConsumer
QueuedConsumer(ExecutorService executor, BlockingQueue<T> queue, Consumer<T>... consumers)
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceAutoConsumer<T>
- Throws:
Exception
-
write
Description copied from interface:AutoConsumer
Write the item to the consumer.- Specified by:
write
in interfaceAutoConsumer<T>
- Parameters:
item
- The item to be written
-
drainTo
-
isMoreToCome
boolean isMoreToCome() -
newBatchContainer
-