org.activemath.webapp.report.bucket
Class BucketSet

java.lang.Object
  extended by org.activemath.webapp.report.bucket.BucketSet
Direct Known Subclasses:
TimedBucketSet

public abstract class BucketSet
extends Object

Bind n buckets to a set. Superclass for timed and discrete buckets.


Field Summary
protected  org.activemath.webapp.report.bucket.Bucket[] buckets
          The buckets of this set
protected  BucketType bucketType
          Type of all buckets in this set
protected  int numBuckets
          number of buckets of this set
protected  org.activemath.webapp.report.bucket.Bucket overflow
           
protected  long referenceTs
           
protected  org.activemath.webapp.report.bucket.Bucket underflow
           
 
Constructor Summary
protected BucketSet(BucketType bucketType, int numBuckets)
           
 
Method Summary
 void addElement(long timestamp, Long value)
           
protected  org.activemath.webapp.report.bucket.Bucket[] createBuckets(long refTs)
          Allocate & initialize the buckets of this set.
 org.activemath.webapp.report.bucket.Bucket[] getBuckets()
           
 BucketType getBucketType()
           
 String getCounts()
           
 long getEndTime()
           
 int getMaxCount()
           
 long getMaxValue()
           
 int getMinCount()
           
 long getMinValue()
           
 int getNumBuckets()
           
 org.activemath.webapp.report.bucket.Bucket getOverflow()
           
 long getReferenceTs()
           
 long getStartTime()
           
 int getTotalCount()
           
 long getTotalValue()
           
 org.activemath.webapp.report.bucket.Bucket getUnderflow()
           
 String getValues()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bucketType

protected BucketType bucketType
Type of all buckets in this set


numBuckets

protected int numBuckets
number of buckets of this set


buckets

protected org.activemath.webapp.report.bucket.Bucket[] buckets
The buckets of this set


overflow

protected org.activemath.webapp.report.bucket.Bucket overflow

underflow

protected org.activemath.webapp.report.bucket.Bucket underflow

referenceTs

protected long referenceTs
Constructor Detail

BucketSet

protected BucketSet(BucketType bucketType,
                    int numBuckets)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

createBuckets

protected org.activemath.webapp.report.bucket.Bucket[] createBuckets(long refTs)
Allocate & initialize the buckets of this set.

Parameters:
refTS - - reference timestamp, indicating a time inside the last bucket.

addElement

public void addElement(long timestamp,
                       Long value)
Parameters:
timestamp -
value - - may be null

getCounts

public String getCounts()

getValues

public String getValues()

getBuckets

public org.activemath.webapp.report.bucket.Bucket[] getBuckets()

getOverflow

public org.activemath.webapp.report.bucket.Bucket getOverflow()

getUnderflow

public org.activemath.webapp.report.bucket.Bucket getUnderflow()

getReferenceTs

public long getReferenceTs()

getBucketType

public BucketType getBucketType()

getNumBuckets

public int getNumBuckets()

getTotalCount

public int getTotalCount()

getMaxCount

public int getMaxCount()

getMinCount

public int getMinCount()

getTotalValue

public long getTotalValue()

getMaxValue

public long getMaxValue()

getMinValue

public long getMinValue()

getEndTime

public long getEndTime()

getStartTime

public long getStartTime()