Package com.hazelcast.jet
Class JobStatusEvent
- java.lang.Object
-
- com.hazelcast.jet.JobStatusEvent
-
- All Implemented Interfaces:
DataSerializable
,IdentifiedDataSerializable
public class JobStatusEvent extends java.lang.Object implements IdentifiedDataSerializable
Holds information about a job's state (status) transition, reason for the transition, and whether it is user-initiated.- Since:
- 5.3
- See Also:
JobStatusListener
-
-
Constructor Summary
Constructors Constructor Description JobStatusEvent()
JobStatusEvent(long jobId, JobStatus previousStatus, JobStatus newStatus, java.lang.String description, boolean userRequested)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getClassId()
Returns type identifier for this class.java.lang.String
getDescription()
If the event is generated by the user, indicates the action; if there is a failure, indicates the cause; otherwise, null.int
getFactoryId()
Returns DataSerializableFactory factory ID for this class.long
getJobId()
JobStatus
getNewStatus()
JobStatus
getPreviousStatus()
boolean
isUserRequested()
Indicates whether the event is generated by the user viaJob.suspend()
,Job.resume()
,Job.restart()
,Job.cancel()
,Job.exportSnapshot(String)
, orJob.cancelAndExportSnapshot(String)
.void
readData(ObjectDataInput in)
Reads fields from the input streamjava.lang.String
toString()
void
writeData(ObjectDataOutput out)
Writes object fields to output stream
-
-
-
Method Detail
-
getJobId
public long getJobId()
-
getPreviousStatus
@Nonnull public JobStatus getPreviousStatus()
-
getNewStatus
@Nonnull public JobStatus getNewStatus()
-
getDescription
@Nullable public java.lang.String getDescription()
If the event is generated by the user, indicates the action; if there is a failure, indicates the cause; otherwise, null.
-
isUserRequested
public boolean isUserRequested()
Indicates whether the event is generated by the user viaJob.suspend()
,Job.resume()
,Job.restart()
,Job.cancel()
,Job.exportSnapshot(String)
, orJob.cancelAndExportSnapshot(String)
.
-
getFactoryId
public int getFactoryId()
Description copied from interface:IdentifiedDataSerializable
Returns DataSerializableFactory factory ID for this class.- Specified by:
getFactoryId
in interfaceIdentifiedDataSerializable
- Returns:
- factory ID
-
getClassId
public int getClassId()
Description copied from interface:IdentifiedDataSerializable
Returns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
getClassId
in interfaceIdentifiedDataSerializable
- Returns:
- type ID
-
writeData
public void writeData(ObjectDataOutput out) throws java.io.IOException
Description copied from interface:DataSerializable
Writes object fields to output stream- Specified by:
writeData
in interfaceDataSerializable
- Parameters:
out
- output- Throws:
java.io.IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the output stream has been closed.
-
readData
public void readData(ObjectDataInput in) throws java.io.IOException
Description copied from interface:DataSerializable
Reads fields from the input stream- Specified by:
readData
in interfaceDataSerializable
- Parameters:
in
- input- Throws:
java.io.IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the input stream has been closed.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-