Top Description Fields Constructors Methods
reactor.core.scheduler

pack-priv final Class PeriodicWorkerTask

extends Object
implements Runnable, Disposable, Callable<Void>
Class Inheritance
All Implemented Interfaces
java.util.concurrent.Callable, reactor.core.Disposable, java.lang.Runnable
Imports
reactor.core.Disposable, reactor.util.annotation.Nullable, java.util.concurrent.Callable, .Future, .FutureTask, java.util.concurrent.atomic.AtomicReferenceFieldUpdater

A runnable task for Scheduler Workers that can run periodically

Field Summary

Modifier and TypeField and Description
pack-priv static final Future<Void>
pack-priv static final Disposable.Composite
pack-priv volatile Future<?>
pack-priv static final AtomicReferenceFieldUpdater<PeriodicWorkerTask, Future<V>>
pack-priv volatile Disposable.Composite
pack-priv static final AtomicReferenceFieldUpdater<PeriodicWorkerTask, Disposable.Composite>
pack-priv final Runnable
pack-priv Thread

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Void
call()

Implements java.util.concurrent.Callable.call.

Computes a result, or throws an exception if unable to do so.
public void
dispose()

Implements reactor.core.Disposable.dispose.

Cancel or dispose the underlying task or resource.
public boolean
isDisposed()

Overrides default reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.
pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CANCELLEDback to summary
pack-priv static final Future<Void> CANCELLED
DISPOSEDback to summary
pack-priv static final Disposable.Composite DISPOSED
futureback to summary
pack-priv volatile Future<?> future
FUTUREback to summary
pack-priv static final AtomicReferenceFieldUpdater<PeriodicWorkerTask, Future<V>> FUTURE
parentback to summary
pack-priv volatile Disposable.Composite parent
PARENTback to summary
pack-priv static final AtomicReferenceFieldUpdater<PeriodicWorkerTask, Disposable.Composite> PARENT
taskback to summary
pack-priv final Runnable task
threadback to summary
pack-priv Thread thread

Constructor Detail

PeriodicWorkerTaskback to summary
pack-priv PeriodicWorkerTask(Runnable task, Disposable.Composite parent)

Method Detail

callback to summary
public Void call()

Implements java.util.concurrent.Callable.call.

Doc from java.util.concurrent.Callable.call.

Computes a result, or throws an exception if unable to do so.

Returns:Void

computed result

Annotations
@Override
@Nullable
disposeback to summary
public void dispose()

Implements reactor.core.Disposable.dispose.

Doc from reactor.core.Disposable.dispose.

Cancel or dispose the underlying task or resource.

Implementations are required to make this method idempotent.

Annotations
@Override
isDisposedback to summary
public boolean isDisposed()

Overrides default reactor.core.Disposable.isDisposed.

Doc from reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.

Implementations are not required to track disposition and as such may never return true even when disposed. However, they MUST only return true when there's a guarantee the resource or task is disposed.

Returns:boolean

true when there's a guarantee the resource or task is disposed.

Annotations
@Override
runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override
setFutureback to summary
pack-priv void setFuture(Future<?> f)