Class RunnableFutureTask<R,​E extends Exception>

  • Type Parameters:
    R - The type of the result.
    E - The type of any ExecutionException cause.
    All Implemented Interfaces:
    Runnable, Future<R>, RunnableFuture<R>

    @Deprecated
    public abstract class RunnableFutureTask<R,​E extends Exception>
    extends Object
    implements RunnableFuture<R>
    Deprecated.
    com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
    A RunnableFuture that supports additional uninterruptible operations to query whether execution has started and finished.
    • Constructor Detail

      • RunnableFutureTask

        protected RunnableFutureTask()
        Deprecated.
    • Method Detail

      • blockUntilStarted

        public final void blockUntilStarted()
        Deprecated.
        Blocks until the task has started, or has been canceled without having been started.
      • blockUntilFinished

        public final void blockUntilFinished()
        Deprecated.
        Blocks until the task has finished, or has been canceled without having been started.
      • cancel

        public final boolean cancel​(boolean interruptIfRunning)
        Deprecated.
        Specified by:
        cancel in interface Future<R>
      • isDone

        public final boolean isDone()
        Deprecated.
        Specified by:
        isDone in interface Future<R>
      • isCancelled

        public final boolean isCancelled()
        Deprecated.
        Specified by:
        isCancelled in interface Future<R>
      • doWork

        protected abstract R doWork()
                             throws E extends Exception
        Deprecated.
        Performs the work or computation.
        Returns:
        The computed result.
        Throws:
        E - If an error occurred.
        E extends Exception
      • cancelWork

        protected void cancelWork()
        Deprecated.
        Cancels any work being done by doWork(). If doWork() is currently executing then the thread on which it's executing may be interrupted immediately after this method returns.

        The default implementation does nothing.