public class WorkerWithState
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.logging.Logger |
LOG |
Constructor and Description |
---|
WorkerWithState(WorkerInfo info,
WorkerState state,
int restartCount) |
Modifier and Type | Method and Description |
---|---|
boolean |
completed()
if the worker state is COMPLETED
|
static WorkerWithState |
decode(byte[] encodedBytes) |
boolean |
equals(java.lang.Object o) |
WorkerInfo |
getInfo() |
int |
getRestartCount() |
WorkerState |
getState() |
int |
getWorkerID() |
int |
hashCode() |
boolean |
running()
return true if the worker status is either or STARTED, RESTARTED
|
void |
setState(WorkerState state) |
boolean |
startedOrCompleted()
return true if the worker status is either or STARTED, RESTARTED, COMPLETED
|
byte[] |
toByteArray() |
public WorkerWithState(WorkerInfo info, WorkerState state, int restartCount)
public WorkerInfo getInfo()
public WorkerState getState()
public int getRestartCount()
public int getWorkerID()
public void setState(WorkerState state)
public byte[] toByteArray()
public static WorkerWithState decode(byte[] encodedBytes)
public boolean running()
public boolean startedOrCompleted()
public boolean completed()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object