Interface PublisherProcessorSignalsHolder<T>

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

public interface PublisherProcessorSignalsHolder<T>
A holder of items for a PublisherSource.Processor. A PublisherSource.Processor decouples production of data from the consumption of data and this holder acts as the implementation for that decoupling by using an intermediate in-memory storage. This in-memory storage layer can be used in different ways, some of which are enumerated below:
  • Implement a custom signal rejection strategy when some signals can be dropped in favor of others.
  • Store reduced set of signals when intermediary signals can either be discarded or coalesced.
  • Reverse order of consumption of items when stored signals reach a threshold.

Multi-threaded access

Implementations may assume that the consumption of the holder (methods tryConsume(ProcessorSignalsConsumer) and tryConsumeTerminal(ProcessorSignalsConsumer)) is always done serially however the production (methods add(Object), terminate(Throwable) and terminate()) can be done concurrently.