| Constructor and Description |
|---|
Status() |
Status(int code,
String errorMsg) |
Status(int code,
String fmt,
Object... args) |
Status(RaftError raftError,
String fmt,
Object... args) |
Status(Status s) |
| Modifier and Type | Method and Description |
|---|---|
Status |
copy()
Copy current object(deep-clone).
|
boolean |
equals(Object obj) |
int |
getCode()
Get error code.
|
String |
getErrorMsg()
Get the error msg.
|
RaftError |
getRaftError()
Get raft error from error code.
|
int |
hashCode() |
boolean |
isOk()
Returns true when status is in OK state.
|
static Status |
OK()
Creates a OK status instance.
|
void |
reset()
Reset status to be OK state.
|
void |
setCode(int code)
Set error code.
|
void |
setError(int code,
String fmt,
Object... args)
Set error code and error msg.
|
void |
setError(RaftError error,
String fmt,
Object... args)
Set raft error and error msg.
|
void |
setErrorMsg(String errMsg)
Set error msg
|
String |
toString() |
public Status()
public Status(Status s)
public Status(int code,
String errorMsg)
public static Status OK()
public void reset()
public boolean isOk()
public void setCode(int code)
public int getCode()
public RaftError getRaftError()
public void setErrorMsg(String errMsg)
public void setError(RaftError error, String fmt, Object... args)
public Status copy()
Copiablepublic String getErrorMsg()
Copyright © 2024. All rights reserved.