Class BufferedConsumer<T>

java.lang.Object
fr.gouv.vitam.common.utils.BufferedConsumer<T>
All Implemented Interfaces:
AutoCloseable, Consumer<T>

public class BufferedConsumer<T> extends Object implements Consumer<T>, AutoCloseable
  • Constructor Details

    • BufferedConsumer

      public BufferedConsumer(int bufferSize, Consumer<List<T>> bufferConsumer)
  • Method Details

    • accept

      public void accept(T entry)
      Specified by:
      accept in interface Consumer<T>
    • flush

      public void flush()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable