Class RunnableFutureTask<R,E extends Exception>
- java.lang.Object
-
- com.google.android.exoplayer2.util.RunnableFutureTask<R,E>
-
- Type Parameters:
R
- The type of the result.E
- The type of anyExecutionException
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.ARunnableFuture
that supports additional uninterruptible operations to query whether execution has started and finished.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RunnableFutureTask()
Deprecated.
-
Method Summary
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 bydoWork()
.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.
-
-
-
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.
-
get
public final R get() throws ExecutionException, InterruptedException
Deprecated.- Specified by:
get
in interfaceFuture<R>
- Throws:
ExecutionException
InterruptedException
-
get
public final R get(long timeout, TimeUnit unit) throws ExecutionException, InterruptedException, TimeoutException
Deprecated.- Specified by:
get
in interfaceFuture<R>
- Throws:
ExecutionException
InterruptedException
TimeoutException
-
cancel
public final boolean cancel(boolean interruptIfRunning)
Deprecated.
-
isCancelled
public final boolean isCancelled()
Deprecated.- Specified by:
isCancelled
in interfaceFuture<R>
-
run
public final void run()
Deprecated.- Specified by:
run
in interfaceRunnable
- Specified by:
run
in interfaceRunnableFuture<R>
-
doWork
protected abstract R doWork() throws E extends Exception
Deprecated.Performs the work or computation.
-
cancelWork
protected void cancelWork()
Deprecated.
-
-