V
- The result type returned by this Futurepublic interface IScheduledFuture<V> extends ScheduledFuture<V>
IScheduledExecutorService
.
Enhances the default ScheduledFuture
API with support of statistics and time measurement info, through ScheduledTaskStatistics
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
Attempts to cancel further scheduling of this task.
|
void |
dispose()
Used to destroy the instance of the
IScheduledFuture in the scheduled executor. |
ScheduledTaskHandler |
getHandler()
Returns the scheduled future resource handler.
|
ScheduledTaskStatistics |
getStats()
Returns the statistics and time measurement info of the execution of this scheduled future in the
IScheduledExecutorService it was scheduled. |
compareTo
get, get, isCancelled, isDone
ScheduledTaskHandler getHandler()
IScheduledFuture
using the
IScheduledExecutorService.getScheduledFuture(ScheduledTaskHandler)
ScheduledTaskHandler
, a resource handler for this scheduled future.ScheduledTaskStatistics getStats()
IScheduledExecutorService
it was scheduled.ScheduledTaskStatistics
, holding all stas and measurementsvoid dispose()
IScheduledFuture
in the scheduled executor. Once the instance is destroyed, any
subsequent action on the IScheduledFuture
will fail with an IllegalStateException
Attempting to re-create
the IScheduledFuture
from the IScheduledExecutorService.getScheduledFuture(ScheduledTaskHandler)
using the
getHandler()
will succeed, but any subsequent access on that new future, will also fail with StaleTaskException
boolean cancel(boolean mayInterruptIfRunning)
cancel
is called, this task should never run.
Warning: This cancel will not attempt to interrupt the running thread if the task is already in progress, will just cancel further scheduling.
After this method returns, subsequent calls to Future.isDone()
will always return true
. Subsequent calls to
Future.isCancelled()
will always return true
if this method returned true
.
cancel
in interface Future<V>
mayInterruptIfRunning
- is throwing UnsupportedOperationException
false
if the task could not be cancelled, typically because it has already completed normally; {@code trueCopyright © 2021 Hazelcast, Inc.. All Rights Reserved.