Interface BlockingProcessorSignalsHolder<T>

Type Parameters:
T - Type of items stored in this holder.

public interface BlockingProcessorSignalsHolder<T>
A holder of items for a BlockingIterable.Processor.

Multi-threaded access

Implementations may assume that the consumption of the items (methods consume(ProcessorSignalsConsumer) and consume(ProcessorSignalsConsumer, long, TimeUnit)) is always done serially however the production (methods add(Object), terminate(Throwable) and terminate()) may be done concurrently.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(T item)
    Adds an item to this holder.
    boolean
    Consumes the next item stored in this holder.
    boolean
    consume(ProcessorSignalsConsumer<T> consumer, long waitFor, TimeUnit waitForUnit)
    Consumes the next item stored in this holder.
    void
    Terminates this holder, such that no further modifications of this holder are expected.
    void
    Terminates this holder, such that no further modifications of this holder are expected.