Interface ScheduledFuture<V>
- Type Parameters:
V- The result type returned by this Future
- All Superinterfaces:
Comparable<Delayed>, Delayed, Future<V>
- All Known Subinterfaces:
RunnableScheduledFuture<V>
A delayed result-bearing action that can be cancelled.
Usually a scheduled future is the result of scheduling
a task with a
ScheduledExecutorService.- Since:
- 1.5
-
Nested Class Summary
Nested classes/interfaces declared in interface Future
Future.State -
Method Summary
Methods declared in interface Comparable
compareToMethods declared in interface Future
cancel, exceptionNow, get, get, isCancelled, isDone, resultNow, stateModifier and TypeMethodDescriptionbooleancancel(boolean mayInterruptIfRunning) Attempts to cancel execution of this task.default ThrowableReturns the exception thrown by the task, without waiting.get()Waits if necessary for the computation to complete, and then retrieves its result.Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.booleanReturnstrueif this task was cancelled before it completed normally.booleanisDone()Returnstrueif this task completed.default VReturns the computed result, without waiting.default Future.Statestate()Returns the computation state.