- All Superinterfaces:
AutoCloseable, Closeable
- All Known Subinterfaces:
ScoredDualWriter<T>
- All Known Implementing Classes:
DataWriter, ManagedWriter, MappedWriter, QueuedWriter, ShardedWriter, ShardedWriter.GeneralShardedConsumer, ShardedWriter.PowerOf2ShardedConsumer, TextLineWriter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Essentially just a
Consumer, but assumed to be writing to a file or similar, and therefore extends
Closeable.
-
Nested Class Summary
Nested Classes
-
-
Method Summary
default void
static void
Make sure this directory exists, create if necessary
void
Write the item to the consumer.
default void
Write the batch (collection of items) to the consumer.
-
-
Method Details
-
mkdirs
static void mkdirs(File dir)
Make sure this directory exists, create if necessary
-
-
-
-
-
-
-
-
write
Write the item to the consumer.
- Parameters:
item - The item to be written
-
writeBatch
default void writeBatch(Iterable<? extends T> batch)
Write the batch (collection of items) to the consumer.
- Parameters:
batch - The batch to be written