Package org.apache.ignite.internal
Class GridJobExecuteResponse
- java.lang.Object
-
- org.apache.ignite.internal.GridJobExecuteResponse
-
- All Implemented Interfaces:
Serializable,Message
public class GridJobExecuteResponse extends Object implements Message
Job execution response.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.apache.ignite.plugin.extensions.communication.Message
DIRECT_TYPE_SIZE
-
-
Constructor Summary
Constructors Constructor Description GridJobExecuteResponse()No-op constructor to supportExternalizableinterface.GridJobExecuteResponse(UUID nodeId, IgniteUuid sesId, IgniteUuid jobId, byte[] gridExBytes, IgniteException gridEx, byte[] resBytes, Object res, byte[] jobAttrsBytes, Map<Object,Object> jobAttrs, boolean isCancelled, AffinityTopologyVersion retry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description shortdirectType()Gets message type.bytefieldsCount()Gets fields count.@Nullable IgniteExceptiongetException()@org.jetbrains.annotations.Nullable byte[]getExceptionBytes()IgniteExceptiongetFakeException()@Nullable Map<Object,Object>getJobAttributes()@org.jetbrains.annotations.Nullable byte[]getJobAttributesBytes()IgniteUuidgetJobId()@Nullable ObjectgetJobResult()@org.jetbrains.annotations.Nullable byte[]getJobResultBytes()UUIDgetNodeId()AffinityTopologyVersiongetRetryTopologyVersion()IgniteUuidgetSessionId()booleanisCancelled()voidonAckReceived()Method called when ack message received.booleanreadFrom(ByteBuffer buf, MessageReader reader)Reads this message from provided byte buffer.booleanretry()voidsetFakeException(IgniteException fakeEx)StringtoString()booleanwriteTo(ByteBuffer buf, MessageWriter writer)Writes this message to provided byte buffer.
-
-
-
Constructor Detail
-
GridJobExecuteResponse
public GridJobExecuteResponse()
No-op constructor to supportExternalizableinterface. This constructor is not meant to be used for other purposes.
-
GridJobExecuteResponse
public GridJobExecuteResponse(UUID nodeId, IgniteUuid sesId, IgniteUuid jobId, byte[] gridExBytes, IgniteException gridEx, byte[] resBytes, Object res, byte[] jobAttrsBytes, Map<Object,Object> jobAttrs, boolean isCancelled, AffinityTopologyVersion retry)
- Parameters:
nodeId- Sender node ID.sesId- Task session IDjobId- Job ID.gridExBytes- Serialized grid exception.gridEx- Grid exception.resBytes- Serialized result.res- Result.jobAttrsBytes- Serialized job attributes.jobAttrs- Job attributes.isCancelled- Whether job was cancelled or not.retry- Topology version for that partitions haven't been reserved on the affinity node.
-
-
Method Detail
-
getSessionId
public IgniteUuid getSessionId()
- Returns:
- Task session ID.
-
getJobId
public IgniteUuid getJobId()
- Returns:
- Job ID.
-
getJobResultBytes
@Nullable public @org.jetbrains.annotations.Nullable byte[] getJobResultBytes()
- Returns:
- Serialized job result.
-
getJobResult
@Nullable public @Nullable Object getJobResult()
- Returns:
- Job result.
-
getExceptionBytes
@Nullable public @org.jetbrains.annotations.Nullable byte[] getExceptionBytes()
- Returns:
- Serialized job exception.
-
getException
@Nullable public @Nullable IgniteException getException()
- Returns:
- Job exception.
-
getJobAttributesBytes
@Nullable public @org.jetbrains.annotations.Nullable byte[] getJobAttributesBytes()
- Returns:
- Serialized job attributes.
-
getJobAttributes
@Nullable public @Nullable Map<Object,Object> getJobAttributes()
- Returns:
- Job attributes.
-
isCancelled
public boolean isCancelled()
- Returns:
- Job cancellation status.
-
getNodeId
public UUID getNodeId()
- Returns:
- Sender node ID.
-
getFakeException
public IgniteException getFakeException()
- Returns:
- Fake exception.
-
setFakeException
public void setFakeException(IgniteException fakeEx)
- Parameters:
fakeEx- Fake exception.
-
retry
public boolean retry()
- Returns:
Trueif need retry job.
-
getRetryTopologyVersion
public AffinityTopologyVersion getRetryTopologyVersion()
- Returns:
- Topology version for that specified partitions haven't been reserved on the affinity node.
-
onAckReceived
public void onAckReceived()
Method called when ack message received.- Specified by:
onAckReceivedin interfaceMessage
-
writeTo
public boolean writeTo(ByteBuffer buf, MessageWriter writer)
Writes this message to provided byte buffer.
-
readFrom
public boolean readFrom(ByteBuffer buf, MessageReader reader)
Reads this message from provided byte buffer.
-
directType
public short directType()
Gets message type.- Specified by:
directTypein interfaceMessage- Returns:
- Message type.
-
fieldsCount
public byte fieldsCount()
Gets fields count.- Specified by:
fieldsCountin interfaceMessage- Returns:
- Fields count.
-
-