public class SharedCountersImpl extends Object implements SharedCounters
RmiSharedCountersImpl
that overlay a transport type for cross-vm access and provide
synchronization.| Constructor and Description |
|---|
SharedCountersImpl(long[] initialValues)
Creates an instance with its counters set to the provided initial values.
|
| Modifier and Type | Method and Description |
|---|---|
long |
add(int index,
long i)
Implements
SharedCounters.add(int,long). |
void |
decrement(int index)
Implements
SharedCounters.decrement(int). |
long |
decrementAndRead(int index)
Implements
SharedCounters.incrementAndRead(int). |
long[] |
getCounterValues()
Implements
SharedCounters.getCounterValues(). |
void |
increment(int index)
Implements
SharedCounters.increment(int). |
long |
incrementAndRead(int index)
Increments the counter at index by 1 and returns the new count.
|
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). |
long |
subtract(int index,
long i)
Implements
SharedCounters.subtract(int,long). |
void |
zero(int index)
Implements
SharedCounters.zero(int). |
public SharedCountersImpl(long[] initialValues)
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)
incrementAndRead in interface SharedCounterspublic long decrementAndRead(int index)
SharedCounters.incrementAndRead(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.