Package org.apache.ignite.internal
Class GridJobSiblingImpl
- java.lang.Object
-
- org.apache.ignite.internal.GridJobSiblingImpl
-
- All Implemented Interfaces:
Externalizable
,Serializable
,ComputeJobSibling
public class GridJobSiblingImpl extends Object implements ComputeJobSibling, Externalizable
This class provides implementation for job sibling.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GridJobSiblingImpl()
GridJobSiblingImpl(IgniteUuid sesId, IgniteUuid jobId, UUID nodeId, GridKernalContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
Sends a request to cancel this sibling.IgniteUuid
getJobId()
Gets ID of this grid job sibling.boolean
isJobDone()
Object
jobTopic()
UUID
nodeId()
void
nodeId(UUID nodeId)
void
onJobDone()
void
readExternal(ObjectInput in)
Object
taskTopic()
String
toString()
void
writeExternal(ObjectOutput out)
-
-
-
Constructor Detail
-
GridJobSiblingImpl
public GridJobSiblingImpl()
-
GridJobSiblingImpl
public GridJobSiblingImpl(IgniteUuid sesId, IgniteUuid jobId, UUID nodeId, GridKernalContext ctx)
- Parameters:
sesId
- Task session ID.jobId
- Job ID.nodeId
- ID of the node where this sibling was sent for execution.ctx
- Managers registry.
-
-
Method Detail
-
getJobId
public IgniteUuid getJobId()
Gets ID of this grid job sibling. Note that ID stays constant throughout job life time, even if a job gets failed over to another node.- Specified by:
getJobId
in interfaceComputeJobSibling
- Returns:
- Job ID.
-
nodeId
public UUID nodeId()
- Returns:
- Node ID.
-
nodeId
public void nodeId(UUID nodeId)
- Parameters:
nodeId
- Node where this sibling is executing.
-
isJobDone
public boolean isJobDone()
- Returns:
True
if job has finished.
-
onJobDone
public void onJobDone()
-
taskTopic
public Object taskTopic()
- Returns:
- Communication topic for receiving.
-
jobTopic
public Object jobTopic()
- Returns:
- Communication topic for sending.
-
cancel
public void cancel()
Sends a request to cancel this sibling.- Specified by:
cancel
in interfaceComputeJobSibling
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
-