Package fr.gouv.vitam.worker.core.utils
Class BufferedConsumer<T>
- java.lang.Object
-
- fr.gouv.vitam.worker.core.utils.BufferedConsumer<T>
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class BufferedConsumer<T> extends java.lang.Object implements java.lang.AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description BufferedConsumer(int bufferSize, java.util.function.Consumer<java.util.List<T>> bufferConsumer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendEntry(T entry)
void
close()
void
flush()
-
-
-
Constructor Detail
-
BufferedConsumer
public BufferedConsumer(int bufferSize, java.util.function.Consumer<java.util.List<T>> bufferConsumer)
-
-
Method Detail
-
appendEntry
public void appendEntry(T entry)
-
flush
public void flush()
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-