Interface PojoMassIdentifierSink<I>

  • Type Parameters:
    I - The type of entity identifiers.

    public interface PojoMassIdentifierSink<I>
    A sink for use by a PojoMassIdentifierLoader.
    • Method Detail

      • accept

        void accept​(List<? extends I> batch)
             throws InterruptedException
        Adds a batch of identifiers to the sink.

        Identifiers can be passed in any order, but the caller must ensure that a given identifier is never passed more than once, even across multiple calls to this method.

        The list only needs to stay usable until this method returns, as it will be copied. Afterwards, it can be discarded or reused at will. The identifiers themselves, however, must not change after this method is called, because they will be consumed asynchronously.

        Parameters:
        batch - The next batch of identifiers. Never null, never empty.
        Throws:
        InterruptedException - If the thread was interrupted while handling the batch. This exception should generally not be caught: just propagate it.
      • complete

        void complete()
        Signals that no more identifiers are available.