Package org.ojalgo.netio
Class ShardedWriter.GeneralShardedConsumer<T>
- java.lang.Object
-
- org.ojalgo.netio.ShardedWriter<T>
-
- org.ojalgo.netio.ShardedWriter.GeneralShardedConsumer<T>
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,ToFileWriter<T>
- Enclosing class:
- ShardedWriter<T>
static final class ShardedWriter.GeneralShardedConsumer<T> extends ShardedWriter<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ojalgo.netio.ShardedWriter
ShardedWriter.GeneralShardedConsumer<T>, ShardedWriter.PowerOf2ShardedConsumer<T>
-
Nested classes/interfaces inherited from interface org.ojalgo.netio.ToFileWriter
ToFileWriter.Builder<F>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.ToIntFunction<T>
myDistributor
private int
myNumberOfShards
private ToFileWriter<T>[]
myWriters
-
Fields inherited from interface org.ojalgo.netio.ToFileWriter
NULL
-
-
Constructor Summary
Constructors Constructor Description GeneralShardedConsumer(java.util.function.ToIntFunction<T> distributor, ToFileWriter<T>[] consumers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
write(T item)
Write the item to the consumer.-
Methods inherited from class org.ojalgo.netio.ShardedWriter
close, of
-
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 Detail
-
myWriters
private final ToFileWriter<T>[] myWriters
-
myDistributor
private final java.util.function.ToIntFunction<T> myDistributor
-
myNumberOfShards
private final int myNumberOfShards
-
-
Constructor Detail
-
GeneralShardedConsumer
GeneralShardedConsumer(java.util.function.ToIntFunction<T> distributor, ToFileWriter<T>[] consumers)
-
-
Method Detail
-
write
public void write(T item)
Description copied from interface:ToFileWriter
Write the item to the consumer.- Parameters:
item
- The item to be written
-
-