Class SingletonProducerWorkerFactory<OutputT,MetricsT>

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

public class SingletonProducerWorkerFactory<OutputT,MetricsT> extends Object implements ProducerWorkerFactory<OutputT,MetricsT>
A ProducerWorkerFactory that manages a singleton MeasuredProducerWorker 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.