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

pack-priv abstract Class WorkerTask

extends AtomicInteger
implements Runnable
Class Inheritance
All Implemented Interfaces
java.lang.Runnable
Imports
io.vertx.core.spi.metrics.PoolMetrics, java.util.concurrent.atomic.AtomicInteger

Base class for context worker tasks. The cancellation / after task uses an atomic integer to avoid race when executing the optional cancel continuation
Author
Julien Viet

Field Summary

Modifier and TypeField and Description
private final PoolMetrics<T>
private Runnable
private final Object

Constructor Summary

AccessConstructor and Description
pack-priv
WorkerTask(PoolMetrics<T> metrics, Object queueMetric)

Method Summary

Modifier and TypeMethod and Description
protected abstract void
pack-priv void
onCompletion(Runnable
the command execute when the task completes
continuation
)

Set a continuation to be execution on task completion.

pack-priv void
reject()

Reject the task.

public void
run()

Implements java.lang.Runnable.run.

Runs this operation.

Inherited from java.util.concurrent.atomic.AtomicInteger:
accumulateAndGetaddAndGetcompareAndExchangecompareAndExchangeAcquirecompareAndExchangeReleasecompareAndSetdecrementAndGetdoubleValuefloatValuegetgetAcquiregetAndAccumulategetAndAddgetAndDecrementgetAndIncrementgetAndSetgetAndUpdategetOpaquegetPlainincrementAndGetintValuelazySetlongValuesetsetOpaquesetPlainsetReleasetoStringupdateAndGetweakCompareAndSetweakCompareAndSetAcquireweakCompareAndSetPlainweakCompareAndSetReleaseweakCompareAndSetVolatile

Field Detail

metricsback to summary
private final PoolMetrics<T> metrics
onCompleteback to summary
private Runnable onComplete
queueMetricback to summary
private final Object queueMetric

Constructor Detail

WorkerTaskback to summary
pack-priv WorkerTask(PoolMetrics<T> metrics, Object queueMetric)

Method Detail

executeback to summary
protected abstract void execute()
onCompletionback to summary
pack-priv void onCompletion(Runnable continuation)

Set a continuation to be execution on task completion.

Parameters
continuation:Runnable

the command execute when the task completes

rejectback to summary
pack-priv void reject()

Reject the task.

runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override