Stay organized with collections
Save and categorize content based on your preferences.
RunnableScheduledFuture
public
interface
RunnableScheduledFuture
implements
RunnableFuture<V>,
ScheduledFuture<V>
java.util.concurrent.RunnableScheduledFuture<V>
|
A ScheduledFuture
that is Runnable
. Successful
execution of the run
method causes completion of the
Future
and allows access to its results.
Summary
Public methods |
abstract
boolean
|
isPeriodic()
Returns true if this task is periodic.
|
Inherited methods |
|
From interface
java.lang.Runnable
abstract
void
|
run()
When an object implementing interface Runnable is used
to create a thread, starting the thread causes the object's
run method to be called in that separately executing
thread.
|
|
From interface
java.util.concurrent.Future
abstract
boolean
|
cancel(boolean mayInterruptIfRunning)
Attempts to cancel execution of this task.
|
abstract
V
|
get(long timeout, TimeUnit unit)
Waits if necessary for at most the given time for the computation
to complete, and then retrieves its result, if available.
|
abstract
V
|
get()
Waits if necessary for the computation to complete, and then
retrieves its result.
|
abstract
boolean
|
isCancelled()
Returns true if this task was cancelled before it completed
normally.
|
abstract
boolean
|
isDone()
Returns true if this task completed.
|
|
|
|
Public methods
isPeriodic
public abstract boolean isPeriodic ()
Returns true
if this task is periodic. A periodic task may
re-run according to some schedule. A non-periodic task can be
run only once.
Returns |
boolean |
true if this task is periodic |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-06-07 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2023-06-07 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-06-07 UTC."]]