public class PerfCounterQueryHandler extends Object
PerfCounterQueryHandler class.
| Modifier and Type | Method and Description |
|---|---|
boolean |
addCounterToQuery(PerfDataUtil.PerfCounter counter)
Begin monitoring a Performance Data counter, attached to a query whose key is
the counter's object.
|
boolean |
addCounterToQuery(PerfDataUtil.PerfCounter counter,
String key)
Begin monitoring a Performance Data counter, attached to a query whose key is
the specified string.
|
static PerfCounterQueryHandler |
getInstance()
Instantiate this class as a singleton
|
long |
queryCounter(PerfDataUtil.PerfCounter counter)
Query the raw counter value of a Performance Data counter.
|
void |
removeAllCounters()
Stop monitoring all Performance Data counters and release their resources
|
void |
removeAllCountersFromQuery(String queryKey)
Stop monitoring Performance Data counters for a particular queryKey and
release their resources
|
boolean |
removeCounterFromQuery(PerfDataUtil.PerfCounter counter)
Stop monitoring a Performance Data counter, attached to a query whose key is
the counter's object.
|
boolean |
removeCounterFromQuery(PerfDataUtil.PerfCounter counter,
String key)
Stop monitoring a Performance Data counter, attached to a query whose key is
the specified string..
|
long |
updateQuery(String key)
Update all counters on a query.
|
public static PerfCounterQueryHandler getInstance()
public boolean addCounterToQuery(PerfDataUtil.PerfCounter counter)
counter - A PerfCounter object.public boolean addCounterToQuery(PerfDataUtil.PerfCounter counter, String key)
counter - A PerfCounter object.key - A string used as the key for the query. All counters with this key
will be updated when any single counter is updated.public boolean removeCounterFromQuery(PerfDataUtil.PerfCounter counter)
counter - A PerfCounter objectpublic boolean removeCounterFromQuery(PerfDataUtil.PerfCounter counter, String key)
counter - A PerfCounter objectkey - A string used as the key for the query. All counters with this key
will be updated when any single counter is updated.public void removeAllCountersFromQuery(String queryKey)
queryKey - The counter object to remove counters frompublic void removeAllCounters()
public long updateQuery(String key)
key - The key of the query to update.public long queryCounter(PerfDataUtil.PerfCounter counter)
counter - The counter to queryCopyright © 2010–2019 oshi. All rights reserved.