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 supportExternalizable
interface.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 short
directType()
Gets message type.byte
fieldsCount()
Gets fields count.@Nullable IgniteException
getException()
@org.jetbrains.annotations.Nullable byte[]
getExceptionBytes()
IgniteException
getFakeException()
@Nullable Map<Object,Object>
getJobAttributes()
@org.jetbrains.annotations.Nullable byte[]
getJobAttributesBytes()
IgniteUuid
getJobId()
@Nullable Object
getJobResult()
@org.jetbrains.annotations.Nullable byte[]
getJobResultBytes()
UUID
getNodeId()
AffinityTopologyVersion
getRetryTopologyVersion()
IgniteUuid
getSessionId()
boolean
isCancelled()
void
onAckReceived()
Method called when ack message received.boolean
readFrom(ByteBuffer buf, MessageReader reader)
Reads this message from provided byte buffer.boolean
retry()
void
setFakeException(IgniteException fakeEx)
String
toString()
boolean
writeTo(ByteBuffer buf, MessageWriter writer)
Writes this message to provided byte buffer.
-
-
-
Constructor Detail
-
GridJobExecuteResponse
public GridJobExecuteResponse()
No-op constructor to supportExternalizable
interface. 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:
True
if 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:
onAckReceived
in 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:
directType
in interfaceMessage
- Returns:
- Message type.
-
fieldsCount
public byte fieldsCount()
Gets fields count.- Specified by:
fieldsCount
in interfaceMessage
- Returns:
- Fields count.
-
-