public class CounterService
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Channel |
ch |
protected COUNTER |
counter_prot |
Constructor and Description |
---|
CounterService(Channel ch) |
Modifier and Type | Method and Description |
---|---|
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(Channel ch) |
public CounterService(Channel ch)
public void setChannel(Channel 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()
Copyright © 1998-2020 Red Hat. All Rights Reserved.