Package org.ojalgo.netio
Class QueuedWriter<T>
java.lang.Object
org.ojalgo.netio.QueuedWriter<T>
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ToFileWriter<T>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.ojalgo.netio.ToFileWriter
ToFileWriter.Builder<F>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private final int
private final Future<?>[]
private final BlockingQueue
<T> private final ToFileWriter<T>[]
Fields inherited from interface org.ojalgo.netio.ToFileWriter
NULL
-
Constructor Summary
ConstructorsConstructorDescriptionQueuedWriter
(ExecutorService executor, BlockingQueue<T> queue, ToFileWriter<T>... writers) -
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.netio.ToFileWriter
writeBatch
-
Field Details
-
myActive
private volatile boolean myActive -
myBatchSize
private final int myBatchSize -
myWriters
-
myFutures
-
myQueue
-
-
Constructor Details
-
QueuedWriter
QueuedWriter(ExecutorService executor, BlockingQueue<T> queue, ToFileWriter<T>... writers)
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceToFileWriter<T>
- Throws:
IOException
-
write
Description copied from interface:ToFileWriter
Write the item to the consumer.- Specified by:
write
in interfaceToFileWriter<T>
- Parameters:
item
- The item to be written
-
drainTo
-
isMoreToCome
boolean isMoreToCome() -
newBatchContainer
-