Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 1 (11.1.1.6.0)

E10686-07

oracle.adf.share.perf
Class StateTracker

java.lang.Object
  extended by oracle.adf.share.logging.internal.perf.ADFPerfSensor
      extended by oracle.adf.share.perf.StateTracker

public class StateTracker
extends ADFPerfSensor

This class is a wrapper of DMS State sensor. It encapsulates sensor group name(Noun) and sensor name.


Field Summary
static byte DOUBLE
           
static StateTracker DUMMY_STATE_TRACKER
          An empty state tracker.
static byte INTEGER
           
static byte LONG
           
static byte OBJECT
           
 
Fields inherited from class oracle.adf.share.logging.internal.perf.ADFPerfSensor
mEnableDms, mEnablePerfLog, mIndex, mLevel, mSensorFullName, sIdxLogger, sLogger
 
Method Summary
static StateTracker createStateTracker(java.util.logging.Level level, java.lang.String groupName, java.lang.String name, byte valueType, java.lang.String unit, java.lang.String desc)
          Create a Counter object identified by the groupName and the name.
static StateTracker createStateTracker(java.util.logging.Level level, java.lang.String groupName, java.lang.String name, java.lang.String type, byte valueType, java.lang.String unit, java.lang.String desc)
          Create a Counter object identified by the groupName and the name.
 void increment(double increasedAmount)
          Add increasedAmount to the value of the state.
 void increment(int increasedAmount)
          Add increasedAmount to the value of the state.
 void increment(long increasedAmount)
          Add increasedAmount to the value of the state.
 void reset()
          Clean up the metrics value
 void update(double newValue)
          Update the value of the State.
 void update(int newValue)
          Update the value of the State.
 void update(long newValue)
          Update the value of the State.
 void update(java.lang.Object newValue)
          Update the value of the State.
 
Methods inherited from class oracle.adf.share.logging.internal.perf.ADFPerfSensor
isActive, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOUBLE

public static final byte DOUBLE
See Also:
Constant Field Values

INTEGER

public static final byte INTEGER
See Also:
Constant Field Values

LONG

public static final byte LONG
See Also:
Constant Field Values

OBJECT

public static final byte OBJECT
See Also:
Constant Field Values

DUMMY_STATE_TRACKER

public static final StateTracker DUMMY_STATE_TRACKER
An empty state tracker. Allows client code to be written in a generic way without knowing whether the code is executing in the IDE or in a deployed application.

Method Detail

increment

public void increment(double increasedAmount)
Add increasedAmount to the value of the state.

Parameters:
increasedAmount - the new value to add to the current value of the State.

increment

public void increment(int increasedAmount)
Add increasedAmount to the value of the state.

Parameters:
increasedAmount - the new value to add to the current value of the State.

increment

public void increment(long increasedAmount)
Add increasedAmount to the value of the state.

Parameters:
increasedAmount - the new value to add to the current value of the State.

update

public void update(double newValue)
Update the value of the State.

Parameters:
newValue - the new value for the State.

update

public void update(int newValue)
Update the value of the State.

Parameters:
newValue - the new value for the State.

update

public void update(long newValue)
Update the value of the State.

Parameters:
newValue - the new value for the State.

update

public void update(java.lang.Object newValue)
Update the value of the State.

Parameters:
newValue - the new value for the State.

createStateTracker

public static StateTracker createStateTracker(java.util.logging.Level level,
                                              java.lang.String groupName,
                                              java.lang.String name,
                                              byte valueType,
                                              java.lang.String unit,
                                              java.lang.String desc)
Create a Counter object identified by the groupName and the name.

Developers should then call Counter's increment(), update() methods to track the state object.

Internally, this method creates a DMS Event sensor.

When called inside the IDE, always returns DUMMY_STATE_TRACKER.

Parameters:
level - one of the message level identifiers, e.g. SEVERE
groupName - the group name, which has the format of /oracle/component_id/module/subModule/... The component_id is also used as StateTracker type
name - the stateTracker name.
valueType - the type of data to be maintained in this State, which must be one of DOUBLE, LONG, INTEGER, or OBJECT.
unit - the label for the units of the value.
desc - the description for this StateTracker.
Returns:
StateTracker the new StateTracker object

createStateTracker

public static StateTracker createStateTracker(java.util.logging.Level level,
                                              java.lang.String groupName,
                                              java.lang.String name,
                                              java.lang.String type,
                                              byte valueType,
                                              java.lang.String unit,
                                              java.lang.String desc)
Create a Counter object identified by the groupName and the name.

Developers should then call Counter's increment(), update() methods to track the state object.

Internally, this method creates a DMS Event sensor.

When called inside the IDE, always returns DUMMY_STATE_TRACKER.

Parameters:
level - one of the message level identifiers, e.g. SEVERE
groupName - the group name, which has the format of /oracle/component_id/module/subModule/...
name - the stateTracker name.
type - the stateTracker type which collects all sensors with same type and display them together in a table in AggreSpy
valueType - the type of data to be maintained in this State, which must be one of DOUBLE, LONG, INTEGER, or OBJECT.
unit - the label for the units of the value.
desc - the description for this StateTracker.
Returns:
StateTracker the new StateTracker object

reset

public void reset()
Description copied from class: ADFPerfSensor
Clean up the metrics value

Overrides:
reset in class ADFPerfSensor

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 1 (11.1.1.6.0)

E10686-07

Copyright © 1997, 2011, Oracle. All rights reserved.