| Constructor and Description |
|---|
ClusteredCounterImpl(Vertx vertx,
org.jgroups.blocks.atomic.Counter counter) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAndGet(long delta,
Handler<AsyncResult<Long>> handler)
Add the value to the counter atomically and return the new count
|
void |
compareAndSet(long expected,
long update,
Handler<AsyncResult<Boolean>> handler)
Set the counter to the specified value only if the current value is the expectec value.
|
void |
decrementAndGet(Handler<AsyncResult<Long>> handler)
Decrement the counter atomically and return the new count
|
void |
get(Handler<AsyncResult<Long>> handler)
Get the current value of the counter
|
void |
getAndAdd(long delta,
Handler<AsyncResult<Long>> handler)
Add the value to the counter atomically and return the value before the add
|
void |
getAndIncrement(Handler<AsyncResult<Long>> handler)
Increment the counter atomically and return the value before the increment.
|
void |
incrementAndGet(Handler<AsyncResult<Long>> handler)
Increment the counter atomically and return the new count
|
public ClusteredCounterImpl(Vertx vertx, org.jgroups.blocks.atomic.Counter counter)
public void get(Handler<AsyncResult<Long>> handler)
Counterpublic void incrementAndGet(Handler<AsyncResult<Long>> handler)
CounterincrementAndGet in interface Counterhandler - handler which will be passed the valuepublic void getAndIncrement(Handler<AsyncResult<Long>> handler)
CountergetAndIncrement in interface Counterhandler - handler which will be passed the valuepublic void decrementAndGet(Handler<AsyncResult<Long>> handler)
CounterdecrementAndGet in interface Counterhandler - handler which will be passed the valuepublic void addAndGet(long delta,
Handler<AsyncResult<Long>> handler)
Counterpublic void getAndAdd(long delta,
Handler<AsyncResult<Long>> handler)
Counterpublic void compareAndSet(long expected,
long update,
Handler<AsyncResult<Boolean>> handler)
CountercompareAndSet in interface Counterexpected - the expected valueupdate - the new valuehandler - the handler will be passed true on successCopyright © 2015. All rights reserved.