public class AnySharedCountersImpl extends Object implements SharedCounters
RmiSharedCountersImpl).| Constructor and Description |
|---|
AnySharedCountersImpl(String name,
int type)
Create a facade with the specified name and transport type.
|
| Modifier and Type | Method and Description |
|---|---|
long |
add(int index,
long i)
Implements
SharedCounters.add(int,long). |
static SharedCounters |
bind(String name,
int type,
long[] initialValues)
Binds a fixed number of shared counters with the specified initial
values in the location appropriate to the transport type
(rmiregistry for RMI).
|
void |
decrement(int index)
Implements
SharedCounters.decrement(int). |
long |
decrementAndRead(int index)
Implements
SharedCounters.decrementAndRead(int). |
long[] |
getCounterValues()
Implements
SharedCounters.getCounterValues(). |
void |
increment(int index)
Implements
SharedCounters.increment(int). |
long |
incrementAndRead(int index)
Implements
SharedCounters.incrementAndRead(int). |
static SharedCounters |
lookup(String name,
int type)
Looks up the shared counters in the location appropriate to the transport type
(rmiregistry for RMI).
|
long |
read(int index)
Implements
SharedCounters.read(int). |
void |
setIfLarger(int index,
long i)
Implements
SharedCounters.setIfLarger(int,long). |
void |
setIfSmaller(int index,
long i)
Implements
SharedCounters.setIfSmaller(int,long). |
protected void |
setRmiCounters(RmiSharedCounters rmisc) |
long |
subtract(int index,
long i)
Implements
SharedCounters.subtract(int,long). |
void |
zero(int index)
Implements
SharedCounters.zero(int). |
public AnySharedCountersImpl(String name, int type)
name - the name of the set of shared counters.type - the transport type of the set of shared counters.protected void setRmiCounters(RmiSharedCounters rmisc)
public static SharedCounters bind(String name, int type, long[] initialValues)
initialValues - the initial values for the counters.public static SharedCounters lookup(String name, int type)
null if not there.public long read(int index)
SharedCounters.read(int).read in interface SharedCounterspublic long add(int index,
long i)
SharedCounters.add(int,long).add in interface SharedCounterspublic long subtract(int index,
long i)
SharedCounters.subtract(int,long).subtract in interface SharedCounterspublic void increment(int index)
SharedCounters.increment(int).increment in interface SharedCounterspublic void decrement(int index)
SharedCounters.decrement(int).decrement in interface SharedCounterspublic long incrementAndRead(int index)
SharedCounters.incrementAndRead(int).incrementAndRead in interface SharedCounterspublic long decrementAndRead(int index)
SharedCounters.decrementAndRead(int).decrementAndRead in interface SharedCounterspublic void zero(int index)
SharedCounters.zero(int).zero in interface SharedCounterspublic void setIfLarger(int index,
long i)
SharedCounters.setIfLarger(int,long).setIfLarger in interface SharedCounterspublic void setIfSmaller(int index,
long i)
SharedCounters.setIfSmaller(int,long).setIfSmaller in interface SharedCounterspublic long[] getCounterValues()
SharedCounters.getCounterValues().getCounterValues in interface SharedCountersCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.