|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensolaris.os.dtrace.AggregationRecord
public final class AggregationRecord
A single key-value pair in a DTrace aggregation.
Immutable. Supports persistence using XMLEncoder
.
Aggregation
,
Serialized FormConstructor Summary | |
---|---|
AggregationRecord(Tuple tupleKey,
AggregationValue recordValue)
Creates an aggregation record with the given key and value. |
|
AggregationRecord(Tuple tupleKey,
AggregationValue recordValue,
int n)
Creates an aggregation record with the given key, value, and ordinal. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Compares the specified object with this aggregation record for equality. |
int |
getOrdinal()
Gets the ordinal generated when this AggregationRecord was added to its containing Aggregate by the native DTrace library,
from zero (first) to n-1 (last). |
Tuple |
getTuple()
Gets the multi-element key associated with getValue() . |
AggregationValue |
getValue()
Gets the value associated with getTuple() . |
int |
hashCode()
Overridden to ensure that equal records have equal hash codes. |
java.lang.String |
toString()
Gets a string representation of this aggregation record useful for logging and not intended for display. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AggregationRecord(Tuple tupleKey, AggregationValue recordValue)
AggregationRecord(Tuple tupleKey, AggregationValue
recordValue, int n)
public AggregationRecord(Tuple tupleKey, AggregationValue recordValue, int n)
tupleKey
- aggregation tuple, may be empty (see Tuple.EMPTY
) to indicate that this record's value belongs to an
unkeyed aggregation declared without square brackets, for
example: @a = count();
recordValue
- aggregated value associated with the given
tuplen
- ordinal from zero (first) to n-1 (last) within the
Aggregate
containing this record
java.lang.NullPointerException
- if the given key or value is
null
java.lang.IllegalArgumentException
- if the given ordinal is negativeMethod Detail |
---|
public Tuple getTuple()
getValue()
.
Aggregation.getRecord(Tuple key)
public AggregationValue getValue()
getTuple()
. Values
generated by the DTrace actions count()
, sum()
,
avg()
, min()
, and max()
are of type
Long
. Values generated by the DTrace actions quantize(
) and lquantize()
are of type Distribution
.
getTuple()
public int getOrdinal()
Aggregate
by the native DTrace library,
from zero (first) to n-1 (last). The sequence described by an
aggregate's record ordinals reflects the setting of the aggsortkey
, aggsortkeypos
, aggsortpos
, and aggsortrev
DTrace options and matches the way
that the records would be ordered by dtrace(1M)
.
Aggregate
containing this recordAggregate.getOrderedRecords()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
true
if and only if the specified object is an
AggregationRecord
and both records have equal tuples as
defined by Tuple.equals(Object o)
and equal values as
defined by the implementation of AggregationValue
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
class-name[property1 = value1, property2 = value2]
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |