Class 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>
    • Field Detail

      • 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