Methods
addAndGet
- addAndGet(value: number): PromiseLike<number>
- addAndGet(value: number, resultHandler: ((res: AsyncResult<number>) => void) | Handler<AsyncResult<number>>): void
-
Parameters
Returns PromiseLike<number>
-
Parameters
Returns void
compareAndSet
- compareAndSet(expected: number, value: number): PromiseLike<boolean>
- compareAndSet(expected: number, value: number, resultHandler: ((res: AsyncResult<boolean>) => void) | Handler<AsyncResult<boolean>>): void
-
Parameters
-
expected: number
-
value: number
Returns PromiseLike<boolean>
-
Parameters
-
expected: number
-
value: number
-
Returns void
decrementAndGet
-
Returns PromiseLike<number>
-
Parameters
Returns void
get
-
Returns PromiseLike<number>
-
Parameters
Returns void
getAndAdd
- getAndAdd(value: number): PromiseLike<number>
- getAndAdd(value: number, resultHandler: ((res: AsyncResult<number>) => void) | Handler<AsyncResult<number>>): void
-
Parameters
Returns PromiseLike<number>
-
Parameters
Returns void
getAndIncrement
-
Returns PromiseLike<number>
-
Parameters
Returns void
incrementAndGet
-
Returns PromiseLike<number>
-
Parameters
Returns void
An asynchronous counter that can be used to across the cluster to maintain a consistent count.