public class CounterService
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected JChannel |
ch |
protected COUNTER |
counter_prot |
| 构造器和说明 |
|---|
CounterService(JChannel ch) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
deleteCounter(java.lang.String name)
Deletes a counter instance (on the coordinator)
|
java.lang.String |
dumpPendingRequests() |
Counter |
getOrCreateCounter(java.lang.String name,
long initial_value)
Returns an existing counter, or creates a new one if none exists
|
java.lang.String |
printCounters() |
void |
setChannel(JChannel ch) |
public CounterService(JChannel ch)
public void setChannel(JChannel ch)
public Counter getOrCreateCounter(java.lang.String name, long initial_value)
name - Name of the counter, different counters have to have different namesinitial_value - The initial value of a new counter if there is no existing counter. Ignored
if the counter already existspublic void deleteCounter(java.lang.String name)
name - The name of the counter. No-op if the counter doesn't existpublic java.lang.String printCounters()
public java.lang.String dumpPendingRequests()