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 ToFileWriter
ToFileWriter.Builder<F> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate final intprivate final Future<?>[]private final BlockingQueue<T> private final ToFileWriter<T>[]Fields inherited from interface ToFileWriter
NULL -
Constructor Summary
ConstructorsConstructorDescriptionQueuedWriter(ExecutorService executor, BlockingQueue<T> queue, ToFileWriter<T>... writers) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()(package private) int(package private) booleanvoidWrite the item to the consumer.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceToFileWriter<T>- Throws:
IOException
-
write
Description copied from interface:ToFileWriterWrite the item to the consumer.- Specified by:
writein interfaceToFileWriter<T>- Parameters:
item- The item to be written
-
drainTo
-
isMoreToCome
boolean isMoreToCome() -
newBatchContainer
-