Interface AsyncConsumer<T>


public interface AsyncConsumer<T>
Represents an asynchronous operation that accepts a single input argument and does something with it in the background
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(T t)
    Asynchronously performs this operation on the given argument
    void
    close blocks until the consumer has finished processing all inputs close should be idempotent - i.e.
  • Method Details

    • accept

      void accept(T t)
      Asynchronously performs this operation on the given argument
      Parameters:
      t - the input argument accept should not be called after the consumer has been closed
    • close

      void close()
      close blocks until the consumer has finished processing all inputs close should be idempotent - i.e. it should be safe to call multiple times