Interface PojoMassIdentifierSink<I>
- Type Parameters:
I
- The type of entity identifiers.
public interface PojoMassIdentifierSink<I>
A sink for use by a
PojoMassIdentifierLoader
.-
Method Summary
-
Method Details
-
accept
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. Nevernull
, 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.
-