public abstract class ScheduledTaskHandler extends Object implements IdentifiedDataSerializable
IScheduledFuture
. The handler is used to interact with the ScheduledFuture
in a IScheduledExecutorService
.
To access the handler, see IScheduledFuture.getHandler()
. To re-acquire access to a previously scheduled task,
having only the handler at hand, see IScheduledExecutorService.getScheduledFuture(ScheduledTaskHandler)
Constructor and Description |
---|
ScheduledTaskHandler() |
Modifier and Type | Method and Description |
---|---|
abstract Address |
getAddress()
Returns the address of the member the task is associated with.
|
abstract int |
getPartitionId()
Returns the partition ID the task is associated with.
|
abstract String |
getSchedulerName()
Return the name of the ScheduledExecutor this tasks is running on.
|
abstract String |
getTaskName()
Returns the name of the task.
|
abstract boolean |
isAssignedToMember() |
abstract boolean |
isAssignedToPartition() |
static ScheduledTaskHandler |
of(String urn)
Reconstructs a
ScheduledTaskHandler from a URN String. |
abstract String |
toUrn()
Returns the String representation of the handler.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFactoryId, getId
readData, writeData
public abstract Address getAddress()
The address will be null
, if the task was scheduled to particular partition.
public abstract int getPartitionId()
If the task was scheduled to a particular member, then the partition ID will have the value of -1.
public abstract String getSchedulerName()
public abstract String getTaskName()
public abstract boolean isAssignedToPartition()
true
when the associated task was scheduled on a specific partitionpublic abstract boolean isAssignedToMember()
true
when the associated task was scheduled on a specific member in the clusterpublic abstract String toUrn()
Useful for persisting and/or communicating this info. A ScheduledTaskHandler
can be constructed again
from the Urn String using of(String)
public static ScheduledTaskHandler of(String urn)
ScheduledTaskHandler
from a URN String.urn
- The URN of the handler as retrieved from toUrn()
ScheduledTaskHandler
instance that can be used to access the scheduled taskCopyright © 2022 Hazelcast, Inc.. All Rights Reserved.