public class RateStat
extends java.lang.Object
コンストラクタ | 説明 |
---|---|
RateStat(java.lang.String name,
java.lang.String description,
java.lang.String group,
long[] periods) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
void |
addData(long value) |
Update all of the rates for the various periods with the given value.
|
void |
addData(long value,
long eventDuration) |
update all of the rates for the various periods with the given value.
|
void |
addRate(long period) |
推奨されていません。
|
void |
coalesceStats() |
coalesce all the stats
|
boolean |
containsRate(long period) |
Tests if a rate with the provided period exists within this RateStat.
|
boolean |
equals(java.lang.Object obj) |
|
java.lang.String |
getDescription() |
|
java.lang.String |
getGroupName() |
|
double |
getLifetimeAverageValue() |
|
long |
getLifetimeEventCount() |
|
java.lang.String |
getName() |
|
long[] |
getPeriods() |
|
Rate |
getRate(long period) |
Returns rate with requested period if it exists,
otherwise null
|
int |
hashCode() |
|
void |
load(java.util.Properties props,
java.lang.String prefix,
boolean treatAsCurrent) |
Load this rate stat from the properties, populating all of the rates contained
underneath it.
|
(package private) boolean |
nameGroupDescEquals(RateStat rs) |
|
void |
removeRate(long period) |
推奨されていません。
|
void |
setStatLog(StatLog sl) |
|
void |
store(java.io.OutputStream out,
java.lang.String prefix) |
|
java.lang.String |
toString() |
protected final Rate[] _rates
public RateStat(java.lang.String name, java.lang.String description, java.lang.String group, long[] periods)
public void setStatLog(StatLog sl)
public void addData(long value, long eventDuration)
public void addData(long value)
public void coalesceStats()
public java.lang.String getName()
public java.lang.String getGroupName()
public java.lang.String getDescription()
public long[] getPeriods()
public double getLifetimeAverageValue()
public long getLifetimeEventCount()
public Rate getRate(long period)
period
- ms@Deprecated public void addRate(long period)
period
- ms@Deprecated public void removeRate(long period)
period
- mspublic boolean containsRate(long period)
period
- mspublic int hashCode()
hashCode
クラス内 java.lang.Object
public java.lang.String toString()
toString
クラス内 java.lang.Object
public boolean equals(java.lang.Object obj)
equals
クラス内 java.lang.Object
boolean nameGroupDescEquals(RateStat rs)
public void store(java.io.OutputStream out, java.lang.String prefix) throws java.io.IOException
java.io.IOException
public void load(java.util.Properties props, java.lang.String prefix, boolean treatAsCurrent) throws java.lang.IllegalArgumentException
prefix
- prefix to the property entries (should NOT end with a period)treatAsCurrent
- if true, we'll treat the loaded data as if no time has
elapsed since it was written out, but if it is false, we'll
treat the data with as much freshness (or staleness) as appropriate.java.lang.IllegalArgumentException
- if the data was formatted incorrectly