Class SingletonProcessorWorkerFactory<InputT,OutputT,MetricsT>

java.lang.Object
io.aleph0.yap.core.worker.SingletonProcessorWorkerFactory<InputT,OutputT,MetricsT>
Type Parameters:
InputT - the type of the worker's input
OutputT - the type of the worker's output
MetricsT - the type of the worker's metrics
All Implemented Interfaces:
Measureable<MetricsT>, ProcessorWorkerFactory<InputT,OutputT,MetricsT>

public class SingletonProcessorWorkerFactory<InputT,OutputT,MetricsT> extends Object implements ProcessorWorkerFactory<InputT,OutputT,MetricsT>
A ProcessorWorkerFactory that manages a singleton MeasuredProcessorWorker and tracks its metrics.

This factory will only create one worker, for which it will return its given worker. All subsequent attempts to create a worker will throw an IllegalStateException.