Oracle Application Server 10g DMS API Reference
10g (9.0.4)

B12020-01

oracle.dms.instrument
Class State

java.lang.Object
  |
  +--oracle.dms.instrument.Sensor
        |
        +--oracle.dms.instrument.State

public class State
extends Sensor

A State Sensor can be used to monitor pre-computed metric values. A State can be used to monitor arbitrary values, including integers, doubles, longs, or Object references. Use a State Sensor to represent status or gauge values that may increase or decrease during JVM execution. For example, queue lengths, pool sizes, buffer sizes, configuration parameters, etc.


Field Summary

 

Fields inherited from class oracle.dms.instrument.Sensor
active, all, average, completed, count, exclTime, maxActive, maximum, minimum, sum, time, value

 

Method Summary
static State create(Noun parent, java.lang.String name, java.lang.String units, java.lang.String desc, double init)
          Creates a new State Sensor
static State create(Noun parent, java.lang.String name, java.lang.String units, java.lang.String desc, int init)
          Creates a new State Sensor
static State create(Noun parent, java.lang.String name, java.lang.String units, java.lang.String desc, long init)
          Creates a new State Sensor
static State create(Noun parent, java.lang.String name, java.lang.String units, java.lang.String desc, java.lang.Object init)
          Creates a new State Sensor
 void deriveMetric(int metric)
          Derives additional metrics for the State.
 void update(double newval)
          Updates the value of the State.
 void update(int newval)
          Updates the value of the State.
 void update(long newval)
          Updates the value of the State.
 void update(java.lang.Object newval)
          Updates the value of the State.

 

Methods inherited from class oracle.dms.instrument.Sensor
destroy, get, getDescription, getName, getValue, reset

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

create

public static State create(Noun parent,
                           java.lang.String name,
                           java.lang.String units,
                           java.lang.String desc,
                           int init)
Creates a new State Sensor
Parameters:
parent - the State's parent Noun.
name - the name of the State.
units - the label for the units of the value.
desc - a description for the State.
init - initial State value
Returns:
the new State or, if the State already exists, then this method returns a reference to it.
Since:
Oracle iAS 1.0.2.2

create

public static State create(Noun parent,
                           java.lang.String name,
                           java.lang.String units,
                           java.lang.String desc,
                           long init)
Creates a new State Sensor
Parameters:
parent - the State's parent Noun.
name - the name of the State.
units - the label for the units of the value.
desc - a description for the State.
init - initial State value
Returns:
the new State or, if the State already exists, then this method returns a reference to it.
Since:
Oracle iAS 9.0.2

create

public static State create(Noun parent,
                           java.lang.String name,
                           java.lang.String units,
                           java.lang.String desc,
                           double init)
Creates a new State Sensor
Parameters:
parent - the State's parent Noun.
name - the name of the State.
units - the label for the units of the value.
desc - a description for the State.
init - initial State value
Returns:
the new State or, if the State already exists, then this method returns a reference to it.
Since:
Oracle iAS 1.0.2.2

create

public static State create(Noun parent,
                           java.lang.String name,
                           java.lang.String units,
                           java.lang.String desc,
                           java.lang.Object init)
Creates a new State Sensor
Parameters:
parent - the State's parent Noun.
name - the name of the State.
units - the label for the units of the value.
desc - a description for the State.
init - initial State value

DMS stores a reference to the Object, not a copy of the Object. When reporting the State's metric value, DMS will call toString() on the Object.

Returns:
the new State or, if the State already exists, then this method returns a reference to it.
Since:
Oracle iAS 1.0.2.2

deriveMetric

public void deriveMetric(int metric)
Derives additional metrics for the State.
Overrides:
deriveMetric in class Sensor
Parameters:
metric - a bitmask indicating the metric(s) to derive.

Possible values are Sensor.minimum, Sensor.maximum, and Sensor.count. The values can be bitwise-ORed together, or multiple calls to deriveMetric can be made at the programmer's convenience.

Since:
Oracle iAS 1.0.2.2

update

public void update(int newval)
Updates the value of the State.
Parameters:
newval - the new value for the State.
Since:
Oracle iAS 1.0.2.2

update

public void update(long newval)
Updates the value of the State.
Parameters:
newval - the new value for the State.
Since:
Oracle iAS 9.0.2

update

public void update(double newval)
Updates the value of the State.
Parameters:
newval - the new value for the State.
Since:
Oracle iAS 1.0.2.2

update

public void update(java.lang.Object newval)
Updates the value of the State.
Parameters:
newval - the new value for the State.

DMS stores a reference to the input Object, not a copy. When reporting the State's metric value, DMS will call toString() on on the Object.

Since:
Oracle iAS 1.0.2.2

Oracle Application Server 10g DMS API Reference
10g (9.0.4)

B12020-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.