Top Fields Constructors Methods
io.reactivex.internal.schedulers

public final Class ScheduledRunnable

extends AtomicReferenceArray<Object>
implements Runnable, Callable<Object>, Disposable
Class Inheritance
All Implemented Interfaces
io.reactivex.disposables.Disposable, java.util.concurrent.Callable, java.lang.Runnable
Imports
java.util.concurrent.*, java.util.concurrent.atomic.AtomicReferenceArray, io.reactivex.disposables.Disposable, io.reactivex.internal.disposables.DisposableContainer, io.reactivex.plugins.RxJavaPlugins

Field Summary

Modifier and TypeField and Description
pack-priv final Runnable
pack-priv static final Object
ASYNC_DISPOSED

Indicates the dispose() was called from another thread.

pack-priv static final Object
pack-priv static final int
pack-priv static final Object
PARENT_DISPOSED

Indicates that the parent tracking this task has been notified about its completion.

pack-priv static final int
private static final long
pack-priv static final Object
SYNC_DISPOSED

Indicates the dispose() was called from within the run/call method.

pack-priv static final int

Constructor Summary

AccessConstructor and Description
public
ScheduledRunnable(Runnable
the runnable to wrap, not-null (not verified)
actual
,
DisposableContainer
the parent tracking container or null if none
parent
)

Creates a ScheduledRunnable by wrapping the given action and setting up the optional parent.

Method Summary

Modifier and TypeMethod and Description
public Object
call()

Implements java.util.concurrent.Callable.call.

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

Implements io.reactivex.disposables.Disposable.dispose.

Dispose the resource, the operation should be idempotent.
public boolean
isDisposed()

Implements io.reactivex.disposables.Disposable.isDisposed.

Returns true if this resource has been disposed.
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.
public void
Inherited from java.util.concurrent.atomic.AtomicReferenceArray:
accumulateAndGetcompareAndExchangecompareAndExchangeAcquirecompareAndExchangeReleasecompareAndSetgetgetAcquiregetAndAccumulategetAndSetgetAndUpdategetOpaquegetPlainlazySetlengthsetsetOpaquesetPlainsetReleasetoStringupdateAndGetweakCompareAndSetweakCompareAndSetAcquireweakCompareAndSetPlainweakCompareAndSetReleaseweakCompareAndSetVolatile

Field Detail

actualback to summary
pack-priv final Runnable actual
ASYNC_DISPOSEDback to summary
pack-priv static final Object ASYNC_DISPOSED

Indicates the dispose() was called from another thread.

DONEback to summary
pack-priv static final Object DONE
FUTURE_INDEXback to summary
pack-priv static final int FUTURE_INDEX
PARENT_DISPOSEDback to summary
pack-priv static final Object PARENT_DISPOSED

Indicates that the parent tracking this task has been notified about its completion.

PARENT_INDEXback to summary
pack-priv static final int PARENT_INDEX
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.concurrent.atomic.AtomicReferenceArray.serialVersionUID.

SYNC_DISPOSEDback to summary
pack-priv static final Object SYNC_DISPOSED

Indicates the dispose() was called from within the run/call method.

THREAD_INDEXback to summary
pack-priv static final int THREAD_INDEX

Constructor Detail

ScheduledRunnableback to summary
public ScheduledRunnable(Runnable actual, DisposableContainer parent)

Creates a ScheduledRunnable by wrapping the given action and setting up the optional parent.

Parameters
actual:Runnable

the runnable to wrap, not-null (not verified)

parent:DisposableContainer

the parent tracking container or null if none

Method Detail

callback to summary
public Object 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:Object

computed result

Annotations
@Override
disposeback to summary
public void dispose()

Implements io.reactivex.disposables.Disposable.dispose.

Doc from io.reactivex.disposables.Disposable.dispose.

Dispose the resource, the operation should be idempotent.

Annotations
@Override
isDisposedback to summary
public boolean isDisposed()

Implements io.reactivex.disposables.Disposable.isDisposed.

Doc from io.reactivex.disposables.Disposable.isDisposed.

Returns true if this resource has been disposed.

Returns:boolean

true if this resource has been 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
public void setFuture(Future<?> f)