Package org.ojalgo.type.function
Class ShardedConsumer<T>
- java.lang.Object
-
- org.ojalgo.type.function.ShardedConsumer<T>
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.util.function.Consumer<T>
,AutoConsumer<T>
,AutoFunctional
- Direct Known Subclasses:
ShardedConsumer.GeneralShardedConsumer
,ShardedConsumer.PowerOf2ShardedConsumer
abstract class ShardedConsumer<T> extends java.lang.Object implements AutoConsumer<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
ShardedConsumer.GeneralShardedConsumer<T>
(package private) static class
ShardedConsumer.PowerOf2ShardedConsumer<T>
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.Consumer<T>[]
myConsumers
-
Fields inherited from interface org.ojalgo.type.function.AutoConsumer
NULL
-
-
Constructor Summary
Constructors Constructor Description ShardedConsumer(java.util.function.Consumer<T>[] consumers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
(package private) static <T> ShardedConsumer<T>
of(java.util.function.ToIntFunction<T> distributor, java.util.function.Consumer<T>[] consumers)
-
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, write, writeBatch
-
-
-
-
Field Detail
-
myConsumers
private final java.util.function.Consumer<T>[] myConsumers
-
-
Constructor Detail
-
ShardedConsumer
ShardedConsumer(java.util.function.Consumer<T>[] consumers)
-
-
Method Detail
-
of
static <T> ShardedConsumer<T> of(java.util.function.ToIntFunction<T> distributor, java.util.function.Consumer<T>[] consumers)
-
close
public void close() throws java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceAutoConsumer<T>
- Throws:
java.lang.Exception
-
-