public abstract class Counter extends ADFPerfSensor
Modifier and Type | Field and Description |
---|---|
static Counter |
DUMMY_COUNTER
A dummy Counter object that does nothing.
|
LAZY_NOUN_TYPE, mEnableDms, mEnablePerfLog, mIndex, mLevel, mSensorFullName, sIdxLogger, sLogger
Modifier | Constructor and Description |
---|---|
protected |
Counter()
creates an empty Counter object.
|
protected |
Counter(java.util.logging.Level level,
java.lang.String fullName)
Only for use by CounterImpl.
|
Modifier and Type | Method and Description |
---|---|
static Counter |
createCounter(java.util.logging.Level level,
java.lang.String groupName,
java.lang.String name,
java.lang.String desc)
Deprecated.
see overloads with the type param
|
static Counter |
createCounter(java.util.logging.Level level,
java.lang.String groupName,
java.lang.String name,
java.lang.String type,
java.lang.String desc)
Create a Counter object identified by the sensorGroupName and the
sensorName.
|
static Counter |
createCounter(java.util.logging.Level level,
java.lang.String groupName,
java.lang.String name,
java.lang.String type,
java.lang.String desc,
oracle.dms.instrument.SegregationType sgType)
Deprecated.
see AdfServerPlatformSupport::createCounter
|
void |
destroy()
Destroy up the counter value.
|
long |
getValue()
Get counter current value.
|
void |
increase()
Increase the counter to indicate an event occurred.
|
void |
reset()
Clean up the counter value.
|
isActive, log, toString
public static final Counter DUMMY_COUNTER
protected Counter(java.util.logging.Level level, java.lang.String fullName)
level
- fullName
- protected Counter()
public void increase()
public long getValue()
public void reset()
reset
in class ADFPerfSensor
public void destroy()
destroy
in class ADFPerfSensor
@Deprecated public static Counter createCounter(java.util.logging.Level level, java.lang.String groupName, java.lang.String name, java.lang.String desc)
Developers should then call Counter's increase(), reset() methods to track the counter object.
Internally, this method creates a DMS Event sensor.
When running inside the IDE, this methods returns DUMMY_COUNTER.
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 Counter typename
- the counter name.desc
- the description for this Counter.public static Counter createCounter(java.util.logging.Level level, java.lang.String groupName, java.lang.String name, java.lang.String type, java.lang.String desc)
Developers should then call Counter's increase(), reset() methods to track the counter object.
Internally, this method creates a DMS Event sensor.
When running inside the IDE, this methods returns DUMMY_COUNTER.
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 counter name.type
- the Counter type which collects all sensors
with same type and display them together in a table
in AggreSpydesc
- the description for this Counter.@Deprecated public static Counter createCounter(java.util.logging.Level level, java.lang.String groupName, java.lang.String name, java.lang.String type, java.lang.String desc, oracle.dms.instrument.SegregationType sgType)