@NotThreadSafe public class TaskInfo extends Object
Constructor and Description |
---|
TaskInfo()
Default constructor.
|
TaskInfo(TaskInfo taskInfo)
Constructs from the proto format.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getErrorMessage() |
long |
getJobId() |
Serializable |
getResult() |
Status |
getStatus() |
int |
getTaskId() |
int |
hashCode() |
TaskInfo |
setErrorMessage(String errorMessage) |
TaskInfo |
setJobId(long jobId) |
TaskInfo |
setResult(byte[] result) |
TaskInfo |
setStatus(Status status) |
TaskInfo |
setTaskId(int taskId) |
TaskInfo |
toProto() |
String |
toString() |
public TaskInfo()
public TaskInfo(TaskInfo taskInfo) throws IOException
taskInfo
- the task info in proto formatIOException
- if the deserialization failspublic long getJobId()
public int getTaskId()
public Status getStatus()
public String getErrorMessage()
public Serializable getResult()
public TaskInfo setJobId(long jobId)
jobId
- the job idpublic TaskInfo setTaskId(int taskId)
taskId
- the task idpublic TaskInfo setStatus(Status status)
status
- the task statuspublic TaskInfo setErrorMessage(String errorMessage)
errorMessage
- the error messagepublic TaskInfo setResult(byte[] result)
result
- the resultpublic TaskInfo toProto() throws IOException
IOException
- if serialization failsCopyright © 2023. All Rights Reserved.