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 voidcancel()Sends a request to cancel this sibling.IgniteUuidgetJobId()Gets ID of this grid job sibling.booleanisJobDone()ObjectjobTopic()UUIDnodeId()voidnodeId(UUID nodeId)voidonJobDone()voidreadExternal(ObjectInput in)ObjecttaskTopic()StringtoString()voidwriteExternal(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:
getJobIdin 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:
Trueif 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:
cancelin interfaceComputeJobSibling
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
-