|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.altlinux.jabbix.metric.RandomNumberMetric
public class RandomNumberMetric
A sample metric agent for the Jabbix library querying the random number generator for a value of a normally distributed random number. Because of only one metric to return it is returned for any given key.
| Constructor Summary | |
|---|---|
RandomNumberMetric(long seed)
Creates a new random metric with a given seed. |
|
| Method Summary | |
|---|---|
JabbixMetric<Double> |
getMetric(String key)
Returns a value of a normally distributed random number. |
Random |
getRandom()
Returns the random number generator. |
void |
setRandom(Random random)
Sets a random generator. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RandomNumberMetric(long seed)
seed - a random number generator seed| Method Detail |
|---|
public JabbixMetric<Double> getMetric(String key)
throws JabbixException,
NoSuchMetricException
getMetric in interface MetricAgentkey - metric key, the name of a metric
JabbixMetric object containing a randomly
generated value
NoSuchMetricException - if no metric with the specified key is found
JabbixException - in any other error casepublic void setRandom(Random random)
random - a random generator to usepublic Random getRandom()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||