Class Counter
- All Implemented Interfaces:
MutinyDelegate
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- Tim Fox
- See Also:
-
Counter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<Long>addAndGet(long value) Add the value to the counter atomically and return the new countaddAndGetAndAwait(long value) Add the value to the counter atomically and return the new countaddAndGetAndForget(long value) Add the value to the counter atomically and return the new countio.smallrye.mutiny.Uni<Boolean>compareAndSet(long expected, long value) Set the counter to the specified value only if the current value is the expectec value.compareAndSetAndAwait(long expected, long value) Set the counter to the specified value only if the current value is the expectec value.compareAndSetAndForget(long expected, long value) Set the counter to the specified value only if the current value is the expectec value.io.smallrye.mutiny.Uni<Long>Decrement the counter atomically and return the new countDecrement the counter atomically and return the new countDecrement the counter atomically and return the new countbooleanio.smallrye.mutiny.Uni<Long>get()Get the current value of the counterio.smallrye.mutiny.Uni<Long>getAndAdd(long value) Add the value to the counter atomically and return the value before the addgetAndAddAndAwait(long value) Add the value to the counter atomically and return the value before the addgetAndAddAndForget(long value) Add the value to the counter atomically and return the value before the addGet the current value of the counterGet the current value of the counterio.smallrye.mutiny.Uni<Long>Increment the counter atomically and return the value before the increment.Increment the counter atomically and return the value before the increment.Increment the counter atomically and return the value before the increment.io.vertx.core.shareddata.CounterGet the delegate instance.inthashCode()io.smallrye.mutiny.Uni<Long>Increment the counter atomically and return the new countIncrement the counter atomically and return the new countIncrement the counter atomically and return the new countstatic CounternewInstance(io.vertx.core.shareddata.Counter delegate) Creates a new instance of theCounter.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
Counter
-
Method Details
-
getDelegate
public io.vertx.core.shareddata.Counter getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
get
Get the current value of the counterUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
Counter.get()
-
getAndAwait
Get the current value of the counterUnlike the bare Vert.x variant, this method returns a
Long. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Returns:
- The operation result
- See Also:
-
Counter.get()
-
getAndForget
Get the current value of the counterUnlike the bare Vert.x variant, this method ignores the
Longresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
Counter.get()
-
incrementAndGet
Increment the counter atomically and return the new countUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
Counter.incrementAndGet()
-
incrementAndGetAndAwait
Increment the counter atomically and return the new countUnlike the bare Vert.x variant, this method returns a
Long. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Returns:
- The operation result
- See Also:
-
Counter.incrementAndGet()
-
incrementAndGetAndForget
Increment the counter atomically and return the new countUnlike the bare Vert.x variant, this method ignores the
Longresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
Counter.incrementAndGet()
-
getAndIncrement
Increment the counter atomically and return the value before the increment.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
Counter.getAndIncrement()
-
getAndIncrementAndAwait
Increment the counter atomically and return the value before the increment.Unlike the bare Vert.x variant, this method returns a
Long. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Returns:
- The operation result
- See Also:
-
Counter.getAndIncrement()
-
getAndIncrementAndForget
Increment the counter atomically and return the value before the increment.Unlike the bare Vert.x variant, this method ignores the
Longresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
Counter.getAndIncrement()
-
decrementAndGet
Decrement the counter atomically and return the new countUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
Counter.decrementAndGet()
-
decrementAndGetAndAwait
Decrement the counter atomically and return the new countUnlike the bare Vert.x variant, this method returns a
Long. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Returns:
- The operation result
- See Also:
-
Counter.decrementAndGet()
-
decrementAndGetAndForget
Decrement the counter atomically and return the new countUnlike the bare Vert.x variant, this method ignores the
Longresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
Counter.decrementAndGet()
-
addAndGet
Add the value to the counter atomically and return the new countUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
value- the value to add- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
Counter.addAndGet(long)
-
addAndGetAndAwait
Add the value to the counter atomically and return the new countUnlike the bare Vert.x variant, this method returns a
Long. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
value- the value to add- Returns:
- The operation result
- See Also:
-
Counter.addAndGet(long)
-
addAndGetAndForget
Add the value to the counter atomically and return the new countUnlike the bare Vert.x variant, this method ignores the
Longresult or any failure.- Parameters:
value- the value to add- Returns:
- The current instance to chain operations if needed.
- See Also:
-
Counter.addAndGet(long)
-
getAndAdd
Add the value to the counter atomically and return the value before the addUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
value- the value to add- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
Counter.getAndAdd(long)
-
getAndAddAndAwait
Add the value to the counter atomically and return the value before the addUnlike the bare Vert.x variant, this method returns a
Long. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
value- the value to add- Returns:
- The operation result
- See Also:
-
Counter.getAndAdd(long)
-
getAndAddAndForget
Add the value to the counter atomically and return the value before the addUnlike the bare Vert.x variant, this method ignores the
Longresult or any failure.- Parameters:
value- the value to add- Returns:
- The current instance to chain operations if needed.
- See Also:
-
Counter.getAndAdd(long)
-
compareAndSet
Set the counter to the specified value only if the current value is the expectec value. This happens atomically.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
expected- the expected valuevalue- the new value- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
Counter.compareAndSet(long, long)
-
compareAndSetAndAwait
Set the counter to the specified value only if the current value is the expectec value. This happens atomically.Unlike the bare Vert.x variant, this method returns a
Boolean. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
expected- the expected valuevalue- the new value- Returns:
- The operation result
- See Also:
-
Counter.compareAndSet(long, long)
-
compareAndSetAndForget
Set the counter to the specified value only if the current value is the expectec value. This happens atomically.Unlike the bare Vert.x variant, this method ignores the
Booleanresult or any failure.- Parameters:
expected- the expected valuevalue- the new value- Returns:
- The current instance to chain operations if needed.
- See Also:
-
Counter.compareAndSet(long, long)
-
hashCode
public int hashCode() -
equals
-
toString
-