public final class ScheduledTaskHandlerImpl extends ScheduledTaskHandler
Constructor and Description |
---|
ScheduledTaskHandlerImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Address |
getAddress()
Returns the address of the member the task is associated with.
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
int |
getPartitionId()
Returns the partition ID the task is associated with.
|
String |
getSchedulerName()
Return the name of the ScheduledExecutor this tasks is running on.
|
String |
getTaskName()
Returns the name of the task.
|
int |
hashCode() |
boolean |
isAssignedToMember() |
boolean |
isAssignedToPartition() |
static ScheduledTaskHandler |
of(Address addr,
String schedulerName,
String taskName) |
static ScheduledTaskHandler |
of(int partitionId,
String schedulerName,
String taskName) |
static ScheduledTaskHandler |
of(String urn) |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
String |
toString() |
String |
toUrn()
Returns the String representation of the handler.
|
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public Address getAddress()
ScheduledTaskHandler
The address will be null
, if the task was scheduled to particular partition.
getAddress
in class ScheduledTaskHandler
public int getPartitionId()
ScheduledTaskHandler
If the task was scheduled to a particular member, then the partition ID will have the value of -1.
getPartitionId
in class ScheduledTaskHandler
public String getSchedulerName()
ScheduledTaskHandler
getSchedulerName
in class ScheduledTaskHandler
public String getTaskName()
ScheduledTaskHandler
getTaskName
in class ScheduledTaskHandler
public boolean isAssignedToPartition()
isAssignedToPartition
in class ScheduledTaskHandler
true
when the associated task was scheduled on a specific partitionpublic boolean isAssignedToMember()
isAssignedToMember
in class ScheduledTaskHandler
true
when the associated task was scheduled on a specific member in the clusterpublic String toUrn()
ScheduledTaskHandler
Useful for persisting and/or communicating this info. A ScheduledTaskHandler
can be constructed again
from the Urn String using ScheduledTaskHandler.of(String)
toUrn
in class ScheduledTaskHandler
public int getFactoryId()
IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.public static ScheduledTaskHandler of(Address addr, String schedulerName, String taskName)
public static ScheduledTaskHandler of(int partitionId, String schedulerName, String taskName)
public static ScheduledTaskHandler of(String urn)
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.