org.javasimon.callback.quantiles
Class FixedQuantilesCallback

java.lang.Object
  extended by org.javasimon.callback.CallbackSkeleton
      extended by org.javasimon.callback.quantiles.QuantilesCallback
          extended by org.javasimon.callback.quantiles.FixedQuantilesCallback
All Implemented Interfaces:
Callback

public class FixedQuantilesCallback
extends QuantilesCallback

Callback which stores data in buckets to compute quantiles. Buckets are create using constant configuration.

Author:
gquintana

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.javasimon.callback.Callback
Callback.Event
 
Field Summary
private  int bucketNb
          Number of buckets.
private  long max
          Buckets upper bound in milliseconds.
private  long min
          Buckets lower bound in milliseconds.
 
Fields inherited from class org.javasimon.callback.quantiles.QuantilesCallback
ATTR_NAME_BUCKETS
 
Constructor Summary
FixedQuantilesCallback(BucketsType bucketsType, long min, long max, int bucketNb)
          Constructor with all configuration
FixedQuantilesCallback(long min, long max, int bucketNb)
          Main constructor.
 
Method Summary
protected  Buckets createBuckets(Stopwatch stopwatch)
          Create buckets using callback attributes
 int getBucketNb()
           
 long getMax()
           
 long getMin()
           
 
Methods inherited from class org.javasimon.callback.quantiles.QuantilesCallback
createBuckets, createLogTemplate, getBuckets, getBucketsType, getOrCreateBuckets, isLogEnabled, onSimonReset, onStopwatchAdd, onStopwatchAdd, onStopwatchSplit, onStopwatchSplit, onStopwatchStop, sampleBuckets, setLogEnabled
 
Methods inherited from class org.javasimon.callback.CallbackSkeleton
cleanup, initialize, onCounterDecrease, onCounterIncrease, onCounterSet, onManagerClear, onManagerMessage, onManagerWarning, onSimonCreated, onSimonDestroyed, onStopwatchStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

min

private final long min
Buckets lower bound in milliseconds.


max

private final long max
Buckets upper bound in milliseconds.


bucketNb

private final int bucketNb
Number of buckets.

Constructor Detail

FixedQuantilesCallback

public FixedQuantilesCallback(long min,
                              long max,
                              int bucketNb)
Main constructor.


FixedQuantilesCallback

public FixedQuantilesCallback(BucketsType bucketsType,
                              long min,
                              long max,
                              int bucketNb)
Constructor with all configuration

Parameters:
bucketsType - Linear or exponential
min - Min
max - Max
bucketNb - Number of buckets
Method Detail

createBuckets

protected Buckets createBuckets(Stopwatch stopwatch)
Create buckets using callback attributes

Specified by:
createBuckets in class QuantilesCallback
Parameters:
stopwatch - Target stopwatch
Returns:
Created buckets

getMin

public long getMin()

getMax

public long getMax()

getBucketNb

public int getBucketNb()


Copyright © 2013. All Rights Reserved.