public static enum FwdJMX.ThreadsCpuTimers extends java.lang.Enum<FwdJMX.ThreadsCpuTimers> implements ThreadsCpuMBean
Enum Constant and Description |
---|
ThreadsCpuUtilization
This counter is still unused
|
Modifier and Type | Field and Description |
---|---|
private ThreadsCpuCounter |
counter
Counter instance
|
Modifier and Type | Method and Description |
---|---|
ThreadsCpuMBean |
getCounter()
Return counter instance.
|
long |
getThreadElapsedCpuTime()
Gets the elapsed CPU time for the execution thread.
|
long |
getThreadElapsedCpuTime(long tid)
Gets the elapsed CPU time for the given thread.
|
long |
getThreadElapsedUserTime()
Gets the elapsed CPU time for the execution thread in a user mode.
|
long |
getThreadElapsedUserTime(long tid)
Gets the elapsed CPU time for the given thread in a user mode.
|
void |
register(BooleanConsumer agent)
Register enable/disable setter.
|
void |
setCurrentThread(long tid)
Sets the execution thread.
|
java.lang.String |
toString(java.lang.String ts,
java.lang.String comment)
Return the string representation of the counter
|
void |
update(long value)
Update counter.
|
void |
updateThreadElapsedCpuTime(long tid,
long value)
Updates the elapsed CPU time spent the given thread by adding the given value.
|
void |
updateThreadElapsedUserTime(long tid,
long value)
Updates the elapsed CPU time spent the given thread in a user mode by adding the given value.
|
static FwdJMX.ThreadsCpuTimers |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static FwdJMX.ThreadsCpuTimers[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
dump
public static final FwdJMX.ThreadsCpuTimers ThreadsCpuUtilization
private final ThreadsCpuCounter counter
public static FwdJMX.ThreadsCpuTimers[] values()
for (FwdJMX.ThreadsCpuTimers c : FwdJMX.ThreadsCpuTimers.values()) System.out.println(c);
public static FwdJMX.ThreadsCpuTimers valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic void register(BooleanConsumer agent)
register
in interface AgentRegistry<BooleanConsumer>
agent
- enable/disable setterpublic void update(long value)
update
in interface LongCounter
value
- new valuepublic java.lang.String toString(java.lang.String ts, java.lang.String comment) throws java.io.IOException
toString
in interface LongCounter
ts
- The measurement time stampcomment
- The commentjava.io.IOException
- If IO exception occurspublic ThreadsCpuMBean getCounter()
public long getThreadElapsedCpuTime()
getThreadElapsedCpuTime
in interface ThreadsCpuMBean
public long getThreadElapsedCpuTime(long tid)
getThreadElapsedCpuTime
in interface ThreadsCpuMBean
tid
- The given thread idpublic void updateThreadElapsedCpuTime(long tid, long value)
updateThreadElapsedCpuTime
in interface ThreadsCpuMBean
tid
- The given thread idvalue
- The given valuepublic long getThreadElapsedUserTime()
getThreadElapsedUserTime
in interface ThreadsCpuMBean
public long getThreadElapsedUserTime(long tid)
getThreadElapsedUserTime
in interface ThreadsCpuMBean
tid
- The given thread idpublic void updateThreadElapsedUserTime(long tid, long value)
updateThreadElapsedUserTime
in interface ThreadsCpuMBean
tid
- The given thread idvalue
- The given valuepublic void setCurrentThread(long tid)
setCurrentThread
in interface ThreadsCpuMBean
tid
- The thread id