docs/doc/reference/com/google/android/exoplayer2/util/RunnableFutureTask.html
Package com.google.android.exoplayer2.util
Type Parameters:R - The type of the result.E - The type of any ExecutionException cause.All Implemented Interfaces:Runnable, Future<R>, RunnableFuture<R>
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public abstract classRunnableFutureTask\<R,E extends [Exception](https://developer.android.com/reference/java/lang/Exception.html "class or interface in java.lang")\>extends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[RunnableFuture](https://developer.android.com/reference/java/util/concurrent/RunnableFuture.html "class or interface in java.util.concurrent")<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.
Constructors | Modifier | Constructor | Description |
| --- | --- | --- |
| protected | RunnableFutureTask() |
Deprecated.
|
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| void | blockUntilFinished() |
Deprecated.
Blocks until the task has finished, or has been canceled without having been started.
|
| void | blockUntilStarted() |
Deprecated.
Blocks until the task has started, or has been canceled without having been started.
|
| boolean | cancel(boolean interruptIfRunning) |
Deprecated.
|
| protected void | cancelWork() |
Deprecated.
Cancels any work being done by doWork().
|
| protected abstract R | doWork() |
Deprecated.
Performs the work or computation.
|
| R | get() |
Deprecated.
|
| R | get(long timeout, TimeUnit unit) |
Deprecated.
|
| boolean | isCancelled() |
Deprecated.
|
| boolean | isDone() |
Deprecated.
|
| void | run() |
Deprecated.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
protected RunnableFutureTask()
Deprecated.
-
public final void blockUntilStarted()
Deprecated.
Blocks until the task has started, or has been canceled without having been started.
-
public final void blockUntilFinished()
Deprecated.
Blocks until the task has finished, or has been canceled without having been started.
-
public final[R](RunnableFutureTask.html "type parameter in RunnableFutureTask")get()
throws[ExecutionException](https://developer.android.com/reference/java/util/concurrent/ExecutionException.html "class or interface in java.util.concurrent"),[InterruptedException](https://developer.android.com/reference/java/lang/InterruptedException.html "class or interface in java.lang")
Deprecated.
Specified by:get in interface Future<R>Throws:ExecutionException``InterruptedException
-
public final[R](RunnableFutureTask.html "type parameter in RunnableFutureTask")get(long timeout,[TimeUnit](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html "class or interface in java.util.concurrent")unit)
throws[ExecutionException](https://developer.android.com/reference/java/util/concurrent/ExecutionException.html "class or interface in java.util.concurrent"),[InterruptedException](https://developer.android.com/reference/java/lang/InterruptedException.html "class or interface in java.lang"),[TimeoutException](https://developer.android.com/reference/java/util/concurrent/TimeoutException.html "class or interface in java.util.concurrent")
Deprecated.
Specified by:get in interface Future<R>Throws:ExecutionException``InterruptedException``TimeoutException
-
public final boolean cancel(boolean interruptIfRunning)
Deprecated.
Specified by:cancel in interface Future<R>
-
public final boolean isDone()
Deprecated.
Specified by:isDone in interface Future<R>
-
public final boolean isCancelled()
Deprecated.
Specified by:isCancelled in interface Future<R>
-
public final void run()
Deprecated.
Specified by:run in interface RunnableSpecified by:run in interface RunnableFuture<R>
-
protected abstract[R](RunnableFutureTask.html "type parameter in RunnableFutureTask")doWork()
throws[E](RunnableFutureTask.html "type parameter in RunnableFutureTask")extends[Exception](https://developer.android.com/reference/java/lang/Exception.html "class or interface in java.lang")
Deprecated.
Performs the work or computation.
Returns:The computed result.Throws:E - If an error occurred.E extends Exception
-
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.