| Modifier and Type | Method and Description |
|---|---|
void |
addAndGet(long value,
Handler<AsyncResult<Long>> resultHandler)
Add the value to the counter atomically and return the new count
|
rx.Observable<Long> |
addAndGetObservable(long value)
Add the value to the counter atomically and return the new count
|
void |
compareAndSet(long expected,
long value,
Handler<AsyncResult<Boolean>> resultHandler)
Set the counter to the specified value only if the current value is the expectec value.
|
rx.Observable<Boolean> |
compareAndSetObservable(long expected,
long value)
Set the counter to the specified value only if the current value is the expectec value.
|
void |
decrementAndGet(Handler<AsyncResult<Long>> resultHandler)
Decrement the counter atomically and return the new count
|
rx.Observable<Long> |
decrementAndGetObservable()
Decrement the counter atomically and return the new count
|
void |
get(Handler<AsyncResult<Long>> resultHandler)
Get the current value of the counter
|
void |
getAndAdd(long value,
Handler<AsyncResult<Long>> resultHandler)
Add the value to the counter atomically and return the value before the add
|
rx.Observable<Long> |
getAndAddObservable(long value)
Add the value to the counter atomically and return the value before the add
|
void |
getAndIncrement(Handler<AsyncResult<Long>> resultHandler)
Increment the counter atomically and return the value before the increment.
|
rx.Observable<Long> |
getAndIncrementObservable()
Increment the counter atomically and return the value before the increment.
|
Object |
getDelegate() |
rx.Observable<Long> |
getObservable()
Get the current value of the counter
|
void |
incrementAndGet(Handler<AsyncResult<Long>> resultHandler)
Increment the counter atomically and return the new count
|
rx.Observable<Long> |
incrementAndGetObservable()
Increment the counter atomically and return the new count
|
static Counter |
newInstance(Counter arg) |
public Counter(Counter delegate)
public Object getDelegate()
public void get(Handler<AsyncResult<Long>> resultHandler)
resultHandler - handler which will be passed the valuepublic rx.Observable<Long> getObservable()
public void incrementAndGet(Handler<AsyncResult<Long>> resultHandler)
resultHandler - handler which will be passed the valuepublic rx.Observable<Long> incrementAndGetObservable()
public void getAndIncrement(Handler<AsyncResult<Long>> resultHandler)
resultHandler - handler which will be passed the valuepublic rx.Observable<Long> getAndIncrementObservable()
public void decrementAndGet(Handler<AsyncResult<Long>> resultHandler)
resultHandler - handler which will be passed the valuepublic rx.Observable<Long> decrementAndGetObservable()
public void addAndGet(long value,
Handler<AsyncResult<Long>> resultHandler)
value - the value to addresultHandler - handler which will be passed the valuepublic rx.Observable<Long> addAndGetObservable(long value)
value - the value to addpublic void getAndAdd(long value,
Handler<AsyncResult<Long>> resultHandler)
value - the value to addresultHandler - handler which will be passed the valuepublic rx.Observable<Long> getAndAddObservable(long value)
value - the value to addpublic void compareAndSet(long expected,
long value,
Handler<AsyncResult<Boolean>> resultHandler)
expected - the expected valuevalue - the new valueresultHandler - the handler will be passed true on successpublic rx.Observable<Boolean> compareAndSetObservable(long expected, long value)
expected - the expected valuevalue - the new valueCopyright © 2015. All rights reserved.