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

pack-priv Class TimerImpl

extends FutureImpl<Void>
implements FutureListener<Void>, Timer
Class Inheritance
All Implemented Interfaces
io.vertx.core.Timer, io.vertx.core.Future, io.vertx.core.AsyncResult, io.netty.util.concurrent.FutureListener, io.netty.util.concurrent.GenericFutureListener, java.util.EventListener
Imports
io.netty.util.concurrent.FutureListener, io.vertx.core.Timer, io.vertx.core.impl.future.FutureImpl

A timer task as a vertx future.
Author
Julien Viet

Field Summary

Modifier and TypeField and Description
private final ScheduledFuture<Void>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
cancel()

Implements io.vertx.core.Timer.cancel.

Attempt to cancel the timer task, when the timer is cancelled, the timer is failed with a java.util.concurrent.CancellationException.

public void
operationComplete(Future<Void>
the source Future which called this callback
future
)

Implements io.netty.util.concurrent.GenericFutureListener.operationComplete.

Invoked when the operation associated with the Future has been completed.

Inherited from io.vertx.core.impl.future.FutureImpl:
addListenercausefailedformatValueisCompleteonCompleteonCompleteonFailureonSuccessremoveListenerresultsucceededtoStringtryCompletetryFail

Field Detail

delegateback to summary
private final ScheduledFuture<Void> delegate

Constructor Detail

TimerImplback to summary
pack-priv TimerImpl(ContextInternal ctx, ScheduledFuture<Void> delegate)

Method Detail

cancelback to summary
public boolean cancel()

Implements io.vertx.core.Timer.cancel.

Doc from io.vertx.core.Timer.cancel.

Attempt to cancel the timer task, when the timer is cancelled, the timer is failed with a java.util.concurrent.CancellationException.

Returns:boolean

true when the future was cancelled and the timeout didn't fire.

Annotations
@Override
operationCompleteback to summary
public void operationComplete(Future<Void> future)

Implements io.netty.util.concurrent.GenericFutureListener.operationComplete.

Doc from io.netty.util.concurrent.GenericFutureListener.operationComplete.

Invoked when the operation associated with the Future has been completed.

Parameters
future:Future<Void>

the source Future which called this callback

Annotations
@Override