|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.btrace.aggregation.Aggregation
public class Aggregation
BTrace stores the results of aggregating functions in an Aggregation. The aggregated values may be grouped using a
composite AggregationKey
.
Constructor Summary | |
---|---|
Aggregation(AggregationFunction type)
Creates an aggregation. |
Method Summary | |
---|---|
void |
add(AggregationKey key,
long data)
Adds an item of data to the aggregation with the specified grouping key. |
void |
add(long data)
Adds an item of data to the aggregation with an empty key. |
void |
clear()
Resets all values in the aggregation to their default. |
protected java.lang.Object |
clone()
|
java.util.List<java.lang.Object[]> |
getData()
Returns details of the aggregation in a tabular format which can be serialized across the wire and formatted for display. |
java.util.List<AggregationKey> |
getKeyData()
Returns a list of the AggregationKeys that belong to this aggregation. |
java.lang.Long |
getValueForKey(AggregationKey key)
Returns a value for the given key if the key has a value associated with it. |
void |
truncate(int count)
Reduces the size of the aggregation to the absolute value of count . |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Aggregation(AggregationFunction type)
type
- the type of aggregation function to useMethod Detail |
---|
public void add(long data)
data
- the value to be addedpublic void add(AggregationKey key, long data)
key
- the aggregation keydata
- the value to be addedpublic void clear()
public void truncate(int count)
count
. If count is greater than
zero, the largest aggregated values are preserved. If it is less than zero, the smallest aggregated values are
preserved. Passing a value of zero clears the aggregation completely.
count
- the absolute number indicates the number of aggregated values to preserve.public java.util.List<java.lang.Object[]> getData()
public java.util.List<AggregationKey> getKeyData()
public java.lang.Long getValueForKey(AggregationKey key)
key
-
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |