Class SingletonConsumerWorkerFactory<InputT,MetricsT>

java.lang.Object
io.aleph0.yap.core.worker.SingletonConsumerWorkerFactory<InputT,MetricsT>
Type Parameters:
InputT - the type of the worker's inputs
MetricsT - the type of the worker's metrics
All Implemented Interfaces:
Measureable<MetricsT>, ConsumerWorkerFactory<InputT,MetricsT>

public class SingletonConsumerWorkerFactory<InputT,MetricsT> extends Object implements ConsumerWorkerFactory<InputT,MetricsT>
A ConsumerWorkerFactory that manages a singleton MeasuredConsumerWorker 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.