- java.lang.Object
-
- org.ojalgo.data.batch.BatchManager
-
public final class BatchManager extends java.lang.ObjectWhen you're going to instantiate multipleBatchNode:s and you want them to share some properties, this is a convenient alternative. Just create aBatchManager, configure it, and use it to create theBatchNode.Builder:s usingnewNodeBuilder(String, DataInterpreter).
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.FilemyBatchRootDirectoryprivate java.util.concurrent.ExecutorServicemyExecutorprivate java.lang.IntegermyFragmentationprivate booleanmyManagedprivate java.util.function.IntSuppliermyParallelismprivate java.lang.IntegermyQueueCapacity
-
Constructor Summary
Constructors Constructor Description BatchManager(java.io.File batchRootDirectory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Dispose of all files associated with nodes instantiated from this manager.BatchManagerexecutor(java.util.concurrent.ExecutorService executor)BatchManagerfragmentation(int fragmentation)BatchManagermanaged(boolean managed)<T> BatchNode.Builder<T>newNodeBuilder(java.lang.String nodeName, DataInterpreter<T> dataInterpreter)BatchManagerparallelism(int parallelism)BatchManagerparallelism(java.util.function.IntSupplier parallelism)BatchManagerqueue(int capacity)
-
-
-
Field Detail
-
myBatchRootDirectory
private final java.io.File myBatchRootDirectory
-
myExecutor
private java.util.concurrent.ExecutorService myExecutor
-
myFragmentation
private java.lang.Integer myFragmentation
-
myManaged
private boolean myManaged
-
myParallelism
private java.util.function.IntSupplier myParallelism
-
myQueueCapacity
private java.lang.Integer myQueueCapacity
-
-
Method Detail
-
dispose
public void dispose()
Dispose of all files associated with nodes instantiated from this manager. It's recommended that you callBatchNode.dispose()on the individual nodes as you're done with them. This is just a convenient alternative to dispose of multiple (all) nodes simultaneously.- See Also:
BatchNode.dispose()
-
executor
public BatchManager executor(java.util.concurrent.ExecutorService executor)
-
fragmentation
public BatchManager fragmentation(int fragmentation)
- See Also:
BatchNode.Builder.fragmentation(int)
-
managed
public BatchManager managed(boolean managed)
-
newNodeBuilder
public <T> BatchNode.Builder<T> newNodeBuilder(java.lang.String nodeName, DataInterpreter<T> dataInterpreter)
-
parallelism
public BatchManager parallelism(int parallelism)
- See Also:
BatchNode.Builder.parallelism(int)
-
parallelism
public BatchManager parallelism(java.util.function.IntSupplier parallelism)
-
queue
public BatchManager queue(int capacity)
- See Also:
BatchNode.Builder.queue(int)
-
-