How To Create A Counter In Java
Skip navigation links
| Oracle Fusion Middleware Java API Reference for Oracle ADF Share 11g Release 1 (11.1.1.9.0) E52934-01 | ||||||||
| PREV CLASSNEXT CLASS | FRAMESNO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
oracle.adf.share.perf
Class Counter
java.lang.Object
oracle.adf.share.logging.internal.perf.ADFPerfSensor
oracle.adf.share.perf.Counter
-
public class Counter
- extends ADFPerfSensor
This class is a wrapper of DMS Event sensor.
| Field Summary | |
|---|---|
static Counter | DUMMY_COUNTER A dummy Counter object that does nothing. |
| Fields inherited from class oracle.adf.share.logging.internal.perf.ADFPerfSensor |
|---|
mEnableDms, mEnablePerfLog, mIndex, mLevel, mSensorFullName, sIdxLogger, sLogger |
| Constructor Summary | |
|---|---|
protected | Counter() creates an empty Counter object. |
| Method Summary | |
|---|---|
static Counter | createCounter(java.util.logging.Level level, java.lang.String groupName, java.lang.String name, 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) Create a Counter object identified by the sensorGroupName and the sensorName. |
long | getValue() Get counter current value |
void | increase() Increase the counter to indicate an event occurred. |
void | reset() Clean up the counter value |
| 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 |
|---|
DUMMY_COUNTER
public static final Counter DUMMY_COUNTER
- A dummy Counter object that does nothing. 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.
| Constructor Detail |
|---|
Counter
protected Counter()
- creates an empty Counter object.
| Method Detail |
|---|
increase
public void increase()
- Increase the counter to indicate an event occurred.
getValue
public long getValue()
- Get counter current value
-
- Returns:
- counter value. When the sensor is not enabled or the value is not integer, it return -1 to indicate a problem.
reset
public void reset()
- Clean up the counter value
-
- Overrides:
-
resetin classADFPerfSensor
createCounter
public static Counter createCounter(java.util.logging.Level level, java.lang.String groupName, java.lang.String name, java.lang.String desc)
- Create a Counter object identified by the sensorGroupName and the sensorName.
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.
-
- 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 Counter type -
name- the counter name. -
desc- the description for this Counter. - Returns:
- the new Counter
createCounter
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)
- Create a Counter object identified by the sensorGroupName and the sensorName.
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.
-
- 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 counter name. -
type- the Counter type which collects all sensors with same type and display them together in a table in AggreSpy -
desc- the description for this Counter. - Returns:
- the new Counter
Skip navigation links
| Oracle Fusion Middleware Java API Reference for Oracle ADF Share 11g Release 1 (11.1.1.9.0) E52934-01 | ||||||||
| PREV CLASSNEXT CLASS | FRAMESNO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
How To Create A Counter In Java
Source: https://docs.oracle.com/middleware/11119/adf/api-reference-share/oracle/adf/share/perf/Counter.html
Posted by: proutopeashom96.blogspot.com

0 Response to "How To Create A Counter In Java"
Post a Comment