public abstract class StateTracker extends ADFPerfSensor
Modifier and Type | Field and Description |
---|---|
static byte |
DOUBLE |
static StateTracker |
DUMMY_STATE_TRACKER
An empty state tracker.
|
static byte |
INTEGER |
static byte |
LONG |
static byte |
OBJECT |
LAZY_NOUN_TYPE, mEnableDms, mEnablePerfLog, mIndex, mLevel, mSensorFullName, sIdxLogger, sLogger
Modifier | Constructor and Description |
---|---|
protected |
StateTracker()
Creates an empty StateTracker object.
|
protected |
StateTracker(java.util.logging.Level level,
java.lang.String sensorFullName)
Create a StateTracker object identified by the sensorFullName.
|
Modifier and Type | Method and Description |
---|---|
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)
Deprecated.
see overloads with the type param
|
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.
|
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,
oracle.dms.instrument.SegregationType sgType)
Deprecated.
see AdfServerPlatformSupport::createStateTracker
|
protected abstract java.lang.Object |
getClonedValue()
access DMS state tracker current value object.
|
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 |
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.
|
public static final byte DOUBLE
public static final byte INTEGER
public static final byte LONG
public static final byte OBJECT
public static final StateTracker DUMMY_STATE_TRACKER
protected StateTracker(java.util.logging.Level level, java.lang.String sensorFullName)
Internally, this method creates a DMS State sensor.
The DMS State sensor has following metrics: value, count, minValue, maxValue.
level
- one of the message level identifiers, e.g. SEVEREsensorFullName
- the sensor full name, which is a container of
related sensors that cover certain aspect of a feature.protected StateTracker()
protected abstract java.lang.Object getClonedValue()
public void increment(double increasedAmount)
increasedAmount
- the new value to add to the current value of the
State.public void increment(int increasedAmount)
increasedAmount
- the new value to add to the current value of the
State.public void increment(long increasedAmount)
increasedAmount
- the new value to add to the current value of the
State.public void update(double newValue)
newValue
- the new value for the State.public void update(int newValue)
newValue
- the new value for the State.public void update(long newValue)
newValue
- the new value for the State.public void update(java.lang.Object newValue)
newValue
- the new value for the State.@Deprecated 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)
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.
level
- one of the message level identifiers, e.g. SEVEREgroupName
- the group name, which has the format of
/oracle/component_id/module/subModule/...
The component_id is also used as StateTracker typename
- 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.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)
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.
level
- one of the message level identifiers, e.g. SEVEREgroupName
- 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 AggreSpyvalueType
- 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.@Deprecated 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, oracle.dms.instrument.SegregationType sgType)