| java.lang.Object biz.hammurapi.metrics.SlicingMeasurementConsumer
SlicingMeasurementConsumer | public class SlicingMeasurementConsumer implements MeasurementConsumer,Component(Code) | | Slices metrics.
author: Pavel Vlasov version: $Revision: 1.3 $ |
Field Summary | |
protected long | from | protected long | to |
Constructor Summary | |
public | SlicingMeasurementConsumer(long tick, boolean keepMeasurements, int maxQueue, SliceConsumer sliceConsumer) Creates a new instance with internal timer.
Parameters: tick - Slice size in milliseconds Parameters: keepMeasurements - If true individual measurements are reported, only aggregated values otherwise Parameters: maxQueue - Maximum number of slices pending to be consumed. | public | SlicingMeasurementConsumer(long tick, boolean keepMeasurements, int maxQueue, SliceConsumer sliceConsumer, Timer timer) Creates a new instance with internal timer.
Parameters: tick - Slice size in milliseconds Parameters: keepMeasurements - If true individual measurements are reported, only aggregated values otherwise Parameters: maxQueue - Maximum number of slices pending to be consumed. | public | SlicingMeasurementConsumer() Default constructor with default settings. |
SlicingMeasurementConsumer | public SlicingMeasurementConsumer(long tick, boolean keepMeasurements, int maxQueue, SliceConsumer sliceConsumer)(Code) | | Creates a new instance with internal timer.
Parameters: tick - Slice size in milliseconds Parameters: keepMeasurements - If true individual measurements are reported, only aggregated values otherwise Parameters: maxQueue - Maximum number of slices pending to be consumed. 0 - no limit. If sampling ratio is higher thanconsuming ration then excessive slices will be dropped with a notice on console. |
SlicingMeasurementConsumer | public SlicingMeasurementConsumer(long tick, boolean keepMeasurements, int maxQueue, SliceConsumer sliceConsumer, Timer timer)(Code) | | Creates a new instance with internal timer.
Parameters: tick - Slice size in milliseconds Parameters: keepMeasurements - If true individual measurements are reported, only aggregated values otherwise Parameters: maxQueue - Maximum number of slices pending to be consumed. 0 - no limit. If sampling ratio is higher thanconsuming ration then excessive slices will be dropped with a notice on console. Parameters: timer - Timer to use for slicing metrics and passing them to slice consumer. If it is null then an internal timer iscreated. |
SlicingMeasurementConsumer | public SlicingMeasurementConsumer()(Code) | | Default constructor with default settings.
|
addMeasurement | public void addMeasurement(String name, double value, long time)(Code) | | |
getMaxQueue | public int getMaxQueue()(Code) | | |
getTick | public long getTick()(Code) | | |
isKeepMeasurements | public boolean isKeepMeasurements()(Code) | | |
setKeepMeasurements | public void setKeepMeasurements(boolean keepMeasurements)(Code) | | |
setMaxQueue | public void setMaxQueue(int maxQueue)(Code) | | |
setTick | public void setTick(long tick)(Code) | | |
shutdown | public void shutdown()(Code) | | |
|
|