L - defines the class that the endpoint needs to locate the metric attributesT - defines the class of the type of measurement to be collected (e.g. metric or availability)D - defines the class that is the data point that can contain the measurement datapublic abstract class MeasurementCollector<L,T extends MeasurementType<L>,D extends DataPoint> extends Object implements Runnable
| Constructor and Description |
|---|
MeasurementCollector(SamplingService<L> endpointService,
ScheduledCollectionsQueue<L,T> queue,
Consumer<D> completionHandler)
Creates a job that is used to collect measurements provided by the priority queue
from the given monitored endpoint.
|
| Modifier and Type | Method and Description |
|---|---|
protected Consumer<D> |
getCompletionHandler() |
protected SamplingService<L> |
getEndpointService() |
protected ScheduledCollectionsQueue<L,T> |
getScheduledCollectionsQueue() |
public MeasurementCollector(SamplingService<L> endpointService, ScheduledCollectionsQueue<L,T> queue, Consumer<D> completionHandler)
completionHandler will be notified. The completion
handler should store the data appropriately.endpointService - where the resource is whose data is to be collectedqueue - the queue that determines what is scheduled next for collectioncompletionHandler - when the data are found (or if an error occurs) this object is notifiedprotected SamplingService<L> getEndpointService()
protected ScheduledCollectionsQueue<L,T> getScheduledCollectionsQueue()
Copyright © 2015–2017 Red Hat, Inc.. All rights reserved.