Top Fields Constructors Methods
io.vertx.core.shareddata.impl

public Class AsynchronousCounter

extends Object
implements Counter
Class Inheritance
All Implemented Interfaces
io.vertx.core.shareddata.Counter
Imports
io.vertx.core.Future, .Promise, io.vertx.core.impl.ContextInternal, .VertxInternal, io.vertx.core.shareddata.Counter, java.util.concurrent.atomic.AtomicLong

Author
Tim Fox

Field Summary

Modifier and TypeField and Description
private final AtomicLong
private final VertxInternal

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public Future<Long>
addAndGet(long value)

Implements io.vertx.core.shareddata.Counter.addAndGet.

Same as addAndGet(long, Handler) but returns a Future of the asynchronous result

public Future<Boolean>
compareAndSet(long expected, long value)

Implements io.vertx.core.shareddata.Counter.compareAndSet.

Same as compareAndSet(long, long, Handler) but returns a Future of the asynchronous result

public Future<Long>
decrementAndGet()

Implements io.vertx.core.shareddata.Counter.decrementAndGet.

Same as decrementAndGet(Handler) but returns a Future of the asynchronous result

public Future<Long>
get()

Implements io.vertx.core.shareddata.Counter.get.

Same as get(Handler) but returns a Future of the asynchronous result

public Future<Long>
getAndAdd(long value)

Implements io.vertx.core.shareddata.Counter.getAndAdd.

Same as getAndAdd(long, Handler) but returns a Future of the asynchronous result

public Future<Long>
getAndIncrement()

Implements io.vertx.core.shareddata.Counter.getAndIncrement.

Same as getAndIncrement(Handler) but returns a Future of the asynchronous result

public Future<Long>
incrementAndGet()

Implements io.vertx.core.shareddata.Counter.incrementAndGet.

Same as incrementAndGet(Handler) but returns a Future of the asynchronous result

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

counterback to summary
private final AtomicLong counter
vertxback to summary
private final VertxInternal vertx

Constructor Detail

AsynchronousCounterback to summary
public AsynchronousCounter(VertxInternal vertx)
AsynchronousCounterback to summary
public AsynchronousCounter(VertxInternal vertx, AtomicLong counter)

Method Detail

addAndGetback to summary
public Future<Long> addAndGet(long value)

Implements io.vertx.core.shareddata.Counter.addAndGet.

Doc from io.vertx.core.shareddata.Counter.addAndGet.

Same as addAndGet(long, Handler) but returns a Future of the asynchronous result

Annotations
@Override
compareAndSetback to summary
public Future<Boolean> compareAndSet(long expected, long value)

Implements io.vertx.core.shareddata.Counter.compareAndSet.

Doc from io.vertx.core.shareddata.Counter.compareAndSet.

Same as compareAndSet(long, long, Handler) but returns a Future of the asynchronous result

Annotations
@Override
decrementAndGetback to summary
public Future<Long> decrementAndGet()

Implements io.vertx.core.shareddata.Counter.decrementAndGet.

Doc from io.vertx.core.shareddata.Counter.decrementAndGet.

Same as decrementAndGet(Handler) but returns a Future of the asynchronous result

Annotations
@Override
getback to summary
public Future<Long> get()

Implements io.vertx.core.shareddata.Counter.get.

Doc from io.vertx.core.shareddata.Counter.get.

Same as get(Handler) but returns a Future of the asynchronous result

Annotations
@Override
getAndAddback to summary
public Future<Long> getAndAdd(long value)

Implements io.vertx.core.shareddata.Counter.getAndAdd.

Doc from io.vertx.core.shareddata.Counter.getAndAdd.

Same as getAndAdd(long, Handler) but returns a Future of the asynchronous result

Annotations
@Override
getAndIncrementback to summary
public Future<Long> getAndIncrement()

Implements io.vertx.core.shareddata.Counter.getAndIncrement.

Doc from io.vertx.core.shareddata.Counter.getAndIncrement.

Same as getAndIncrement(Handler) but returns a Future of the asynchronous result

Annotations
@Override
incrementAndGetback to summary
public Future<Long> incrementAndGet()

Implements io.vertx.core.shareddata.Counter.incrementAndGet.

Doc from io.vertx.core.shareddata.Counter.incrementAndGet.

Same as incrementAndGet(Handler) but returns a Future of the asynchronous result

Annotations
@Override