public class GetStateResponse extends Object implements com.facebook.thrift.TBase, Serializable, Cloneable, Comparable<GetStateResponse>
| Modifier and Type | Class and Description |
|---|---|
static class |
GetStateResponse.Builder |
| Modifier and Type | Field and Description |
|---|---|
long |
committed_log_id |
static int |
COMMITTED_LOG_ID |
ErrorCode |
error_code |
static int |
ERROR_CODE |
boolean |
is_leader |
static int |
IS_LEADER |
long |
last_log_id |
static int |
LAST_LOG_ID |
long |
last_log_term |
static int |
LAST_LOG_TERM |
static Map<Integer,com.facebook.thrift.meta_data.FieldMetaData> |
metaDataMap |
Role |
role |
static int |
ROLE |
Status |
status |
static int |
STATUS |
long |
term |
static int |
TERM |
| Constructor and Description |
|---|
GetStateResponse() |
GetStateResponse(ErrorCode error_code,
Role role,
long term,
boolean is_leader,
long committed_log_id,
long last_log_id,
long last_log_term,
Status status) |
GetStateResponse(GetStateResponse other)
Performs a deep copy on other.
|
| Modifier and Type | Method and Description |
|---|---|
static GetStateResponse.Builder |
builder() |
int |
compareTo(GetStateResponse other) |
GetStateResponse |
deepCopy()
Returns a copy of `this`.
|
boolean |
equals(Object _that) |
long |
getCommitted_log_id() |
ErrorCode |
getError_code() |
Object |
getFieldValue(int fieldID) |
long |
getLast_log_id() |
long |
getLast_log_term() |
Role |
getRole() |
Status |
getStatus() |
long |
getTerm() |
int |
hashCode() |
boolean |
isIs_leader() |
boolean |
isSetCommitted_log_id() |
boolean |
isSetError_code() |
boolean |
isSetIs_leader() |
boolean |
isSetLast_log_id() |
boolean |
isSetLast_log_term() |
boolean |
isSetRole() |
boolean |
isSetStatus() |
boolean |
isSetTerm() |
void |
read(com.facebook.thrift.protocol.TProtocol iprot)
Reads the TObject from the given input protocol.
|
GetStateResponse |
setCommitted_log_id(long committed_log_id) |
void |
setCommitted_log_idIsSet(boolean __value) |
GetStateResponse |
setError_code(ErrorCode error_code) |
void |
setError_codeIsSet(boolean __value) |
void |
setFieldValue(int fieldID,
Object __value) |
GetStateResponse |
setIs_leader(boolean is_leader) |
void |
setIs_leaderIsSet(boolean __value) |
GetStateResponse |
setLast_log_id(long last_log_id) |
void |
setLast_log_idIsSet(boolean __value) |
GetStateResponse |
setLast_log_term(long last_log_term) |
void |
setLast_log_termIsSet(boolean __value) |
GetStateResponse |
setRole(Role role) |
void |
setRoleIsSet(boolean __value) |
GetStateResponse |
setStatus(Status status) |
void |
setStatusIsSet(boolean __value) |
GetStateResponse |
setTerm(long term) |
void |
setTermIsSet(boolean __value) |
String |
toString() |
String |
toString(int indent,
boolean prettyPrint)
Creates an indented String representation for pretty printing
|
void |
unsetCommitted_log_id() |
void |
unsetError_code() |
void |
unsetIs_leader() |
void |
unsetLast_log_id() |
void |
unsetLast_log_term() |
void |
unsetRole() |
void |
unsetStatus() |
void |
unsetTerm() |
void |
validate() |
void |
write(com.facebook.thrift.protocol.TProtocol oprot)
Writes the objects out to the protocol
|
public long term
public boolean is_leader
public long committed_log_id
public long last_log_id
public long last_log_term
public static final int ERROR_CODE
public static final int ROLE
public static final int TERM
public static final int IS_LEADER
public static final int COMMITTED_LOG_ID
public static final int LAST_LOG_ID
public static final int LAST_LOG_TERM
public static final int STATUS
public GetStateResponse()
public GetStateResponse(ErrorCode error_code, Role role, long term, boolean is_leader, long committed_log_id, long last_log_id, long last_log_term, Status status)
public GetStateResponse(GetStateResponse other)
public static GetStateResponse.Builder builder()
public GetStateResponse deepCopy()
com.facebook.thrift.TBasex.getClass() == x.deepCopy().getClass() should be true for any
TBase.deepCopy in interface com.facebook.thrift.TBasepublic GetStateResponse setError_code(ErrorCode error_code)
ErrorCodepublic void unsetError_code()
public boolean isSetError_code()
public void setError_codeIsSet(boolean __value)
public GetStateResponse setRole(Role role)
Rolepublic void unsetRole()
public boolean isSetRole()
public void setRoleIsSet(boolean __value)
public long getTerm()
public GetStateResponse setTerm(long term)
public void unsetTerm()
public boolean isSetTerm()
public void setTermIsSet(boolean __value)
public boolean isIs_leader()
public GetStateResponse setIs_leader(boolean is_leader)
public void unsetIs_leader()
public boolean isSetIs_leader()
public void setIs_leaderIsSet(boolean __value)
public long getCommitted_log_id()
public GetStateResponse setCommitted_log_id(long committed_log_id)
public void unsetCommitted_log_id()
public boolean isSetCommitted_log_id()
public void setCommitted_log_idIsSet(boolean __value)
public long getLast_log_id()
public GetStateResponse setLast_log_id(long last_log_id)
public void unsetLast_log_id()
public boolean isSetLast_log_id()
public void setLast_log_idIsSet(boolean __value)
public long getLast_log_term()
public GetStateResponse setLast_log_term(long last_log_term)
public void unsetLast_log_term()
public boolean isSetLast_log_term()
public void setLast_log_termIsSet(boolean __value)
public GetStateResponse setStatus(Status status)
Statuspublic void unsetStatus()
public boolean isSetStatus()
public void setStatusIsSet(boolean __value)
public void setFieldValue(int fieldID,
Object __value)
public Object getFieldValue(int fieldID)
public int compareTo(GetStateResponse other)
compareTo in interface Comparable<GetStateResponse>public void read(com.facebook.thrift.protocol.TProtocol iprot)
throws com.facebook.thrift.TException
com.facebook.thrift.TBaseread in interface com.facebook.thrift.TBaseiprot - Input protocolcom.facebook.thrift.TExceptionpublic void write(com.facebook.thrift.protocol.TProtocol oprot)
throws com.facebook.thrift.TException
com.facebook.thrift.TBasewrite in interface com.facebook.thrift.TBaseoprot - Output protocolcom.facebook.thrift.TExceptionpublic String toString(int indent, boolean prettyPrint)
com.facebook.thrift.TBasetoString in interface com.facebook.thrift.TBaseindent - The level of indentation desiredprettyPrint - Set pretty printing on/offpublic void validate()
throws com.facebook.thrift.TException
com.facebook.thrift.TExceptionCopyright © 2022. All rights reserved.