public class InstanceState
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Describes the current state of the instance.
Modifier and Type | Field and Description |
---|---|
private java.lang.Integer |
code
The low byte represents the state.
|
private java.lang.String |
name
The current state of the instance.
|
Constructor and Description |
---|
InstanceState() |
Modifier and Type | Method and Description |
---|---|
InstanceState |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.Integer |
getCode()
The low byte represents the state.
|
java.lang.String |
getName()
The current state of the instance.
|
int |
hashCode() |
void |
setCode(java.lang.Integer code)
The low byte represents the state.
|
void |
setName(InstanceStateName name)
The current state of the instance.
|
void |
setName(java.lang.String name)
The current state of the instance.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
InstanceState |
withCode(java.lang.Integer code)
The low byte represents the state.
|
InstanceState |
withName(InstanceStateName name)
The current state of the instance.
|
InstanceState |
withName(java.lang.String name)
The current state of the instance.
|
private java.lang.Integer code
The low byte represents the state. The high byte is an opaque internal value and should be ignored.
0
: pending
16
: running
32
: shutting-down
48
: terminated
64
: stopping
80
: stopped
private java.lang.String name
The current state of the instance.
public void setCode(java.lang.Integer code)
The low byte represents the state. The high byte is an opaque internal value and should be ignored.
0
: pending
16
: running
32
: shutting-down
48
: terminated
64
: stopping
80
: stopped
code
- The low byte represents the state. The high byte is an opaque
internal value and should be ignored.
0
: pending
16
: running
32
: shutting-down
48
: terminated
64
: stopping
80
: stopped
public java.lang.Integer getCode()
The low byte represents the state. The high byte is an opaque internal value and should be ignored.
0
: pending
16
: running
32
: shutting-down
48
: terminated
64
: stopping
80
: stopped
0
: pending
16
: running
32
: shutting-down
48
: terminated
64
: stopping
80
: stopped
public InstanceState withCode(java.lang.Integer code)
The low byte represents the state. The high byte is an opaque internal value and should be ignored.
0
: pending
16
: running
32
: shutting-down
48
: terminated
64
: stopping
80
: stopped
code
- The low byte represents the state. The high byte is an opaque
internal value and should be ignored.
0
: pending
16
: running
32
: shutting-down
48
: terminated
64
: stopping
80
: stopped
public void setName(java.lang.String name)
The current state of the instance.
name
- The current state of the instance.InstanceStateName
public java.lang.String getName()
The current state of the instance.
InstanceStateName
public InstanceState withName(java.lang.String name)
The current state of the instance.
name
- The current state of the instance.InstanceStateName
public void setName(InstanceStateName name)
The current state of the instance.
name
- The current state of the instance.InstanceStateName
public InstanceState withName(InstanceStateName name)
The current state of the instance.
name
- The current state of the instance.InstanceStateName
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public InstanceState clone()
clone
in class java.lang.Object