diff --git a/client/pom.xml b/client/pom.xml
index a82733a66..8e056ac68 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -21,6 +21,7 @@
1.13
2.2
3.0.1
+ 1.2.78
@@ -233,5 +234,10 @@
javax.servlet-api
${servlet.version}
+
+ com.alibaba
+ fastjson
+ ${fastjson.version}
+
diff --git a/client/src/main/generated/AppendLogRequest.java b/client/src/main/generated/AppendLogRequest.java
new file mode 100644
index 000000000..fd8a542f2
--- /dev/null
+++ b/client/src/main/generated/AppendLogRequest.java
@@ -0,0 +1,1194 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.util.Arrays;
+import com.facebook.thrift.*;
+import com.facebook.thrift.annotations.*;
+import com.facebook.thrift.async.*;
+import com.facebook.thrift.meta_data.*;
+import com.facebook.thrift.server.*;
+import com.facebook.thrift.transport.*;
+import com.facebook.thrift.protocol.*;
+
+@SuppressWarnings({ "unused", "serial" })
+public class AppendLogRequest implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("AppendLogRequest");
+ private static final TField SPACE_FIELD_DESC = new TField("space", TType.I32, (short)1);
+ private static final TField PART_FIELD_DESC = new TField("part", TType.I32, (short)2);
+ private static final TField CURRENT_TERM_FIELD_DESC = new TField("current_term", TType.I64, (short)3);
+ private static final TField LAST_LOG_ID_FIELD_DESC = new TField("last_log_id", TType.I64, (short)4);
+ private static final TField COMMITTED_LOG_ID_FIELD_DESC = new TField("committed_log_id", TType.I64, (short)5);
+ private static final TField LEADER_ADDR_FIELD_DESC = new TField("leader_addr", TType.STRING, (short)6);
+ private static final TField LEADER_PORT_FIELD_DESC = new TField("leader_port", TType.I32, (short)7);
+ private static final TField LAST_LOG_TERM_SENT_FIELD_DESC = new TField("last_log_term_sent", TType.I64, (short)8);
+ private static final TField LAST_LOG_ID_SENT_FIELD_DESC = new TField("last_log_id_sent", TType.I64, (short)9);
+ private static final TField LOG_TERM_FIELD_DESC = new TField("log_term", TType.I64, (short)10);
+ private static final TField LOG_STR_LIST_FIELD_DESC = new TField("log_str_list", TType.LIST, (short)11);
+ private static final TField SENDING_SNAPSHOT_FIELD_DESC = new TField("sending_snapshot", TType.BOOL, (short)12);
+
+ public int space;
+ public int part;
+ public long current_term;
+ public long last_log_id;
+ public long committed_log_id;
+ public String leader_addr;
+ public int leader_port;
+ public long last_log_term_sent;
+ public long last_log_id_sent;
+ public long log_term;
+ public List log_str_list;
+ public boolean sending_snapshot;
+ public static final int SPACE = 1;
+ public static final int PART = 2;
+ public static final int CURRENT_TERM = 3;
+ public static final int LAST_LOG_ID = 4;
+ public static final int COMMITTED_LOG_ID = 5;
+ public static final int LEADER_ADDR = 6;
+ public static final int LEADER_PORT = 7;
+ public static final int LAST_LOG_TERM_SENT = 8;
+ public static final int LAST_LOG_ID_SENT = 9;
+ public static final int LOG_TERM = 10;
+ public static final int LOG_STR_LIST = 11;
+ public static final int SENDING_SNAPSHOT = 12;
+
+ // isset id assignments
+ private static final int __SPACE_ISSET_ID = 0;
+ private static final int __PART_ISSET_ID = 1;
+ private static final int __CURRENT_TERM_ISSET_ID = 2;
+ private static final int __LAST_LOG_ID_ISSET_ID = 3;
+ private static final int __COMMITTED_LOG_ID_ISSET_ID = 4;
+ private static final int __LEADER_PORT_ISSET_ID = 5;
+ private static final int __LAST_LOG_TERM_SENT_ISSET_ID = 6;
+ private static final int __LAST_LOG_ID_SENT_ISSET_ID = 7;
+ private static final int __LOG_TERM_ISSET_ID = 8;
+ private static final int __SENDING_SNAPSHOT_ISSET_ID = 9;
+ private BitSet __isset_bit_vector = new BitSet(10);
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(SPACE, new FieldMetaData("space", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMetaDataMap.put(PART, new FieldMetaData("part", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMetaDataMap.put(CURRENT_TERM, new FieldMetaData("current_term", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(LAST_LOG_ID, new FieldMetaData("last_log_id", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(COMMITTED_LOG_ID, new FieldMetaData("committed_log_id", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(LEADER_ADDR, new FieldMetaData("leader_addr", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ tmpMetaDataMap.put(LEADER_PORT, new FieldMetaData("leader_port", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMetaDataMap.put(LAST_LOG_TERM_SENT, new FieldMetaData("last_log_term_sent", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(LAST_LOG_ID_SENT, new FieldMetaData("last_log_id_sent", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(LOG_TERM, new FieldMetaData("log_term", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(LOG_STR_LIST, new FieldMetaData("log_str_list", TFieldRequirementType.DEFAULT,
+ new ListMetaData(TType.LIST,
+ new StructMetaData(TType.STRUCT, LogEntry.class))));
+ tmpMetaDataMap.put(SENDING_SNAPSHOT, new FieldMetaData("sending_snapshot", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(AppendLogRequest.class, metaDataMap);
+ }
+
+ public AppendLogRequest() {
+ }
+
+ public AppendLogRequest(
+ int space,
+ int part,
+ long current_term,
+ long last_log_id,
+ long committed_log_id,
+ String leader_addr,
+ int leader_port,
+ long last_log_term_sent,
+ long last_log_id_sent,
+ long log_term,
+ List log_str_list,
+ boolean sending_snapshot) {
+ this();
+ this.space = space;
+ setSpaceIsSet(true);
+ this.part = part;
+ setPartIsSet(true);
+ this.current_term = current_term;
+ setCurrent_termIsSet(true);
+ this.last_log_id = last_log_id;
+ setLast_log_idIsSet(true);
+ this.committed_log_id = committed_log_id;
+ setCommitted_log_idIsSet(true);
+ this.leader_addr = leader_addr;
+ this.leader_port = leader_port;
+ setLeader_portIsSet(true);
+ this.last_log_term_sent = last_log_term_sent;
+ setLast_log_term_sentIsSet(true);
+ this.last_log_id_sent = last_log_id_sent;
+ setLast_log_id_sentIsSet(true);
+ this.log_term = log_term;
+ setLog_termIsSet(true);
+ this.log_str_list = log_str_list;
+ this.sending_snapshot = sending_snapshot;
+ setSending_snapshotIsSet(true);
+ }
+
+ public static class Builder {
+ private int space;
+ private int part;
+ private long current_term;
+ private long last_log_id;
+ private long committed_log_id;
+ private String leader_addr;
+ private int leader_port;
+ private long last_log_term_sent;
+ private long last_log_id_sent;
+ private long log_term;
+ private List log_str_list;
+ private boolean sending_snapshot;
+
+ BitSet __optional_isset = new BitSet(10);
+
+ public Builder() {
+ }
+
+ public Builder setSpace(final int space) {
+ this.space = space;
+ __optional_isset.set(__SPACE_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setPart(final int part) {
+ this.part = part;
+ __optional_isset.set(__PART_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setCurrent_term(final long current_term) {
+ this.current_term = current_term;
+ __optional_isset.set(__CURRENT_TERM_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLast_log_id(final long last_log_id) {
+ this.last_log_id = last_log_id;
+ __optional_isset.set(__LAST_LOG_ID_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setCommitted_log_id(final long committed_log_id) {
+ this.committed_log_id = committed_log_id;
+ __optional_isset.set(__COMMITTED_LOG_ID_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLeader_addr(final String leader_addr) {
+ this.leader_addr = leader_addr;
+ return this;
+ }
+
+ public Builder setLeader_port(final int leader_port) {
+ this.leader_port = leader_port;
+ __optional_isset.set(__LEADER_PORT_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLast_log_term_sent(final long last_log_term_sent) {
+ this.last_log_term_sent = last_log_term_sent;
+ __optional_isset.set(__LAST_LOG_TERM_SENT_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLast_log_id_sent(final long last_log_id_sent) {
+ this.last_log_id_sent = last_log_id_sent;
+ __optional_isset.set(__LAST_LOG_ID_SENT_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLog_term(final long log_term) {
+ this.log_term = log_term;
+ __optional_isset.set(__LOG_TERM_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLog_str_list(final List log_str_list) {
+ this.log_str_list = log_str_list;
+ return this;
+ }
+
+ public Builder setSending_snapshot(final boolean sending_snapshot) {
+ this.sending_snapshot = sending_snapshot;
+ __optional_isset.set(__SENDING_SNAPSHOT_ISSET_ID, true);
+ return this;
+ }
+
+ public AppendLogRequest build() {
+ AppendLogRequest result = new AppendLogRequest();
+ if (__optional_isset.get(__SPACE_ISSET_ID)) {
+ result.setSpace(this.space);
+ }
+ if (__optional_isset.get(__PART_ISSET_ID)) {
+ result.setPart(this.part);
+ }
+ if (__optional_isset.get(__CURRENT_TERM_ISSET_ID)) {
+ result.setCurrent_term(this.current_term);
+ }
+ if (__optional_isset.get(__LAST_LOG_ID_ISSET_ID)) {
+ result.setLast_log_id(this.last_log_id);
+ }
+ if (__optional_isset.get(__COMMITTED_LOG_ID_ISSET_ID)) {
+ result.setCommitted_log_id(this.committed_log_id);
+ }
+ result.setLeader_addr(this.leader_addr);
+ if (__optional_isset.get(__LEADER_PORT_ISSET_ID)) {
+ result.setLeader_port(this.leader_port);
+ }
+ if (__optional_isset.get(__LAST_LOG_TERM_SENT_ISSET_ID)) {
+ result.setLast_log_term_sent(this.last_log_term_sent);
+ }
+ if (__optional_isset.get(__LAST_LOG_ID_SENT_ISSET_ID)) {
+ result.setLast_log_id_sent(this.last_log_id_sent);
+ }
+ if (__optional_isset.get(__LOG_TERM_ISSET_ID)) {
+ result.setLog_term(this.log_term);
+ }
+ result.setLog_str_list(this.log_str_list);
+ if (__optional_isset.get(__SENDING_SNAPSHOT_ISSET_ID)) {
+ result.setSending_snapshot(this.sending_snapshot);
+ }
+ return result;
+ }
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public AppendLogRequest(AppendLogRequest other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ this.space = TBaseHelper.deepCopy(other.space);
+ this.part = TBaseHelper.deepCopy(other.part);
+ this.current_term = TBaseHelper.deepCopy(other.current_term);
+ this.last_log_id = TBaseHelper.deepCopy(other.last_log_id);
+ this.committed_log_id = TBaseHelper.deepCopy(other.committed_log_id);
+ if (other.isSetLeader_addr()) {
+ this.leader_addr = TBaseHelper.deepCopy(other.leader_addr);
+ }
+ this.leader_port = TBaseHelper.deepCopy(other.leader_port);
+ this.last_log_term_sent = TBaseHelper.deepCopy(other.last_log_term_sent);
+ this.last_log_id_sent = TBaseHelper.deepCopy(other.last_log_id_sent);
+ this.log_term = TBaseHelper.deepCopy(other.log_term);
+ if (other.isSetLog_str_list()) {
+ this.log_str_list = TBaseHelper.deepCopy(other.log_str_list);
+ }
+ this.sending_snapshot = TBaseHelper.deepCopy(other.sending_snapshot);
+ }
+
+ public AppendLogRequest deepCopy() {
+ return new AppendLogRequest(this);
+ }
+
+ public int getSpace() {
+ return this.space;
+ }
+
+ public AppendLogRequest setSpace(int space) {
+ this.space = space;
+ setSpaceIsSet(true);
+ return this;
+ }
+
+ public void unsetSpace() {
+ __isset_bit_vector.clear(__SPACE_ISSET_ID);
+ }
+
+ // Returns true if field space is set (has been assigned a value) and false otherwise
+ public boolean isSetSpace() {
+ return __isset_bit_vector.get(__SPACE_ISSET_ID);
+ }
+
+ public void setSpaceIsSet(boolean __value) {
+ __isset_bit_vector.set(__SPACE_ISSET_ID, __value);
+ }
+
+ public int getPart() {
+ return this.part;
+ }
+
+ public AppendLogRequest setPart(int part) {
+ this.part = part;
+ setPartIsSet(true);
+ return this;
+ }
+
+ public void unsetPart() {
+ __isset_bit_vector.clear(__PART_ISSET_ID);
+ }
+
+ // Returns true if field part is set (has been assigned a value) and false otherwise
+ public boolean isSetPart() {
+ return __isset_bit_vector.get(__PART_ISSET_ID);
+ }
+
+ public void setPartIsSet(boolean __value) {
+ __isset_bit_vector.set(__PART_ISSET_ID, __value);
+ }
+
+ public long getCurrent_term() {
+ return this.current_term;
+ }
+
+ public AppendLogRequest setCurrent_term(long current_term) {
+ this.current_term = current_term;
+ setCurrent_termIsSet(true);
+ return this;
+ }
+
+ public void unsetCurrent_term() {
+ __isset_bit_vector.clear(__CURRENT_TERM_ISSET_ID);
+ }
+
+ // Returns true if field current_term is set (has been assigned a value) and false otherwise
+ public boolean isSetCurrent_term() {
+ return __isset_bit_vector.get(__CURRENT_TERM_ISSET_ID);
+ }
+
+ public void setCurrent_termIsSet(boolean __value) {
+ __isset_bit_vector.set(__CURRENT_TERM_ISSET_ID, __value);
+ }
+
+ public long getLast_log_id() {
+ return this.last_log_id;
+ }
+
+ public AppendLogRequest setLast_log_id(long last_log_id) {
+ this.last_log_id = last_log_id;
+ setLast_log_idIsSet(true);
+ return this;
+ }
+
+ public void unsetLast_log_id() {
+ __isset_bit_vector.clear(__LAST_LOG_ID_ISSET_ID);
+ }
+
+ // Returns true if field last_log_id is set (has been assigned a value) and false otherwise
+ public boolean isSetLast_log_id() {
+ return __isset_bit_vector.get(__LAST_LOG_ID_ISSET_ID);
+ }
+
+ public void setLast_log_idIsSet(boolean __value) {
+ __isset_bit_vector.set(__LAST_LOG_ID_ISSET_ID, __value);
+ }
+
+ public long getCommitted_log_id() {
+ return this.committed_log_id;
+ }
+
+ public AppendLogRequest setCommitted_log_id(long committed_log_id) {
+ this.committed_log_id = committed_log_id;
+ setCommitted_log_idIsSet(true);
+ return this;
+ }
+
+ public void unsetCommitted_log_id() {
+ __isset_bit_vector.clear(__COMMITTED_LOG_ID_ISSET_ID);
+ }
+
+ // Returns true if field committed_log_id is set (has been assigned a value) and false otherwise
+ public boolean isSetCommitted_log_id() {
+ return __isset_bit_vector.get(__COMMITTED_LOG_ID_ISSET_ID);
+ }
+
+ public void setCommitted_log_idIsSet(boolean __value) {
+ __isset_bit_vector.set(__COMMITTED_LOG_ID_ISSET_ID, __value);
+ }
+
+ public String getLeader_addr() {
+ return this.leader_addr;
+ }
+
+ public AppendLogRequest setLeader_addr(String leader_addr) {
+ this.leader_addr = leader_addr;
+ return this;
+ }
+
+ public void unsetLeader_addr() {
+ this.leader_addr = null;
+ }
+
+ // Returns true if field leader_addr is set (has been assigned a value) and false otherwise
+ public boolean isSetLeader_addr() {
+ return this.leader_addr != null;
+ }
+
+ public void setLeader_addrIsSet(boolean __value) {
+ if (!__value) {
+ this.leader_addr = null;
+ }
+ }
+
+ public int getLeader_port() {
+ return this.leader_port;
+ }
+
+ public AppendLogRequest setLeader_port(int leader_port) {
+ this.leader_port = leader_port;
+ setLeader_portIsSet(true);
+ return this;
+ }
+
+ public void unsetLeader_port() {
+ __isset_bit_vector.clear(__LEADER_PORT_ISSET_ID);
+ }
+
+ // Returns true if field leader_port is set (has been assigned a value) and false otherwise
+ public boolean isSetLeader_port() {
+ return __isset_bit_vector.get(__LEADER_PORT_ISSET_ID);
+ }
+
+ public void setLeader_portIsSet(boolean __value) {
+ __isset_bit_vector.set(__LEADER_PORT_ISSET_ID, __value);
+ }
+
+ public long getLast_log_term_sent() {
+ return this.last_log_term_sent;
+ }
+
+ public AppendLogRequest setLast_log_term_sent(long last_log_term_sent) {
+ this.last_log_term_sent = last_log_term_sent;
+ setLast_log_term_sentIsSet(true);
+ return this;
+ }
+
+ public void unsetLast_log_term_sent() {
+ __isset_bit_vector.clear(__LAST_LOG_TERM_SENT_ISSET_ID);
+ }
+
+ // Returns true if field last_log_term_sent is set (has been assigned a value) and false otherwise
+ public boolean isSetLast_log_term_sent() {
+ return __isset_bit_vector.get(__LAST_LOG_TERM_SENT_ISSET_ID);
+ }
+
+ public void setLast_log_term_sentIsSet(boolean __value) {
+ __isset_bit_vector.set(__LAST_LOG_TERM_SENT_ISSET_ID, __value);
+ }
+
+ public long getLast_log_id_sent() {
+ return this.last_log_id_sent;
+ }
+
+ public AppendLogRequest setLast_log_id_sent(long last_log_id_sent) {
+ this.last_log_id_sent = last_log_id_sent;
+ setLast_log_id_sentIsSet(true);
+ return this;
+ }
+
+ public void unsetLast_log_id_sent() {
+ __isset_bit_vector.clear(__LAST_LOG_ID_SENT_ISSET_ID);
+ }
+
+ // Returns true if field last_log_id_sent is set (has been assigned a value) and false otherwise
+ public boolean isSetLast_log_id_sent() {
+ return __isset_bit_vector.get(__LAST_LOG_ID_SENT_ISSET_ID);
+ }
+
+ public void setLast_log_id_sentIsSet(boolean __value) {
+ __isset_bit_vector.set(__LAST_LOG_ID_SENT_ISSET_ID, __value);
+ }
+
+ public long getLog_term() {
+ return this.log_term;
+ }
+
+ public AppendLogRequest setLog_term(long log_term) {
+ this.log_term = log_term;
+ setLog_termIsSet(true);
+ return this;
+ }
+
+ public void unsetLog_term() {
+ __isset_bit_vector.clear(__LOG_TERM_ISSET_ID);
+ }
+
+ // Returns true if field log_term is set (has been assigned a value) and false otherwise
+ public boolean isSetLog_term() {
+ return __isset_bit_vector.get(__LOG_TERM_ISSET_ID);
+ }
+
+ public void setLog_termIsSet(boolean __value) {
+ __isset_bit_vector.set(__LOG_TERM_ISSET_ID, __value);
+ }
+
+ public List getLog_str_list() {
+ return this.log_str_list;
+ }
+
+ public AppendLogRequest setLog_str_list(List log_str_list) {
+ this.log_str_list = log_str_list;
+ return this;
+ }
+
+ public void unsetLog_str_list() {
+ this.log_str_list = null;
+ }
+
+ // Returns true if field log_str_list is set (has been assigned a value) and false otherwise
+ public boolean isSetLog_str_list() {
+ return this.log_str_list != null;
+ }
+
+ public void setLog_str_listIsSet(boolean __value) {
+ if (!__value) {
+ this.log_str_list = null;
+ }
+ }
+
+ public boolean isSending_snapshot() {
+ return this.sending_snapshot;
+ }
+
+ public AppendLogRequest setSending_snapshot(boolean sending_snapshot) {
+ this.sending_snapshot = sending_snapshot;
+ setSending_snapshotIsSet(true);
+ return this;
+ }
+
+ public void unsetSending_snapshot() {
+ __isset_bit_vector.clear(__SENDING_SNAPSHOT_ISSET_ID);
+ }
+
+ // Returns true if field sending_snapshot is set (has been assigned a value) and false otherwise
+ public boolean isSetSending_snapshot() {
+ return __isset_bit_vector.get(__SENDING_SNAPSHOT_ISSET_ID);
+ }
+
+ public void setSending_snapshotIsSet(boolean __value) {
+ __isset_bit_vector.set(__SENDING_SNAPSHOT_ISSET_ID, __value);
+ }
+
+ @SuppressWarnings("unchecked")
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case SPACE:
+ if (__value == null) {
+ unsetSpace();
+ } else {
+ setSpace((Integer)__value);
+ }
+ break;
+
+ case PART:
+ if (__value == null) {
+ unsetPart();
+ } else {
+ setPart((Integer)__value);
+ }
+ break;
+
+ case CURRENT_TERM:
+ if (__value == null) {
+ unsetCurrent_term();
+ } else {
+ setCurrent_term((Long)__value);
+ }
+ break;
+
+ case LAST_LOG_ID:
+ if (__value == null) {
+ unsetLast_log_id();
+ } else {
+ setLast_log_id((Long)__value);
+ }
+ break;
+
+ case COMMITTED_LOG_ID:
+ if (__value == null) {
+ unsetCommitted_log_id();
+ } else {
+ setCommitted_log_id((Long)__value);
+ }
+ break;
+
+ case LEADER_ADDR:
+ if (__value == null) {
+ unsetLeader_addr();
+ } else {
+ setLeader_addr((String)__value);
+ }
+ break;
+
+ case LEADER_PORT:
+ if (__value == null) {
+ unsetLeader_port();
+ } else {
+ setLeader_port((Integer)__value);
+ }
+ break;
+
+ case LAST_LOG_TERM_SENT:
+ if (__value == null) {
+ unsetLast_log_term_sent();
+ } else {
+ setLast_log_term_sent((Long)__value);
+ }
+ break;
+
+ case LAST_LOG_ID_SENT:
+ if (__value == null) {
+ unsetLast_log_id_sent();
+ } else {
+ setLast_log_id_sent((Long)__value);
+ }
+ break;
+
+ case LOG_TERM:
+ if (__value == null) {
+ unsetLog_term();
+ } else {
+ setLog_term((Long)__value);
+ }
+ break;
+
+ case LOG_STR_LIST:
+ if (__value == null) {
+ unsetLog_str_list();
+ } else {
+ setLog_str_list((List)__value);
+ }
+ break;
+
+ case SENDING_SNAPSHOT:
+ if (__value == null) {
+ unsetSending_snapshot();
+ } else {
+ setSending_snapshot((Boolean)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case SPACE:
+ return new Integer(getSpace());
+
+ case PART:
+ return new Integer(getPart());
+
+ case CURRENT_TERM:
+ return new Long(getCurrent_term());
+
+ case LAST_LOG_ID:
+ return new Long(getLast_log_id());
+
+ case COMMITTED_LOG_ID:
+ return new Long(getCommitted_log_id());
+
+ case LEADER_ADDR:
+ return getLeader_addr();
+
+ case LEADER_PORT:
+ return new Integer(getLeader_port());
+
+ case LAST_LOG_TERM_SENT:
+ return new Long(getLast_log_term_sent());
+
+ case LAST_LOG_ID_SENT:
+ return new Long(getLast_log_id_sent());
+
+ case LOG_TERM:
+ return new Long(getLog_term());
+
+ case LOG_STR_LIST:
+ return getLog_str_list();
+
+ case SENDING_SNAPSHOT:
+ return new Boolean(isSending_snapshot());
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof AppendLogRequest))
+ return false;
+ AppendLogRequest that = (AppendLogRequest)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.space, that.space)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.part, that.part)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.current_term, that.current_term)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.last_log_id, that.last_log_id)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.committed_log_id, that.committed_log_id)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.isSetLeader_addr(), that.isSetLeader_addr(), this.leader_addr, that.leader_addr)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.leader_port, that.leader_port)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.last_log_term_sent, that.last_log_term_sent)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.last_log_id_sent, that.last_log_id_sent)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.log_term, that.log_term)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.isSetLog_str_list(), that.isSetLog_str_list(), this.log_str_list, that.log_str_list)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.sending_snapshot, that.sending_snapshot)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {space, part, current_term, last_log_id, committed_log_id, leader_addr, leader_port, last_log_term_sent, last_log_id_sent, log_term, log_str_list, sending_snapshot});
+ }
+
+ @Override
+ public int compareTo(AppendLogRequest other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSpace()).compareTo(other.isSetSpace());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(space, other.space);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetPart()).compareTo(other.isSetPart());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(part, other.part);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetCurrent_term()).compareTo(other.isSetCurrent_term());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(current_term, other.current_term);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLast_log_id()).compareTo(other.isSetLast_log_id());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(last_log_id, other.last_log_id);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetCommitted_log_id()).compareTo(other.isSetCommitted_log_id());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(committed_log_id, other.committed_log_id);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLeader_addr()).compareTo(other.isSetLeader_addr());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(leader_addr, other.leader_addr);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLeader_port()).compareTo(other.isSetLeader_port());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(leader_port, other.leader_port);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLast_log_term_sent()).compareTo(other.isSetLast_log_term_sent());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(last_log_term_sent, other.last_log_term_sent);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLast_log_id_sent()).compareTo(other.isSetLast_log_id_sent());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(last_log_id_sent, other.last_log_id_sent);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLog_term()).compareTo(other.isSetLog_term());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(log_term, other.log_term);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLog_str_list()).compareTo(other.isSetLog_str_list());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(log_str_list, other.log_str_list);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetSending_snapshot()).compareTo(other.isSetSending_snapshot());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(sending_snapshot, other.sending_snapshot);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case SPACE:
+ if (__field.type == TType.I32) {
+ this.space = iprot.readI32();
+ setSpaceIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case PART:
+ if (__field.type == TType.I32) {
+ this.part = iprot.readI32();
+ setPartIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case CURRENT_TERM:
+ if (__field.type == TType.I64) {
+ this.current_term = iprot.readI64();
+ setCurrent_termIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LAST_LOG_ID:
+ if (__field.type == TType.I64) {
+ this.last_log_id = iprot.readI64();
+ setLast_log_idIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case COMMITTED_LOG_ID:
+ if (__field.type == TType.I64) {
+ this.committed_log_id = iprot.readI64();
+ setCommitted_log_idIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LEADER_ADDR:
+ if (__field.type == TType.STRING) {
+ this.leader_addr = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LEADER_PORT:
+ if (__field.type == TType.I32) {
+ this.leader_port = iprot.readI32();
+ setLeader_portIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LAST_LOG_TERM_SENT:
+ if (__field.type == TType.I64) {
+ this.last_log_term_sent = iprot.readI64();
+ setLast_log_term_sentIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LAST_LOG_ID_SENT:
+ if (__field.type == TType.I64) {
+ this.last_log_id_sent = iprot.readI64();
+ setLast_log_id_sentIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LOG_TERM:
+ if (__field.type == TType.I64) {
+ this.log_term = iprot.readI64();
+ setLog_termIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LOG_STR_LIST:
+ if (__field.type == TType.LIST) {
+ {
+ TList _list0 = iprot.readListBegin();
+ this.log_str_list = new ArrayList(Math.max(0, _list0.size));
+ for (int _i1 = 0;
+ (_list0.size < 0) ? iprot.peekList() : (_i1 < _list0.size);
+ ++_i1)
+ {
+ LogEntry _elem2;
+ _elem2 = new LogEntry();
+ _elem2.read(iprot);
+ this.log_str_list.add(_elem2);
+ }
+ iprot.readListEnd();
+ }
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case SENDING_SNAPSHOT:
+ if (__field.type == TType.BOOL) {
+ this.sending_snapshot = iprot.readBool();
+ setSending_snapshotIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(SPACE_FIELD_DESC);
+ oprot.writeI32(this.space);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(PART_FIELD_DESC);
+ oprot.writeI32(this.part);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(CURRENT_TERM_FIELD_DESC);
+ oprot.writeI64(this.current_term);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(LAST_LOG_ID_FIELD_DESC);
+ oprot.writeI64(this.last_log_id);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(COMMITTED_LOG_ID_FIELD_DESC);
+ oprot.writeI64(this.committed_log_id);
+ oprot.writeFieldEnd();
+ if (this.leader_addr != null) {
+ oprot.writeFieldBegin(LEADER_ADDR_FIELD_DESC);
+ oprot.writeString(this.leader_addr);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(LEADER_PORT_FIELD_DESC);
+ oprot.writeI32(this.leader_port);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(LAST_LOG_TERM_SENT_FIELD_DESC);
+ oprot.writeI64(this.last_log_term_sent);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(LAST_LOG_ID_SENT_FIELD_DESC);
+ oprot.writeI64(this.last_log_id_sent);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(LOG_TERM_FIELD_DESC);
+ oprot.writeI64(this.log_term);
+ oprot.writeFieldEnd();
+ if (this.log_str_list != null) {
+ oprot.writeFieldBegin(LOG_STR_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new TList(TType.STRUCT, this.log_str_list.size()));
+ for (LogEntry _iter3 : this.log_str_list) {
+ _iter3.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(SENDING_SNAPSHOT_FIELD_DESC);
+ oprot.writeBool(this.sending_snapshot);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("AppendLogRequest");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("space");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getSpace(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("part");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getPart(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("current_term");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getCurrent_term(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("last_log_id");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getLast_log_id(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("committed_log_id");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getCommitted_log_id(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("leader_addr");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getLeader_addr() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getLeader_addr(), indent + 1, prettyPrint));
+ }
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("leader_port");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getLeader_port(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("last_log_term_sent");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getLast_log_term_sent(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("last_log_id_sent");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getLast_log_id_sent(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("log_term");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getLog_term(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("log_str_list");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getLog_str_list() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getLog_str_list(), indent + 1, prettyPrint));
+ }
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("sending_snapshot");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.isSending_snapshot(), indent + 1, prettyPrint));
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+}
+
diff --git a/client/src/main/generated/AppendLogResponse.java b/client/src/main/generated/AppendLogResponse.java
new file mode 100644
index 000000000..58bd6df17
--- /dev/null
+++ b/client/src/main/generated/AppendLogResponse.java
@@ -0,0 +1,783 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.util.Arrays;
+import com.facebook.thrift.*;
+import com.facebook.thrift.annotations.*;
+import com.facebook.thrift.async.*;
+import com.facebook.thrift.meta_data.*;
+import com.facebook.thrift.server.*;
+import com.facebook.thrift.transport.*;
+import com.facebook.thrift.protocol.*;
+
+@SuppressWarnings({ "unused", "serial" })
+public class AppendLogResponse implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("AppendLogResponse");
+ private static final TField ERROR_CODE_FIELD_DESC = new TField("error_code", TType.I32, (short)1);
+ private static final TField CURRENT_TERM_FIELD_DESC = new TField("current_term", TType.I64, (short)2);
+ private static final TField LEADER_ADDR_FIELD_DESC = new TField("leader_addr", TType.STRING, (short)3);
+ private static final TField LEADER_PORT_FIELD_DESC = new TField("leader_port", TType.I32, (short)4);
+ private static final TField COMMITTED_LOG_ID_FIELD_DESC = new TField("committed_log_id", TType.I64, (short)5);
+ private static final TField LAST_LOG_ID_FIELD_DESC = new TField("last_log_id", TType.I64, (short)6);
+ private static final TField LAST_LOG_TERM_FIELD_DESC = new TField("last_log_term", TType.I64, (short)7);
+
+ /**
+ *
+ * @see ErrorCode
+ */
+ public ErrorCode error_code;
+ public long current_term;
+ public String leader_addr;
+ public int leader_port;
+ public long committed_log_id;
+ public long last_log_id;
+ public long last_log_term;
+ public static final int ERROR_CODE = 1;
+ public static final int CURRENT_TERM = 2;
+ public static final int LEADER_ADDR = 3;
+ public static final int LEADER_PORT = 4;
+ public static final int COMMITTED_LOG_ID = 5;
+ public static final int LAST_LOG_ID = 6;
+ public static final int LAST_LOG_TERM = 7;
+
+ // isset id assignments
+ private static final int __CURRENT_TERM_ISSET_ID = 0;
+ private static final int __LEADER_PORT_ISSET_ID = 1;
+ private static final int __COMMITTED_LOG_ID_ISSET_ID = 2;
+ private static final int __LAST_LOG_ID_ISSET_ID = 3;
+ private static final int __LAST_LOG_TERM_ISSET_ID = 4;
+ private BitSet __isset_bit_vector = new BitSet(5);
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(ERROR_CODE, new FieldMetaData("error_code", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMetaDataMap.put(CURRENT_TERM, new FieldMetaData("current_term", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(LEADER_ADDR, new FieldMetaData("leader_addr", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ tmpMetaDataMap.put(LEADER_PORT, new FieldMetaData("leader_port", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMetaDataMap.put(COMMITTED_LOG_ID, new FieldMetaData("committed_log_id", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(LAST_LOG_ID, new FieldMetaData("last_log_id", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(LAST_LOG_TERM, new FieldMetaData("last_log_term", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(AppendLogResponse.class, metaDataMap);
+ }
+
+ public AppendLogResponse() {
+ }
+
+ public AppendLogResponse(
+ ErrorCode error_code,
+ long current_term,
+ String leader_addr,
+ int leader_port,
+ long committed_log_id,
+ long last_log_id,
+ long last_log_term) {
+ this();
+ this.error_code = error_code;
+ this.current_term = current_term;
+ setCurrent_termIsSet(true);
+ this.leader_addr = leader_addr;
+ this.leader_port = leader_port;
+ setLeader_portIsSet(true);
+ this.committed_log_id = committed_log_id;
+ setCommitted_log_idIsSet(true);
+ this.last_log_id = last_log_id;
+ setLast_log_idIsSet(true);
+ this.last_log_term = last_log_term;
+ setLast_log_termIsSet(true);
+ }
+
+ public static class Builder {
+ private ErrorCode error_code;
+ private long current_term;
+ private String leader_addr;
+ private int leader_port;
+ private long committed_log_id;
+ private long last_log_id;
+ private long last_log_term;
+
+ BitSet __optional_isset = new BitSet(5);
+
+ public Builder() {
+ }
+
+ public Builder setError_code(final ErrorCode error_code) {
+ this.error_code = error_code;
+ return this;
+ }
+
+ public Builder setCurrent_term(final long current_term) {
+ this.current_term = current_term;
+ __optional_isset.set(__CURRENT_TERM_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLeader_addr(final String leader_addr) {
+ this.leader_addr = leader_addr;
+ return this;
+ }
+
+ public Builder setLeader_port(final int leader_port) {
+ this.leader_port = leader_port;
+ __optional_isset.set(__LEADER_PORT_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setCommitted_log_id(final long committed_log_id) {
+ this.committed_log_id = committed_log_id;
+ __optional_isset.set(__COMMITTED_LOG_ID_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLast_log_id(final long last_log_id) {
+ this.last_log_id = last_log_id;
+ __optional_isset.set(__LAST_LOG_ID_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLast_log_term(final long last_log_term) {
+ this.last_log_term = last_log_term;
+ __optional_isset.set(__LAST_LOG_TERM_ISSET_ID, true);
+ return this;
+ }
+
+ public AppendLogResponse build() {
+ AppendLogResponse result = new AppendLogResponse();
+ result.setError_code(this.error_code);
+ if (__optional_isset.get(__CURRENT_TERM_ISSET_ID)) {
+ result.setCurrent_term(this.current_term);
+ }
+ result.setLeader_addr(this.leader_addr);
+ if (__optional_isset.get(__LEADER_PORT_ISSET_ID)) {
+ result.setLeader_port(this.leader_port);
+ }
+ if (__optional_isset.get(__COMMITTED_LOG_ID_ISSET_ID)) {
+ result.setCommitted_log_id(this.committed_log_id);
+ }
+ if (__optional_isset.get(__LAST_LOG_ID_ISSET_ID)) {
+ result.setLast_log_id(this.last_log_id);
+ }
+ if (__optional_isset.get(__LAST_LOG_TERM_ISSET_ID)) {
+ result.setLast_log_term(this.last_log_term);
+ }
+ return result;
+ }
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public AppendLogResponse(AppendLogResponse other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ if (other.isSetError_code()) {
+ this.error_code = TBaseHelper.deepCopy(other.error_code);
+ }
+ this.current_term = TBaseHelper.deepCopy(other.current_term);
+ if (other.isSetLeader_addr()) {
+ this.leader_addr = TBaseHelper.deepCopy(other.leader_addr);
+ }
+ this.leader_port = TBaseHelper.deepCopy(other.leader_port);
+ this.committed_log_id = TBaseHelper.deepCopy(other.committed_log_id);
+ this.last_log_id = TBaseHelper.deepCopy(other.last_log_id);
+ this.last_log_term = TBaseHelper.deepCopy(other.last_log_term);
+ }
+
+ public AppendLogResponse deepCopy() {
+ return new AppendLogResponse(this);
+ }
+
+ /**
+ *
+ * @see ErrorCode
+ */
+ public ErrorCode getError_code() {
+ return this.error_code;
+ }
+
+ /**
+ *
+ * @see ErrorCode
+ */
+ public AppendLogResponse setError_code(ErrorCode error_code) {
+ this.error_code = error_code;
+ return this;
+ }
+
+ public void unsetError_code() {
+ this.error_code = null;
+ }
+
+ // Returns true if field error_code is set (has been assigned a value) and false otherwise
+ public boolean isSetError_code() {
+ return this.error_code != null;
+ }
+
+ public void setError_codeIsSet(boolean __value) {
+ if (!__value) {
+ this.error_code = null;
+ }
+ }
+
+ public long getCurrent_term() {
+ return this.current_term;
+ }
+
+ public AppendLogResponse setCurrent_term(long current_term) {
+ this.current_term = current_term;
+ setCurrent_termIsSet(true);
+ return this;
+ }
+
+ public void unsetCurrent_term() {
+ __isset_bit_vector.clear(__CURRENT_TERM_ISSET_ID);
+ }
+
+ // Returns true if field current_term is set (has been assigned a value) and false otherwise
+ public boolean isSetCurrent_term() {
+ return __isset_bit_vector.get(__CURRENT_TERM_ISSET_ID);
+ }
+
+ public void setCurrent_termIsSet(boolean __value) {
+ __isset_bit_vector.set(__CURRENT_TERM_ISSET_ID, __value);
+ }
+
+ public String getLeader_addr() {
+ return this.leader_addr;
+ }
+
+ public AppendLogResponse setLeader_addr(String leader_addr) {
+ this.leader_addr = leader_addr;
+ return this;
+ }
+
+ public void unsetLeader_addr() {
+ this.leader_addr = null;
+ }
+
+ // Returns true if field leader_addr is set (has been assigned a value) and false otherwise
+ public boolean isSetLeader_addr() {
+ return this.leader_addr != null;
+ }
+
+ public void setLeader_addrIsSet(boolean __value) {
+ if (!__value) {
+ this.leader_addr = null;
+ }
+ }
+
+ public int getLeader_port() {
+ return this.leader_port;
+ }
+
+ public AppendLogResponse setLeader_port(int leader_port) {
+ this.leader_port = leader_port;
+ setLeader_portIsSet(true);
+ return this;
+ }
+
+ public void unsetLeader_port() {
+ __isset_bit_vector.clear(__LEADER_PORT_ISSET_ID);
+ }
+
+ // Returns true if field leader_port is set (has been assigned a value) and false otherwise
+ public boolean isSetLeader_port() {
+ return __isset_bit_vector.get(__LEADER_PORT_ISSET_ID);
+ }
+
+ public void setLeader_portIsSet(boolean __value) {
+ __isset_bit_vector.set(__LEADER_PORT_ISSET_ID, __value);
+ }
+
+ public long getCommitted_log_id() {
+ return this.committed_log_id;
+ }
+
+ public AppendLogResponse setCommitted_log_id(long committed_log_id) {
+ this.committed_log_id = committed_log_id;
+ setCommitted_log_idIsSet(true);
+ return this;
+ }
+
+ public void unsetCommitted_log_id() {
+ __isset_bit_vector.clear(__COMMITTED_LOG_ID_ISSET_ID);
+ }
+
+ // Returns true if field committed_log_id is set (has been assigned a value) and false otherwise
+ public boolean isSetCommitted_log_id() {
+ return __isset_bit_vector.get(__COMMITTED_LOG_ID_ISSET_ID);
+ }
+
+ public void setCommitted_log_idIsSet(boolean __value) {
+ __isset_bit_vector.set(__COMMITTED_LOG_ID_ISSET_ID, __value);
+ }
+
+ public long getLast_log_id() {
+ return this.last_log_id;
+ }
+
+ public AppendLogResponse setLast_log_id(long last_log_id) {
+ this.last_log_id = last_log_id;
+ setLast_log_idIsSet(true);
+ return this;
+ }
+
+ public void unsetLast_log_id() {
+ __isset_bit_vector.clear(__LAST_LOG_ID_ISSET_ID);
+ }
+
+ // Returns true if field last_log_id is set (has been assigned a value) and false otherwise
+ public boolean isSetLast_log_id() {
+ return __isset_bit_vector.get(__LAST_LOG_ID_ISSET_ID);
+ }
+
+ public void setLast_log_idIsSet(boolean __value) {
+ __isset_bit_vector.set(__LAST_LOG_ID_ISSET_ID, __value);
+ }
+
+ public long getLast_log_term() {
+ return this.last_log_term;
+ }
+
+ public AppendLogResponse setLast_log_term(long last_log_term) {
+ this.last_log_term = last_log_term;
+ setLast_log_termIsSet(true);
+ return this;
+ }
+
+ public void unsetLast_log_term() {
+ __isset_bit_vector.clear(__LAST_LOG_TERM_ISSET_ID);
+ }
+
+ // Returns true if field last_log_term is set (has been assigned a value) and false otherwise
+ public boolean isSetLast_log_term() {
+ return __isset_bit_vector.get(__LAST_LOG_TERM_ISSET_ID);
+ }
+
+ public void setLast_log_termIsSet(boolean __value) {
+ __isset_bit_vector.set(__LAST_LOG_TERM_ISSET_ID, __value);
+ }
+
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case ERROR_CODE:
+ if (__value == null) {
+ unsetError_code();
+ } else {
+ setError_code((ErrorCode)__value);
+ }
+ break;
+
+ case CURRENT_TERM:
+ if (__value == null) {
+ unsetCurrent_term();
+ } else {
+ setCurrent_term((Long)__value);
+ }
+ break;
+
+ case LEADER_ADDR:
+ if (__value == null) {
+ unsetLeader_addr();
+ } else {
+ setLeader_addr((String)__value);
+ }
+ break;
+
+ case LEADER_PORT:
+ if (__value == null) {
+ unsetLeader_port();
+ } else {
+ setLeader_port((Integer)__value);
+ }
+ break;
+
+ case COMMITTED_LOG_ID:
+ if (__value == null) {
+ unsetCommitted_log_id();
+ } else {
+ setCommitted_log_id((Long)__value);
+ }
+ break;
+
+ case LAST_LOG_ID:
+ if (__value == null) {
+ unsetLast_log_id();
+ } else {
+ setLast_log_id((Long)__value);
+ }
+ break;
+
+ case LAST_LOG_TERM:
+ if (__value == null) {
+ unsetLast_log_term();
+ } else {
+ setLast_log_term((Long)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case ERROR_CODE:
+ return getError_code();
+
+ case CURRENT_TERM:
+ return new Long(getCurrent_term());
+
+ case LEADER_ADDR:
+ return getLeader_addr();
+
+ case LEADER_PORT:
+ return new Integer(getLeader_port());
+
+ case COMMITTED_LOG_ID:
+ return new Long(getCommitted_log_id());
+
+ case LAST_LOG_ID:
+ return new Long(getLast_log_id());
+
+ case LAST_LOG_TERM:
+ return new Long(getLast_log_term());
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof AppendLogResponse))
+ return false;
+ AppendLogResponse that = (AppendLogResponse)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.isSetError_code(), that.isSetError_code(), this.error_code, that.error_code)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.current_term, that.current_term)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.isSetLeader_addr(), that.isSetLeader_addr(), this.leader_addr, that.leader_addr)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.leader_port, that.leader_port)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.committed_log_id, that.committed_log_id)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.last_log_id, that.last_log_id)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.last_log_term, that.last_log_term)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {error_code, current_term, leader_addr, leader_port, committed_log_id, last_log_id, last_log_term});
+ }
+
+ @Override
+ public int compareTo(AppendLogResponse other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetError_code()).compareTo(other.isSetError_code());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(error_code, other.error_code);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetCurrent_term()).compareTo(other.isSetCurrent_term());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(current_term, other.current_term);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLeader_addr()).compareTo(other.isSetLeader_addr());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(leader_addr, other.leader_addr);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLeader_port()).compareTo(other.isSetLeader_port());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(leader_port, other.leader_port);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetCommitted_log_id()).compareTo(other.isSetCommitted_log_id());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(committed_log_id, other.committed_log_id);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLast_log_id()).compareTo(other.isSetLast_log_id());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(last_log_id, other.last_log_id);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLast_log_term()).compareTo(other.isSetLast_log_term());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(last_log_term, other.last_log_term);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case ERROR_CODE:
+ if (__field.type == TType.I32) {
+ this.error_code = ErrorCode.findByValue(iprot.readI32());
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case CURRENT_TERM:
+ if (__field.type == TType.I64) {
+ this.current_term = iprot.readI64();
+ setCurrent_termIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LEADER_ADDR:
+ if (__field.type == TType.STRING) {
+ this.leader_addr = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LEADER_PORT:
+ if (__field.type == TType.I32) {
+ this.leader_port = iprot.readI32();
+ setLeader_portIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case COMMITTED_LOG_ID:
+ if (__field.type == TType.I64) {
+ this.committed_log_id = iprot.readI64();
+ setCommitted_log_idIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LAST_LOG_ID:
+ if (__field.type == TType.I64) {
+ this.last_log_id = iprot.readI64();
+ setLast_log_idIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LAST_LOG_TERM:
+ if (__field.type == TType.I64) {
+ this.last_log_term = iprot.readI64();
+ setLast_log_termIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.error_code != null) {
+ oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);
+ oprot.writeI32(this.error_code == null ? 0 : this.error_code.getValue());
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(CURRENT_TERM_FIELD_DESC);
+ oprot.writeI64(this.current_term);
+ oprot.writeFieldEnd();
+ if (this.leader_addr != null) {
+ oprot.writeFieldBegin(LEADER_ADDR_FIELD_DESC);
+ oprot.writeString(this.leader_addr);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(LEADER_PORT_FIELD_DESC);
+ oprot.writeI32(this.leader_port);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(COMMITTED_LOG_ID_FIELD_DESC);
+ oprot.writeI64(this.committed_log_id);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(LAST_LOG_ID_FIELD_DESC);
+ oprot.writeI64(this.last_log_id);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(LAST_LOG_TERM_FIELD_DESC);
+ oprot.writeI64(this.last_log_term);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("AppendLogResponse");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("error_code");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getError_code() == null) {
+ sb.append("null");
+ } else {
+ String error_code_name = this.getError_code() == null ? "null" : this.getError_code().name();
+ if (error_code_name != null) {
+ sb.append(error_code_name);
+ sb.append(" (");
+ }
+ sb.append(this.getError_code());
+ if (error_code_name != null) {
+ sb.append(")");
+ }
+ }
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("current_term");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getCurrent_term(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("leader_addr");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getLeader_addr() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getLeader_addr(), indent + 1, prettyPrint));
+ }
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("leader_port");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getLeader_port(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("committed_log_id");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getCommitted_log_id(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("last_log_id");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getLast_log_id(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("last_log_term");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getLast_log_term(), indent + 1, prettyPrint));
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+}
+
diff --git a/client/src/main/generated/AskForVoteRequest.java b/client/src/main/generated/AskForVoteRequest.java
new file mode 100644
index 000000000..9922613b9
--- /dev/null
+++ b/client/src/main/generated/AskForVoteRequest.java
@@ -0,0 +1,760 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.util.Arrays;
+import com.facebook.thrift.*;
+import com.facebook.thrift.annotations.*;
+import com.facebook.thrift.async.*;
+import com.facebook.thrift.meta_data.*;
+import com.facebook.thrift.server.*;
+import com.facebook.thrift.transport.*;
+import com.facebook.thrift.protocol.*;
+
+@SuppressWarnings({ "unused", "serial" })
+public class AskForVoteRequest implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("AskForVoteRequest");
+ private static final TField SPACE_FIELD_DESC = new TField("space", TType.I32, (short)1);
+ private static final TField PART_FIELD_DESC = new TField("part", TType.I32, (short)2);
+ private static final TField CANDIDATE_ADDR_FIELD_DESC = new TField("candidate_addr", TType.STRING, (short)3);
+ private static final TField CANDIDATE_PORT_FIELD_DESC = new TField("candidate_port", TType.I32, (short)4);
+ private static final TField TERM_FIELD_DESC = new TField("term", TType.I64, (short)5);
+ private static final TField LAST_LOG_ID_FIELD_DESC = new TField("last_log_id", TType.I64, (short)6);
+ private static final TField LAST_LOG_TERM_FIELD_DESC = new TField("last_log_term", TType.I64, (short)7);
+
+ public int space;
+ public int part;
+ public String candidate_addr;
+ public int candidate_port;
+ public long term;
+ public long last_log_id;
+ public long last_log_term;
+ public static final int SPACE = 1;
+ public static final int PART = 2;
+ public static final int CANDIDATE_ADDR = 3;
+ public static final int CANDIDATE_PORT = 4;
+ public static final int TERM = 5;
+ public static final int LAST_LOG_ID = 6;
+ public static final int LAST_LOG_TERM = 7;
+
+ // isset id assignments
+ private static final int __SPACE_ISSET_ID = 0;
+ private static final int __PART_ISSET_ID = 1;
+ private static final int __CANDIDATE_PORT_ISSET_ID = 2;
+ private static final int __TERM_ISSET_ID = 3;
+ private static final int __LAST_LOG_ID_ISSET_ID = 4;
+ private static final int __LAST_LOG_TERM_ISSET_ID = 5;
+ private BitSet __isset_bit_vector = new BitSet(6);
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(SPACE, new FieldMetaData("space", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMetaDataMap.put(PART, new FieldMetaData("part", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMetaDataMap.put(CANDIDATE_ADDR, new FieldMetaData("candidate_addr", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ tmpMetaDataMap.put(CANDIDATE_PORT, new FieldMetaData("candidate_port", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMetaDataMap.put(TERM, new FieldMetaData("term", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(LAST_LOG_ID, new FieldMetaData("last_log_id", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(LAST_LOG_TERM, new FieldMetaData("last_log_term", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(AskForVoteRequest.class, metaDataMap);
+ }
+
+ public AskForVoteRequest() {
+ }
+
+ public AskForVoteRequest(
+ int space,
+ int part,
+ String candidate_addr,
+ int candidate_port,
+ long term,
+ long last_log_id,
+ long last_log_term) {
+ this();
+ this.space = space;
+ setSpaceIsSet(true);
+ this.part = part;
+ setPartIsSet(true);
+ this.candidate_addr = candidate_addr;
+ this.candidate_port = candidate_port;
+ setCandidate_portIsSet(true);
+ this.term = term;
+ setTermIsSet(true);
+ this.last_log_id = last_log_id;
+ setLast_log_idIsSet(true);
+ this.last_log_term = last_log_term;
+ setLast_log_termIsSet(true);
+ }
+
+ public static class Builder {
+ private int space;
+ private int part;
+ private String candidate_addr;
+ private int candidate_port;
+ private long term;
+ private long last_log_id;
+ private long last_log_term;
+
+ BitSet __optional_isset = new BitSet(6);
+
+ public Builder() {
+ }
+
+ public Builder setSpace(final int space) {
+ this.space = space;
+ __optional_isset.set(__SPACE_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setPart(final int part) {
+ this.part = part;
+ __optional_isset.set(__PART_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setCandidate_addr(final String candidate_addr) {
+ this.candidate_addr = candidate_addr;
+ return this;
+ }
+
+ public Builder setCandidate_port(final int candidate_port) {
+ this.candidate_port = candidate_port;
+ __optional_isset.set(__CANDIDATE_PORT_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setTerm(final long term) {
+ this.term = term;
+ __optional_isset.set(__TERM_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLast_log_id(final long last_log_id) {
+ this.last_log_id = last_log_id;
+ __optional_isset.set(__LAST_LOG_ID_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLast_log_term(final long last_log_term) {
+ this.last_log_term = last_log_term;
+ __optional_isset.set(__LAST_LOG_TERM_ISSET_ID, true);
+ return this;
+ }
+
+ public AskForVoteRequest build() {
+ AskForVoteRequest result = new AskForVoteRequest();
+ if (__optional_isset.get(__SPACE_ISSET_ID)) {
+ result.setSpace(this.space);
+ }
+ if (__optional_isset.get(__PART_ISSET_ID)) {
+ result.setPart(this.part);
+ }
+ result.setCandidate_addr(this.candidate_addr);
+ if (__optional_isset.get(__CANDIDATE_PORT_ISSET_ID)) {
+ result.setCandidate_port(this.candidate_port);
+ }
+ if (__optional_isset.get(__TERM_ISSET_ID)) {
+ result.setTerm(this.term);
+ }
+ if (__optional_isset.get(__LAST_LOG_ID_ISSET_ID)) {
+ result.setLast_log_id(this.last_log_id);
+ }
+ if (__optional_isset.get(__LAST_LOG_TERM_ISSET_ID)) {
+ result.setLast_log_term(this.last_log_term);
+ }
+ return result;
+ }
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public AskForVoteRequest(AskForVoteRequest other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ this.space = TBaseHelper.deepCopy(other.space);
+ this.part = TBaseHelper.deepCopy(other.part);
+ if (other.isSetCandidate_addr()) {
+ this.candidate_addr = TBaseHelper.deepCopy(other.candidate_addr);
+ }
+ this.candidate_port = TBaseHelper.deepCopy(other.candidate_port);
+ this.term = TBaseHelper.deepCopy(other.term);
+ this.last_log_id = TBaseHelper.deepCopy(other.last_log_id);
+ this.last_log_term = TBaseHelper.deepCopy(other.last_log_term);
+ }
+
+ public AskForVoteRequest deepCopy() {
+ return new AskForVoteRequest(this);
+ }
+
+ public int getSpace() {
+ return this.space;
+ }
+
+ public AskForVoteRequest setSpace(int space) {
+ this.space = space;
+ setSpaceIsSet(true);
+ return this;
+ }
+
+ public void unsetSpace() {
+ __isset_bit_vector.clear(__SPACE_ISSET_ID);
+ }
+
+ // Returns true if field space is set (has been assigned a value) and false otherwise
+ public boolean isSetSpace() {
+ return __isset_bit_vector.get(__SPACE_ISSET_ID);
+ }
+
+ public void setSpaceIsSet(boolean __value) {
+ __isset_bit_vector.set(__SPACE_ISSET_ID, __value);
+ }
+
+ public int getPart() {
+ return this.part;
+ }
+
+ public AskForVoteRequest setPart(int part) {
+ this.part = part;
+ setPartIsSet(true);
+ return this;
+ }
+
+ public void unsetPart() {
+ __isset_bit_vector.clear(__PART_ISSET_ID);
+ }
+
+ // Returns true if field part is set (has been assigned a value) and false otherwise
+ public boolean isSetPart() {
+ return __isset_bit_vector.get(__PART_ISSET_ID);
+ }
+
+ public void setPartIsSet(boolean __value) {
+ __isset_bit_vector.set(__PART_ISSET_ID, __value);
+ }
+
+ public String getCandidate_addr() {
+ return this.candidate_addr;
+ }
+
+ public AskForVoteRequest setCandidate_addr(String candidate_addr) {
+ this.candidate_addr = candidate_addr;
+ return this;
+ }
+
+ public void unsetCandidate_addr() {
+ this.candidate_addr = null;
+ }
+
+ // Returns true if field candidate_addr is set (has been assigned a value) and false otherwise
+ public boolean isSetCandidate_addr() {
+ return this.candidate_addr != null;
+ }
+
+ public void setCandidate_addrIsSet(boolean __value) {
+ if (!__value) {
+ this.candidate_addr = null;
+ }
+ }
+
+ public int getCandidate_port() {
+ return this.candidate_port;
+ }
+
+ public AskForVoteRequest setCandidate_port(int candidate_port) {
+ this.candidate_port = candidate_port;
+ setCandidate_portIsSet(true);
+ return this;
+ }
+
+ public void unsetCandidate_port() {
+ __isset_bit_vector.clear(__CANDIDATE_PORT_ISSET_ID);
+ }
+
+ // Returns true if field candidate_port is set (has been assigned a value) and false otherwise
+ public boolean isSetCandidate_port() {
+ return __isset_bit_vector.get(__CANDIDATE_PORT_ISSET_ID);
+ }
+
+ public void setCandidate_portIsSet(boolean __value) {
+ __isset_bit_vector.set(__CANDIDATE_PORT_ISSET_ID, __value);
+ }
+
+ public long getTerm() {
+ return this.term;
+ }
+
+ public AskForVoteRequest setTerm(long term) {
+ this.term = term;
+ setTermIsSet(true);
+ return this;
+ }
+
+ public void unsetTerm() {
+ __isset_bit_vector.clear(__TERM_ISSET_ID);
+ }
+
+ // Returns true if field term is set (has been assigned a value) and false otherwise
+ public boolean isSetTerm() {
+ return __isset_bit_vector.get(__TERM_ISSET_ID);
+ }
+
+ public void setTermIsSet(boolean __value) {
+ __isset_bit_vector.set(__TERM_ISSET_ID, __value);
+ }
+
+ public long getLast_log_id() {
+ return this.last_log_id;
+ }
+
+ public AskForVoteRequest setLast_log_id(long last_log_id) {
+ this.last_log_id = last_log_id;
+ setLast_log_idIsSet(true);
+ return this;
+ }
+
+ public void unsetLast_log_id() {
+ __isset_bit_vector.clear(__LAST_LOG_ID_ISSET_ID);
+ }
+
+ // Returns true if field last_log_id is set (has been assigned a value) and false otherwise
+ public boolean isSetLast_log_id() {
+ return __isset_bit_vector.get(__LAST_LOG_ID_ISSET_ID);
+ }
+
+ public void setLast_log_idIsSet(boolean __value) {
+ __isset_bit_vector.set(__LAST_LOG_ID_ISSET_ID, __value);
+ }
+
+ public long getLast_log_term() {
+ return this.last_log_term;
+ }
+
+ public AskForVoteRequest setLast_log_term(long last_log_term) {
+ this.last_log_term = last_log_term;
+ setLast_log_termIsSet(true);
+ return this;
+ }
+
+ public void unsetLast_log_term() {
+ __isset_bit_vector.clear(__LAST_LOG_TERM_ISSET_ID);
+ }
+
+ // Returns true if field last_log_term is set (has been assigned a value) and false otherwise
+ public boolean isSetLast_log_term() {
+ return __isset_bit_vector.get(__LAST_LOG_TERM_ISSET_ID);
+ }
+
+ public void setLast_log_termIsSet(boolean __value) {
+ __isset_bit_vector.set(__LAST_LOG_TERM_ISSET_ID, __value);
+ }
+
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case SPACE:
+ if (__value == null) {
+ unsetSpace();
+ } else {
+ setSpace((Integer)__value);
+ }
+ break;
+
+ case PART:
+ if (__value == null) {
+ unsetPart();
+ } else {
+ setPart((Integer)__value);
+ }
+ break;
+
+ case CANDIDATE_ADDR:
+ if (__value == null) {
+ unsetCandidate_addr();
+ } else {
+ setCandidate_addr((String)__value);
+ }
+ break;
+
+ case CANDIDATE_PORT:
+ if (__value == null) {
+ unsetCandidate_port();
+ } else {
+ setCandidate_port((Integer)__value);
+ }
+ break;
+
+ case TERM:
+ if (__value == null) {
+ unsetTerm();
+ } else {
+ setTerm((Long)__value);
+ }
+ break;
+
+ case LAST_LOG_ID:
+ if (__value == null) {
+ unsetLast_log_id();
+ } else {
+ setLast_log_id((Long)__value);
+ }
+ break;
+
+ case LAST_LOG_TERM:
+ if (__value == null) {
+ unsetLast_log_term();
+ } else {
+ setLast_log_term((Long)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case SPACE:
+ return new Integer(getSpace());
+
+ case PART:
+ return new Integer(getPart());
+
+ case CANDIDATE_ADDR:
+ return getCandidate_addr();
+
+ case CANDIDATE_PORT:
+ return new Integer(getCandidate_port());
+
+ case TERM:
+ return new Long(getTerm());
+
+ case LAST_LOG_ID:
+ return new Long(getLast_log_id());
+
+ case LAST_LOG_TERM:
+ return new Long(getLast_log_term());
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof AskForVoteRequest))
+ return false;
+ AskForVoteRequest that = (AskForVoteRequest)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.space, that.space)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.part, that.part)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.isSetCandidate_addr(), that.isSetCandidate_addr(), this.candidate_addr, that.candidate_addr)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.candidate_port, that.candidate_port)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.term, that.term)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.last_log_id, that.last_log_id)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.last_log_term, that.last_log_term)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {space, part, candidate_addr, candidate_port, term, last_log_id, last_log_term});
+ }
+
+ @Override
+ public int compareTo(AskForVoteRequest other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSpace()).compareTo(other.isSetSpace());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(space, other.space);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetPart()).compareTo(other.isSetPart());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(part, other.part);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetCandidate_addr()).compareTo(other.isSetCandidate_addr());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(candidate_addr, other.candidate_addr);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetCandidate_port()).compareTo(other.isSetCandidate_port());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(candidate_port, other.candidate_port);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetTerm()).compareTo(other.isSetTerm());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(term, other.term);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLast_log_id()).compareTo(other.isSetLast_log_id());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(last_log_id, other.last_log_id);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLast_log_term()).compareTo(other.isSetLast_log_term());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(last_log_term, other.last_log_term);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case SPACE:
+ if (__field.type == TType.I32) {
+ this.space = iprot.readI32();
+ setSpaceIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case PART:
+ if (__field.type == TType.I32) {
+ this.part = iprot.readI32();
+ setPartIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case CANDIDATE_ADDR:
+ if (__field.type == TType.STRING) {
+ this.candidate_addr = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case CANDIDATE_PORT:
+ if (__field.type == TType.I32) {
+ this.candidate_port = iprot.readI32();
+ setCandidate_portIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case TERM:
+ if (__field.type == TType.I64) {
+ this.term = iprot.readI64();
+ setTermIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LAST_LOG_ID:
+ if (__field.type == TType.I64) {
+ this.last_log_id = iprot.readI64();
+ setLast_log_idIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LAST_LOG_TERM:
+ if (__field.type == TType.I64) {
+ this.last_log_term = iprot.readI64();
+ setLast_log_termIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(SPACE_FIELD_DESC);
+ oprot.writeI32(this.space);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(PART_FIELD_DESC);
+ oprot.writeI32(this.part);
+ oprot.writeFieldEnd();
+ if (this.candidate_addr != null) {
+ oprot.writeFieldBegin(CANDIDATE_ADDR_FIELD_DESC);
+ oprot.writeString(this.candidate_addr);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(CANDIDATE_PORT_FIELD_DESC);
+ oprot.writeI32(this.candidate_port);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(TERM_FIELD_DESC);
+ oprot.writeI64(this.term);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(LAST_LOG_ID_FIELD_DESC);
+ oprot.writeI64(this.last_log_id);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(LAST_LOG_TERM_FIELD_DESC);
+ oprot.writeI64(this.last_log_term);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("AskForVoteRequest");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("space");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getSpace(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("part");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getPart(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("candidate_addr");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getCandidate_addr() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getCandidate_addr(), indent + 1, prettyPrint));
+ }
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("candidate_port");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getCandidate_port(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("term");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getTerm(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("last_log_id");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getLast_log_id(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("last_log_term");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getLast_log_term(), indent + 1, prettyPrint));
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+}
+
diff --git a/client/src/main/generated/AskForVoteResponse.java b/client/src/main/generated/AskForVoteResponse.java
new file mode 100644
index 000000000..19b5fd750
--- /dev/null
+++ b/client/src/main/generated/AskForVoteResponse.java
@@ -0,0 +1,283 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.util.Arrays;
+import com.facebook.thrift.*;
+import com.facebook.thrift.annotations.*;
+import com.facebook.thrift.async.*;
+import com.facebook.thrift.meta_data.*;
+import com.facebook.thrift.server.*;
+import com.facebook.thrift.transport.*;
+import com.facebook.thrift.protocol.*;
+
+@SuppressWarnings({ "unused", "serial" })
+public class AskForVoteResponse implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("AskForVoteResponse");
+ private static final TField ERROR_CODE_FIELD_DESC = new TField("error_code", TType.I32, (short)1);
+
+ /**
+ *
+ * @see ErrorCode
+ */
+ public ErrorCode error_code;
+ public static final int ERROR_CODE = 1;
+
+ // isset id assignments
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(ERROR_CODE, new FieldMetaData("error_code", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(AskForVoteResponse.class, metaDataMap);
+ }
+
+ public AskForVoteResponse() {
+ }
+
+ public AskForVoteResponse(
+ ErrorCode error_code) {
+ this();
+ this.error_code = error_code;
+ }
+
+ public static class Builder {
+ private ErrorCode error_code;
+
+ public Builder() {
+ }
+
+ public Builder setError_code(final ErrorCode error_code) {
+ this.error_code = error_code;
+ return this;
+ }
+
+ public AskForVoteResponse build() {
+ AskForVoteResponse result = new AskForVoteResponse();
+ result.setError_code(this.error_code);
+ return result;
+ }
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public AskForVoteResponse(AskForVoteResponse other) {
+ if (other.isSetError_code()) {
+ this.error_code = TBaseHelper.deepCopy(other.error_code);
+ }
+ }
+
+ public AskForVoteResponse deepCopy() {
+ return new AskForVoteResponse(this);
+ }
+
+ /**
+ *
+ * @see ErrorCode
+ */
+ public ErrorCode getError_code() {
+ return this.error_code;
+ }
+
+ /**
+ *
+ * @see ErrorCode
+ */
+ public AskForVoteResponse setError_code(ErrorCode error_code) {
+ this.error_code = error_code;
+ return this;
+ }
+
+ public void unsetError_code() {
+ this.error_code = null;
+ }
+
+ // Returns true if field error_code is set (has been assigned a value) and false otherwise
+ public boolean isSetError_code() {
+ return this.error_code != null;
+ }
+
+ public void setError_codeIsSet(boolean __value) {
+ if (!__value) {
+ this.error_code = null;
+ }
+ }
+
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case ERROR_CODE:
+ if (__value == null) {
+ unsetError_code();
+ } else {
+ setError_code((ErrorCode)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case ERROR_CODE:
+ return getError_code();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof AskForVoteResponse))
+ return false;
+ AskForVoteResponse that = (AskForVoteResponse)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.isSetError_code(), that.isSetError_code(), this.error_code, that.error_code)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {error_code});
+ }
+
+ @Override
+ public int compareTo(AskForVoteResponse other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetError_code()).compareTo(other.isSetError_code());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(error_code, other.error_code);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case ERROR_CODE:
+ if (__field.type == TType.I32) {
+ this.error_code = ErrorCode.findByValue(iprot.readI32());
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.error_code != null) {
+ oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);
+ oprot.writeI32(this.error_code == null ? 0 : this.error_code.getValue());
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("AskForVoteResponse");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("error_code");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getError_code() == null) {
+ sb.append("null");
+ } else {
+ String error_code_name = this.getError_code() == null ? "null" : this.getError_code().name();
+ if (error_code_name != null) {
+ sb.append(error_code_name);
+ sb.append(" (");
+ }
+ sb.append(this.getError_code());
+ if (error_code_name != null) {
+ sb.append(")");
+ }
+ }
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+}
+
diff --git a/client/src/main/generated/ErrorCode.java b/client/src/main/generated/ErrorCode.java
new file mode 100644
index 000000000..f2d9a87db
--- /dev/null
+++ b/client/src/main/generated/ErrorCode.java
@@ -0,0 +1,62 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+
+import com.facebook.thrift.IntRangeSet;
+import java.util.Map;
+import java.util.HashMap;
+
+@SuppressWarnings({ "unused" })
+public enum ErrorCode implements com.facebook.thrift.TEnum {
+ SUCCEEDED(0),
+ E_LOG_GAP(-1),
+ E_LOG_STALE(-2),
+ E_MISSING_COMMIT(-3),
+ E_WAITING_SNAPSHOT(-4),
+ E_UNKNOWN_PART(-5),
+ E_TERM_OUT_OF_DATE(-6),
+ E_LAST_LOG_TERM_TOO_OLD(-7),
+ E_BAD_STATE(-8),
+ E_WRONG_LEADER(-9),
+ E_WAL_FAIL(-10),
+ E_NOT_READY(-11),
+ E_HOST_STOPPED(-12),
+ E_NOT_A_LEADER(-13),
+ E_HOST_DISCONNECTED(-14),
+ E_TOO_MANY_REQUESTS(-15),
+ E_PERSIST_SNAPSHOT_FAILED(-16),
+ E_BAD_ROLE(-17),
+ E_EXCEPTION(-20);
+
+ private static final Map INDEXED_VALUES = new HashMap();
+
+ static {
+ for (ErrorCode e: values()) {
+ INDEXED_VALUES.put(e.getValue(), e);
+ }
+ }
+
+ private final int value;
+
+ private ErrorCode(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static ErrorCode findByValue(int value) {
+ return INDEXED_VALUES.get(value);
+ }
+}
diff --git a/client/src/main/generated/HeartbeatRequest.java b/client/src/main/generated/HeartbeatRequest.java
new file mode 100644
index 000000000..01c952abd
--- /dev/null
+++ b/client/src/main/generated/HeartbeatRequest.java
@@ -0,0 +1,924 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.util.Arrays;
+import com.facebook.thrift.*;
+import com.facebook.thrift.annotations.*;
+import com.facebook.thrift.async.*;
+import com.facebook.thrift.meta_data.*;
+import com.facebook.thrift.server.*;
+import com.facebook.thrift.transport.*;
+import com.facebook.thrift.protocol.*;
+
+@SuppressWarnings({ "unused", "serial" })
+public class HeartbeatRequest implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("HeartbeatRequest");
+ private static final TField SPACE_FIELD_DESC = new TField("space", TType.I32, (short)1);
+ private static final TField PART_FIELD_DESC = new TField("part", TType.I32, (short)2);
+ private static final TField CURRENT_TERM_FIELD_DESC = new TField("current_term", TType.I64, (short)3);
+ private static final TField LAST_LOG_ID_FIELD_DESC = new TField("last_log_id", TType.I64, (short)4);
+ private static final TField COMMITTED_LOG_ID_FIELD_DESC = new TField("committed_log_id", TType.I64, (short)5);
+ private static final TField LEADER_ADDR_FIELD_DESC = new TField("leader_addr", TType.STRING, (short)6);
+ private static final TField LEADER_PORT_FIELD_DESC = new TField("leader_port", TType.I32, (short)7);
+ private static final TField LAST_LOG_TERM_SENT_FIELD_DESC = new TField("last_log_term_sent", TType.I64, (short)8);
+ private static final TField LAST_LOG_ID_SENT_FIELD_DESC = new TField("last_log_id_sent", TType.I64, (short)9);
+
+ public int space;
+ public int part;
+ public long current_term;
+ public long last_log_id;
+ public long committed_log_id;
+ public String leader_addr;
+ public int leader_port;
+ public long last_log_term_sent;
+ public long last_log_id_sent;
+ public static final int SPACE = 1;
+ public static final int PART = 2;
+ public static final int CURRENT_TERM = 3;
+ public static final int LAST_LOG_ID = 4;
+ public static final int COMMITTED_LOG_ID = 5;
+ public static final int LEADER_ADDR = 6;
+ public static final int LEADER_PORT = 7;
+ public static final int LAST_LOG_TERM_SENT = 8;
+ public static final int LAST_LOG_ID_SENT = 9;
+
+ // isset id assignments
+ private static final int __SPACE_ISSET_ID = 0;
+ private static final int __PART_ISSET_ID = 1;
+ private static final int __CURRENT_TERM_ISSET_ID = 2;
+ private static final int __LAST_LOG_ID_ISSET_ID = 3;
+ private static final int __COMMITTED_LOG_ID_ISSET_ID = 4;
+ private static final int __LEADER_PORT_ISSET_ID = 5;
+ private static final int __LAST_LOG_TERM_SENT_ISSET_ID = 6;
+ private static final int __LAST_LOG_ID_SENT_ISSET_ID = 7;
+ private BitSet __isset_bit_vector = new BitSet(8);
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(SPACE, new FieldMetaData("space", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMetaDataMap.put(PART, new FieldMetaData("part", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMetaDataMap.put(CURRENT_TERM, new FieldMetaData("current_term", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(LAST_LOG_ID, new FieldMetaData("last_log_id", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(COMMITTED_LOG_ID, new FieldMetaData("committed_log_id", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(LEADER_ADDR, new FieldMetaData("leader_addr", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ tmpMetaDataMap.put(LEADER_PORT, new FieldMetaData("leader_port", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMetaDataMap.put(LAST_LOG_TERM_SENT, new FieldMetaData("last_log_term_sent", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(LAST_LOG_ID_SENT, new FieldMetaData("last_log_id_sent", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(HeartbeatRequest.class, metaDataMap);
+ }
+
+ public HeartbeatRequest() {
+ }
+
+ public HeartbeatRequest(
+ int space,
+ int part,
+ long current_term,
+ long last_log_id,
+ long committed_log_id,
+ String leader_addr,
+ int leader_port,
+ long last_log_term_sent,
+ long last_log_id_sent) {
+ this();
+ this.space = space;
+ setSpaceIsSet(true);
+ this.part = part;
+ setPartIsSet(true);
+ this.current_term = current_term;
+ setCurrent_termIsSet(true);
+ this.last_log_id = last_log_id;
+ setLast_log_idIsSet(true);
+ this.committed_log_id = committed_log_id;
+ setCommitted_log_idIsSet(true);
+ this.leader_addr = leader_addr;
+ this.leader_port = leader_port;
+ setLeader_portIsSet(true);
+ this.last_log_term_sent = last_log_term_sent;
+ setLast_log_term_sentIsSet(true);
+ this.last_log_id_sent = last_log_id_sent;
+ setLast_log_id_sentIsSet(true);
+ }
+
+ public static class Builder {
+ private int space;
+ private int part;
+ private long current_term;
+ private long last_log_id;
+ private long committed_log_id;
+ private String leader_addr;
+ private int leader_port;
+ private long last_log_term_sent;
+ private long last_log_id_sent;
+
+ BitSet __optional_isset = new BitSet(8);
+
+ public Builder() {
+ }
+
+ public Builder setSpace(final int space) {
+ this.space = space;
+ __optional_isset.set(__SPACE_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setPart(final int part) {
+ this.part = part;
+ __optional_isset.set(__PART_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setCurrent_term(final long current_term) {
+ this.current_term = current_term;
+ __optional_isset.set(__CURRENT_TERM_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLast_log_id(final long last_log_id) {
+ this.last_log_id = last_log_id;
+ __optional_isset.set(__LAST_LOG_ID_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setCommitted_log_id(final long committed_log_id) {
+ this.committed_log_id = committed_log_id;
+ __optional_isset.set(__COMMITTED_LOG_ID_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLeader_addr(final String leader_addr) {
+ this.leader_addr = leader_addr;
+ return this;
+ }
+
+ public Builder setLeader_port(final int leader_port) {
+ this.leader_port = leader_port;
+ __optional_isset.set(__LEADER_PORT_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLast_log_term_sent(final long last_log_term_sent) {
+ this.last_log_term_sent = last_log_term_sent;
+ __optional_isset.set(__LAST_LOG_TERM_SENT_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLast_log_id_sent(final long last_log_id_sent) {
+ this.last_log_id_sent = last_log_id_sent;
+ __optional_isset.set(__LAST_LOG_ID_SENT_ISSET_ID, true);
+ return this;
+ }
+
+ public HeartbeatRequest build() {
+ HeartbeatRequest result = new HeartbeatRequest();
+ if (__optional_isset.get(__SPACE_ISSET_ID)) {
+ result.setSpace(this.space);
+ }
+ if (__optional_isset.get(__PART_ISSET_ID)) {
+ result.setPart(this.part);
+ }
+ if (__optional_isset.get(__CURRENT_TERM_ISSET_ID)) {
+ result.setCurrent_term(this.current_term);
+ }
+ if (__optional_isset.get(__LAST_LOG_ID_ISSET_ID)) {
+ result.setLast_log_id(this.last_log_id);
+ }
+ if (__optional_isset.get(__COMMITTED_LOG_ID_ISSET_ID)) {
+ result.setCommitted_log_id(this.committed_log_id);
+ }
+ result.setLeader_addr(this.leader_addr);
+ if (__optional_isset.get(__LEADER_PORT_ISSET_ID)) {
+ result.setLeader_port(this.leader_port);
+ }
+ if (__optional_isset.get(__LAST_LOG_TERM_SENT_ISSET_ID)) {
+ result.setLast_log_term_sent(this.last_log_term_sent);
+ }
+ if (__optional_isset.get(__LAST_LOG_ID_SENT_ISSET_ID)) {
+ result.setLast_log_id_sent(this.last_log_id_sent);
+ }
+ return result;
+ }
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public HeartbeatRequest(HeartbeatRequest other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ this.space = TBaseHelper.deepCopy(other.space);
+ this.part = TBaseHelper.deepCopy(other.part);
+ this.current_term = TBaseHelper.deepCopy(other.current_term);
+ this.last_log_id = TBaseHelper.deepCopy(other.last_log_id);
+ this.committed_log_id = TBaseHelper.deepCopy(other.committed_log_id);
+ if (other.isSetLeader_addr()) {
+ this.leader_addr = TBaseHelper.deepCopy(other.leader_addr);
+ }
+ this.leader_port = TBaseHelper.deepCopy(other.leader_port);
+ this.last_log_term_sent = TBaseHelper.deepCopy(other.last_log_term_sent);
+ this.last_log_id_sent = TBaseHelper.deepCopy(other.last_log_id_sent);
+ }
+
+ public HeartbeatRequest deepCopy() {
+ return new HeartbeatRequest(this);
+ }
+
+ public int getSpace() {
+ return this.space;
+ }
+
+ public HeartbeatRequest setSpace(int space) {
+ this.space = space;
+ setSpaceIsSet(true);
+ return this;
+ }
+
+ public void unsetSpace() {
+ __isset_bit_vector.clear(__SPACE_ISSET_ID);
+ }
+
+ // Returns true if field space is set (has been assigned a value) and false otherwise
+ public boolean isSetSpace() {
+ return __isset_bit_vector.get(__SPACE_ISSET_ID);
+ }
+
+ public void setSpaceIsSet(boolean __value) {
+ __isset_bit_vector.set(__SPACE_ISSET_ID, __value);
+ }
+
+ public int getPart() {
+ return this.part;
+ }
+
+ public HeartbeatRequest setPart(int part) {
+ this.part = part;
+ setPartIsSet(true);
+ return this;
+ }
+
+ public void unsetPart() {
+ __isset_bit_vector.clear(__PART_ISSET_ID);
+ }
+
+ // Returns true if field part is set (has been assigned a value) and false otherwise
+ public boolean isSetPart() {
+ return __isset_bit_vector.get(__PART_ISSET_ID);
+ }
+
+ public void setPartIsSet(boolean __value) {
+ __isset_bit_vector.set(__PART_ISSET_ID, __value);
+ }
+
+ public long getCurrent_term() {
+ return this.current_term;
+ }
+
+ public HeartbeatRequest setCurrent_term(long current_term) {
+ this.current_term = current_term;
+ setCurrent_termIsSet(true);
+ return this;
+ }
+
+ public void unsetCurrent_term() {
+ __isset_bit_vector.clear(__CURRENT_TERM_ISSET_ID);
+ }
+
+ // Returns true if field current_term is set (has been assigned a value) and false otherwise
+ public boolean isSetCurrent_term() {
+ return __isset_bit_vector.get(__CURRENT_TERM_ISSET_ID);
+ }
+
+ public void setCurrent_termIsSet(boolean __value) {
+ __isset_bit_vector.set(__CURRENT_TERM_ISSET_ID, __value);
+ }
+
+ public long getLast_log_id() {
+ return this.last_log_id;
+ }
+
+ public HeartbeatRequest setLast_log_id(long last_log_id) {
+ this.last_log_id = last_log_id;
+ setLast_log_idIsSet(true);
+ return this;
+ }
+
+ public void unsetLast_log_id() {
+ __isset_bit_vector.clear(__LAST_LOG_ID_ISSET_ID);
+ }
+
+ // Returns true if field last_log_id is set (has been assigned a value) and false otherwise
+ public boolean isSetLast_log_id() {
+ return __isset_bit_vector.get(__LAST_LOG_ID_ISSET_ID);
+ }
+
+ public void setLast_log_idIsSet(boolean __value) {
+ __isset_bit_vector.set(__LAST_LOG_ID_ISSET_ID, __value);
+ }
+
+ public long getCommitted_log_id() {
+ return this.committed_log_id;
+ }
+
+ public HeartbeatRequest setCommitted_log_id(long committed_log_id) {
+ this.committed_log_id = committed_log_id;
+ setCommitted_log_idIsSet(true);
+ return this;
+ }
+
+ public void unsetCommitted_log_id() {
+ __isset_bit_vector.clear(__COMMITTED_LOG_ID_ISSET_ID);
+ }
+
+ // Returns true if field committed_log_id is set (has been assigned a value) and false otherwise
+ public boolean isSetCommitted_log_id() {
+ return __isset_bit_vector.get(__COMMITTED_LOG_ID_ISSET_ID);
+ }
+
+ public void setCommitted_log_idIsSet(boolean __value) {
+ __isset_bit_vector.set(__COMMITTED_LOG_ID_ISSET_ID, __value);
+ }
+
+ public String getLeader_addr() {
+ return this.leader_addr;
+ }
+
+ public HeartbeatRequest setLeader_addr(String leader_addr) {
+ this.leader_addr = leader_addr;
+ return this;
+ }
+
+ public void unsetLeader_addr() {
+ this.leader_addr = null;
+ }
+
+ // Returns true if field leader_addr is set (has been assigned a value) and false otherwise
+ public boolean isSetLeader_addr() {
+ return this.leader_addr != null;
+ }
+
+ public void setLeader_addrIsSet(boolean __value) {
+ if (!__value) {
+ this.leader_addr = null;
+ }
+ }
+
+ public int getLeader_port() {
+ return this.leader_port;
+ }
+
+ public HeartbeatRequest setLeader_port(int leader_port) {
+ this.leader_port = leader_port;
+ setLeader_portIsSet(true);
+ return this;
+ }
+
+ public void unsetLeader_port() {
+ __isset_bit_vector.clear(__LEADER_PORT_ISSET_ID);
+ }
+
+ // Returns true if field leader_port is set (has been assigned a value) and false otherwise
+ public boolean isSetLeader_port() {
+ return __isset_bit_vector.get(__LEADER_PORT_ISSET_ID);
+ }
+
+ public void setLeader_portIsSet(boolean __value) {
+ __isset_bit_vector.set(__LEADER_PORT_ISSET_ID, __value);
+ }
+
+ public long getLast_log_term_sent() {
+ return this.last_log_term_sent;
+ }
+
+ public HeartbeatRequest setLast_log_term_sent(long last_log_term_sent) {
+ this.last_log_term_sent = last_log_term_sent;
+ setLast_log_term_sentIsSet(true);
+ return this;
+ }
+
+ public void unsetLast_log_term_sent() {
+ __isset_bit_vector.clear(__LAST_LOG_TERM_SENT_ISSET_ID);
+ }
+
+ // Returns true if field last_log_term_sent is set (has been assigned a value) and false otherwise
+ public boolean isSetLast_log_term_sent() {
+ return __isset_bit_vector.get(__LAST_LOG_TERM_SENT_ISSET_ID);
+ }
+
+ public void setLast_log_term_sentIsSet(boolean __value) {
+ __isset_bit_vector.set(__LAST_LOG_TERM_SENT_ISSET_ID, __value);
+ }
+
+ public long getLast_log_id_sent() {
+ return this.last_log_id_sent;
+ }
+
+ public HeartbeatRequest setLast_log_id_sent(long last_log_id_sent) {
+ this.last_log_id_sent = last_log_id_sent;
+ setLast_log_id_sentIsSet(true);
+ return this;
+ }
+
+ public void unsetLast_log_id_sent() {
+ __isset_bit_vector.clear(__LAST_LOG_ID_SENT_ISSET_ID);
+ }
+
+ // Returns true if field last_log_id_sent is set (has been assigned a value) and false otherwise
+ public boolean isSetLast_log_id_sent() {
+ return __isset_bit_vector.get(__LAST_LOG_ID_SENT_ISSET_ID);
+ }
+
+ public void setLast_log_id_sentIsSet(boolean __value) {
+ __isset_bit_vector.set(__LAST_LOG_ID_SENT_ISSET_ID, __value);
+ }
+
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case SPACE:
+ if (__value == null) {
+ unsetSpace();
+ } else {
+ setSpace((Integer)__value);
+ }
+ break;
+
+ case PART:
+ if (__value == null) {
+ unsetPart();
+ } else {
+ setPart((Integer)__value);
+ }
+ break;
+
+ case CURRENT_TERM:
+ if (__value == null) {
+ unsetCurrent_term();
+ } else {
+ setCurrent_term((Long)__value);
+ }
+ break;
+
+ case LAST_LOG_ID:
+ if (__value == null) {
+ unsetLast_log_id();
+ } else {
+ setLast_log_id((Long)__value);
+ }
+ break;
+
+ case COMMITTED_LOG_ID:
+ if (__value == null) {
+ unsetCommitted_log_id();
+ } else {
+ setCommitted_log_id((Long)__value);
+ }
+ break;
+
+ case LEADER_ADDR:
+ if (__value == null) {
+ unsetLeader_addr();
+ } else {
+ setLeader_addr((String)__value);
+ }
+ break;
+
+ case LEADER_PORT:
+ if (__value == null) {
+ unsetLeader_port();
+ } else {
+ setLeader_port((Integer)__value);
+ }
+ break;
+
+ case LAST_LOG_TERM_SENT:
+ if (__value == null) {
+ unsetLast_log_term_sent();
+ } else {
+ setLast_log_term_sent((Long)__value);
+ }
+ break;
+
+ case LAST_LOG_ID_SENT:
+ if (__value == null) {
+ unsetLast_log_id_sent();
+ } else {
+ setLast_log_id_sent((Long)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case SPACE:
+ return new Integer(getSpace());
+
+ case PART:
+ return new Integer(getPart());
+
+ case CURRENT_TERM:
+ return new Long(getCurrent_term());
+
+ case LAST_LOG_ID:
+ return new Long(getLast_log_id());
+
+ case COMMITTED_LOG_ID:
+ return new Long(getCommitted_log_id());
+
+ case LEADER_ADDR:
+ return getLeader_addr();
+
+ case LEADER_PORT:
+ return new Integer(getLeader_port());
+
+ case LAST_LOG_TERM_SENT:
+ return new Long(getLast_log_term_sent());
+
+ case LAST_LOG_ID_SENT:
+ return new Long(getLast_log_id_sent());
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof HeartbeatRequest))
+ return false;
+ HeartbeatRequest that = (HeartbeatRequest)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.space, that.space)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.part, that.part)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.current_term, that.current_term)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.last_log_id, that.last_log_id)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.committed_log_id, that.committed_log_id)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.isSetLeader_addr(), that.isSetLeader_addr(), this.leader_addr, that.leader_addr)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.leader_port, that.leader_port)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.last_log_term_sent, that.last_log_term_sent)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.last_log_id_sent, that.last_log_id_sent)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {space, part, current_term, last_log_id, committed_log_id, leader_addr, leader_port, last_log_term_sent, last_log_id_sent});
+ }
+
+ @Override
+ public int compareTo(HeartbeatRequest other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSpace()).compareTo(other.isSetSpace());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(space, other.space);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetPart()).compareTo(other.isSetPart());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(part, other.part);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetCurrent_term()).compareTo(other.isSetCurrent_term());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(current_term, other.current_term);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLast_log_id()).compareTo(other.isSetLast_log_id());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(last_log_id, other.last_log_id);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetCommitted_log_id()).compareTo(other.isSetCommitted_log_id());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(committed_log_id, other.committed_log_id);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLeader_addr()).compareTo(other.isSetLeader_addr());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(leader_addr, other.leader_addr);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLeader_port()).compareTo(other.isSetLeader_port());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(leader_port, other.leader_port);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLast_log_term_sent()).compareTo(other.isSetLast_log_term_sent());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(last_log_term_sent, other.last_log_term_sent);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLast_log_id_sent()).compareTo(other.isSetLast_log_id_sent());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(last_log_id_sent, other.last_log_id_sent);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case SPACE:
+ if (__field.type == TType.I32) {
+ this.space = iprot.readI32();
+ setSpaceIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case PART:
+ if (__field.type == TType.I32) {
+ this.part = iprot.readI32();
+ setPartIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case CURRENT_TERM:
+ if (__field.type == TType.I64) {
+ this.current_term = iprot.readI64();
+ setCurrent_termIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LAST_LOG_ID:
+ if (__field.type == TType.I64) {
+ this.last_log_id = iprot.readI64();
+ setLast_log_idIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case COMMITTED_LOG_ID:
+ if (__field.type == TType.I64) {
+ this.committed_log_id = iprot.readI64();
+ setCommitted_log_idIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LEADER_ADDR:
+ if (__field.type == TType.STRING) {
+ this.leader_addr = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LEADER_PORT:
+ if (__field.type == TType.I32) {
+ this.leader_port = iprot.readI32();
+ setLeader_portIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LAST_LOG_TERM_SENT:
+ if (__field.type == TType.I64) {
+ this.last_log_term_sent = iprot.readI64();
+ setLast_log_term_sentIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LAST_LOG_ID_SENT:
+ if (__field.type == TType.I64) {
+ this.last_log_id_sent = iprot.readI64();
+ setLast_log_id_sentIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(SPACE_FIELD_DESC);
+ oprot.writeI32(this.space);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(PART_FIELD_DESC);
+ oprot.writeI32(this.part);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(CURRENT_TERM_FIELD_DESC);
+ oprot.writeI64(this.current_term);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(LAST_LOG_ID_FIELD_DESC);
+ oprot.writeI64(this.last_log_id);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(COMMITTED_LOG_ID_FIELD_DESC);
+ oprot.writeI64(this.committed_log_id);
+ oprot.writeFieldEnd();
+ if (this.leader_addr != null) {
+ oprot.writeFieldBegin(LEADER_ADDR_FIELD_DESC);
+ oprot.writeString(this.leader_addr);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(LEADER_PORT_FIELD_DESC);
+ oprot.writeI32(this.leader_port);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(LAST_LOG_TERM_SENT_FIELD_DESC);
+ oprot.writeI64(this.last_log_term_sent);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(LAST_LOG_ID_SENT_FIELD_DESC);
+ oprot.writeI64(this.last_log_id_sent);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("HeartbeatRequest");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("space");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getSpace(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("part");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getPart(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("current_term");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getCurrent_term(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("last_log_id");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getLast_log_id(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("committed_log_id");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getCommitted_log_id(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("leader_addr");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getLeader_addr() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getLeader_addr(), indent + 1, prettyPrint));
+ }
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("leader_port");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getLeader_port(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("last_log_term_sent");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getLast_log_term_sent(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("last_log_id_sent");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getLast_log_id_sent(), indent + 1, prettyPrint));
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+}
+
diff --git a/client/src/main/generated/HeartbeatResponse.java b/client/src/main/generated/HeartbeatResponse.java
new file mode 100644
index 000000000..e4d8120c5
--- /dev/null
+++ b/client/src/main/generated/HeartbeatResponse.java
@@ -0,0 +1,783 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.util.Arrays;
+import com.facebook.thrift.*;
+import com.facebook.thrift.annotations.*;
+import com.facebook.thrift.async.*;
+import com.facebook.thrift.meta_data.*;
+import com.facebook.thrift.server.*;
+import com.facebook.thrift.transport.*;
+import com.facebook.thrift.protocol.*;
+
+@SuppressWarnings({ "unused", "serial" })
+public class HeartbeatResponse implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("HeartbeatResponse");
+ private static final TField ERROR_CODE_FIELD_DESC = new TField("error_code", TType.I32, (short)1);
+ private static final TField CURRENT_TERM_FIELD_DESC = new TField("current_term", TType.I64, (short)2);
+ private static final TField LEADER_ADDR_FIELD_DESC = new TField("leader_addr", TType.STRING, (short)3);
+ private static final TField LEADER_PORT_FIELD_DESC = new TField("leader_port", TType.I32, (short)4);
+ private static final TField COMMITTED_LOG_ID_FIELD_DESC = new TField("committed_log_id", TType.I64, (short)5);
+ private static final TField LAST_LOG_ID_FIELD_DESC = new TField("last_log_id", TType.I64, (short)6);
+ private static final TField LAST_LOG_TERM_FIELD_DESC = new TField("last_log_term", TType.I64, (short)7);
+
+ /**
+ *
+ * @see ErrorCode
+ */
+ public ErrorCode error_code;
+ public long current_term;
+ public String leader_addr;
+ public int leader_port;
+ public long committed_log_id;
+ public long last_log_id;
+ public long last_log_term;
+ public static final int ERROR_CODE = 1;
+ public static final int CURRENT_TERM = 2;
+ public static final int LEADER_ADDR = 3;
+ public static final int LEADER_PORT = 4;
+ public static final int COMMITTED_LOG_ID = 5;
+ public static final int LAST_LOG_ID = 6;
+ public static final int LAST_LOG_TERM = 7;
+
+ // isset id assignments
+ private static final int __CURRENT_TERM_ISSET_ID = 0;
+ private static final int __LEADER_PORT_ISSET_ID = 1;
+ private static final int __COMMITTED_LOG_ID_ISSET_ID = 2;
+ private static final int __LAST_LOG_ID_ISSET_ID = 3;
+ private static final int __LAST_LOG_TERM_ISSET_ID = 4;
+ private BitSet __isset_bit_vector = new BitSet(5);
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(ERROR_CODE, new FieldMetaData("error_code", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMetaDataMap.put(CURRENT_TERM, new FieldMetaData("current_term", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(LEADER_ADDR, new FieldMetaData("leader_addr", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ tmpMetaDataMap.put(LEADER_PORT, new FieldMetaData("leader_port", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMetaDataMap.put(COMMITTED_LOG_ID, new FieldMetaData("committed_log_id", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(LAST_LOG_ID, new FieldMetaData("last_log_id", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(LAST_LOG_TERM, new FieldMetaData("last_log_term", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(HeartbeatResponse.class, metaDataMap);
+ }
+
+ public HeartbeatResponse() {
+ }
+
+ public HeartbeatResponse(
+ ErrorCode error_code,
+ long current_term,
+ String leader_addr,
+ int leader_port,
+ long committed_log_id,
+ long last_log_id,
+ long last_log_term) {
+ this();
+ this.error_code = error_code;
+ this.current_term = current_term;
+ setCurrent_termIsSet(true);
+ this.leader_addr = leader_addr;
+ this.leader_port = leader_port;
+ setLeader_portIsSet(true);
+ this.committed_log_id = committed_log_id;
+ setCommitted_log_idIsSet(true);
+ this.last_log_id = last_log_id;
+ setLast_log_idIsSet(true);
+ this.last_log_term = last_log_term;
+ setLast_log_termIsSet(true);
+ }
+
+ public static class Builder {
+ private ErrorCode error_code;
+ private long current_term;
+ private String leader_addr;
+ private int leader_port;
+ private long committed_log_id;
+ private long last_log_id;
+ private long last_log_term;
+
+ BitSet __optional_isset = new BitSet(5);
+
+ public Builder() {
+ }
+
+ public Builder setError_code(final ErrorCode error_code) {
+ this.error_code = error_code;
+ return this;
+ }
+
+ public Builder setCurrent_term(final long current_term) {
+ this.current_term = current_term;
+ __optional_isset.set(__CURRENT_TERM_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLeader_addr(final String leader_addr) {
+ this.leader_addr = leader_addr;
+ return this;
+ }
+
+ public Builder setLeader_port(final int leader_port) {
+ this.leader_port = leader_port;
+ __optional_isset.set(__LEADER_PORT_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setCommitted_log_id(final long committed_log_id) {
+ this.committed_log_id = committed_log_id;
+ __optional_isset.set(__COMMITTED_LOG_ID_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLast_log_id(final long last_log_id) {
+ this.last_log_id = last_log_id;
+ __optional_isset.set(__LAST_LOG_ID_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLast_log_term(final long last_log_term) {
+ this.last_log_term = last_log_term;
+ __optional_isset.set(__LAST_LOG_TERM_ISSET_ID, true);
+ return this;
+ }
+
+ public HeartbeatResponse build() {
+ HeartbeatResponse result = new HeartbeatResponse();
+ result.setError_code(this.error_code);
+ if (__optional_isset.get(__CURRENT_TERM_ISSET_ID)) {
+ result.setCurrent_term(this.current_term);
+ }
+ result.setLeader_addr(this.leader_addr);
+ if (__optional_isset.get(__LEADER_PORT_ISSET_ID)) {
+ result.setLeader_port(this.leader_port);
+ }
+ if (__optional_isset.get(__COMMITTED_LOG_ID_ISSET_ID)) {
+ result.setCommitted_log_id(this.committed_log_id);
+ }
+ if (__optional_isset.get(__LAST_LOG_ID_ISSET_ID)) {
+ result.setLast_log_id(this.last_log_id);
+ }
+ if (__optional_isset.get(__LAST_LOG_TERM_ISSET_ID)) {
+ result.setLast_log_term(this.last_log_term);
+ }
+ return result;
+ }
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public HeartbeatResponse(HeartbeatResponse other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ if (other.isSetError_code()) {
+ this.error_code = TBaseHelper.deepCopy(other.error_code);
+ }
+ this.current_term = TBaseHelper.deepCopy(other.current_term);
+ if (other.isSetLeader_addr()) {
+ this.leader_addr = TBaseHelper.deepCopy(other.leader_addr);
+ }
+ this.leader_port = TBaseHelper.deepCopy(other.leader_port);
+ this.committed_log_id = TBaseHelper.deepCopy(other.committed_log_id);
+ this.last_log_id = TBaseHelper.deepCopy(other.last_log_id);
+ this.last_log_term = TBaseHelper.deepCopy(other.last_log_term);
+ }
+
+ public HeartbeatResponse deepCopy() {
+ return new HeartbeatResponse(this);
+ }
+
+ /**
+ *
+ * @see ErrorCode
+ */
+ public ErrorCode getError_code() {
+ return this.error_code;
+ }
+
+ /**
+ *
+ * @see ErrorCode
+ */
+ public HeartbeatResponse setError_code(ErrorCode error_code) {
+ this.error_code = error_code;
+ return this;
+ }
+
+ public void unsetError_code() {
+ this.error_code = null;
+ }
+
+ // Returns true if field error_code is set (has been assigned a value) and false otherwise
+ public boolean isSetError_code() {
+ return this.error_code != null;
+ }
+
+ public void setError_codeIsSet(boolean __value) {
+ if (!__value) {
+ this.error_code = null;
+ }
+ }
+
+ public long getCurrent_term() {
+ return this.current_term;
+ }
+
+ public HeartbeatResponse setCurrent_term(long current_term) {
+ this.current_term = current_term;
+ setCurrent_termIsSet(true);
+ return this;
+ }
+
+ public void unsetCurrent_term() {
+ __isset_bit_vector.clear(__CURRENT_TERM_ISSET_ID);
+ }
+
+ // Returns true if field current_term is set (has been assigned a value) and false otherwise
+ public boolean isSetCurrent_term() {
+ return __isset_bit_vector.get(__CURRENT_TERM_ISSET_ID);
+ }
+
+ public void setCurrent_termIsSet(boolean __value) {
+ __isset_bit_vector.set(__CURRENT_TERM_ISSET_ID, __value);
+ }
+
+ public String getLeader_addr() {
+ return this.leader_addr;
+ }
+
+ public HeartbeatResponse setLeader_addr(String leader_addr) {
+ this.leader_addr = leader_addr;
+ return this;
+ }
+
+ public void unsetLeader_addr() {
+ this.leader_addr = null;
+ }
+
+ // Returns true if field leader_addr is set (has been assigned a value) and false otherwise
+ public boolean isSetLeader_addr() {
+ return this.leader_addr != null;
+ }
+
+ public void setLeader_addrIsSet(boolean __value) {
+ if (!__value) {
+ this.leader_addr = null;
+ }
+ }
+
+ public int getLeader_port() {
+ return this.leader_port;
+ }
+
+ public HeartbeatResponse setLeader_port(int leader_port) {
+ this.leader_port = leader_port;
+ setLeader_portIsSet(true);
+ return this;
+ }
+
+ public void unsetLeader_port() {
+ __isset_bit_vector.clear(__LEADER_PORT_ISSET_ID);
+ }
+
+ // Returns true if field leader_port is set (has been assigned a value) and false otherwise
+ public boolean isSetLeader_port() {
+ return __isset_bit_vector.get(__LEADER_PORT_ISSET_ID);
+ }
+
+ public void setLeader_portIsSet(boolean __value) {
+ __isset_bit_vector.set(__LEADER_PORT_ISSET_ID, __value);
+ }
+
+ public long getCommitted_log_id() {
+ return this.committed_log_id;
+ }
+
+ public HeartbeatResponse setCommitted_log_id(long committed_log_id) {
+ this.committed_log_id = committed_log_id;
+ setCommitted_log_idIsSet(true);
+ return this;
+ }
+
+ public void unsetCommitted_log_id() {
+ __isset_bit_vector.clear(__COMMITTED_LOG_ID_ISSET_ID);
+ }
+
+ // Returns true if field committed_log_id is set (has been assigned a value) and false otherwise
+ public boolean isSetCommitted_log_id() {
+ return __isset_bit_vector.get(__COMMITTED_LOG_ID_ISSET_ID);
+ }
+
+ public void setCommitted_log_idIsSet(boolean __value) {
+ __isset_bit_vector.set(__COMMITTED_LOG_ID_ISSET_ID, __value);
+ }
+
+ public long getLast_log_id() {
+ return this.last_log_id;
+ }
+
+ public HeartbeatResponse setLast_log_id(long last_log_id) {
+ this.last_log_id = last_log_id;
+ setLast_log_idIsSet(true);
+ return this;
+ }
+
+ public void unsetLast_log_id() {
+ __isset_bit_vector.clear(__LAST_LOG_ID_ISSET_ID);
+ }
+
+ // Returns true if field last_log_id is set (has been assigned a value) and false otherwise
+ public boolean isSetLast_log_id() {
+ return __isset_bit_vector.get(__LAST_LOG_ID_ISSET_ID);
+ }
+
+ public void setLast_log_idIsSet(boolean __value) {
+ __isset_bit_vector.set(__LAST_LOG_ID_ISSET_ID, __value);
+ }
+
+ public long getLast_log_term() {
+ return this.last_log_term;
+ }
+
+ public HeartbeatResponse setLast_log_term(long last_log_term) {
+ this.last_log_term = last_log_term;
+ setLast_log_termIsSet(true);
+ return this;
+ }
+
+ public void unsetLast_log_term() {
+ __isset_bit_vector.clear(__LAST_LOG_TERM_ISSET_ID);
+ }
+
+ // Returns true if field last_log_term is set (has been assigned a value) and false otherwise
+ public boolean isSetLast_log_term() {
+ return __isset_bit_vector.get(__LAST_LOG_TERM_ISSET_ID);
+ }
+
+ public void setLast_log_termIsSet(boolean __value) {
+ __isset_bit_vector.set(__LAST_LOG_TERM_ISSET_ID, __value);
+ }
+
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case ERROR_CODE:
+ if (__value == null) {
+ unsetError_code();
+ } else {
+ setError_code((ErrorCode)__value);
+ }
+ break;
+
+ case CURRENT_TERM:
+ if (__value == null) {
+ unsetCurrent_term();
+ } else {
+ setCurrent_term((Long)__value);
+ }
+ break;
+
+ case LEADER_ADDR:
+ if (__value == null) {
+ unsetLeader_addr();
+ } else {
+ setLeader_addr((String)__value);
+ }
+ break;
+
+ case LEADER_PORT:
+ if (__value == null) {
+ unsetLeader_port();
+ } else {
+ setLeader_port((Integer)__value);
+ }
+ break;
+
+ case COMMITTED_LOG_ID:
+ if (__value == null) {
+ unsetCommitted_log_id();
+ } else {
+ setCommitted_log_id((Long)__value);
+ }
+ break;
+
+ case LAST_LOG_ID:
+ if (__value == null) {
+ unsetLast_log_id();
+ } else {
+ setLast_log_id((Long)__value);
+ }
+ break;
+
+ case LAST_LOG_TERM:
+ if (__value == null) {
+ unsetLast_log_term();
+ } else {
+ setLast_log_term((Long)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case ERROR_CODE:
+ return getError_code();
+
+ case CURRENT_TERM:
+ return new Long(getCurrent_term());
+
+ case LEADER_ADDR:
+ return getLeader_addr();
+
+ case LEADER_PORT:
+ return new Integer(getLeader_port());
+
+ case COMMITTED_LOG_ID:
+ return new Long(getCommitted_log_id());
+
+ case LAST_LOG_ID:
+ return new Long(getLast_log_id());
+
+ case LAST_LOG_TERM:
+ return new Long(getLast_log_term());
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof HeartbeatResponse))
+ return false;
+ HeartbeatResponse that = (HeartbeatResponse)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.isSetError_code(), that.isSetError_code(), this.error_code, that.error_code)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.current_term, that.current_term)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.isSetLeader_addr(), that.isSetLeader_addr(), this.leader_addr, that.leader_addr)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.leader_port, that.leader_port)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.committed_log_id, that.committed_log_id)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.last_log_id, that.last_log_id)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.last_log_term, that.last_log_term)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {error_code, current_term, leader_addr, leader_port, committed_log_id, last_log_id, last_log_term});
+ }
+
+ @Override
+ public int compareTo(HeartbeatResponse other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetError_code()).compareTo(other.isSetError_code());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(error_code, other.error_code);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetCurrent_term()).compareTo(other.isSetCurrent_term());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(current_term, other.current_term);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLeader_addr()).compareTo(other.isSetLeader_addr());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(leader_addr, other.leader_addr);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLeader_port()).compareTo(other.isSetLeader_port());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(leader_port, other.leader_port);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetCommitted_log_id()).compareTo(other.isSetCommitted_log_id());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(committed_log_id, other.committed_log_id);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLast_log_id()).compareTo(other.isSetLast_log_id());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(last_log_id, other.last_log_id);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLast_log_term()).compareTo(other.isSetLast_log_term());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(last_log_term, other.last_log_term);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case ERROR_CODE:
+ if (__field.type == TType.I32) {
+ this.error_code = ErrorCode.findByValue(iprot.readI32());
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case CURRENT_TERM:
+ if (__field.type == TType.I64) {
+ this.current_term = iprot.readI64();
+ setCurrent_termIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LEADER_ADDR:
+ if (__field.type == TType.STRING) {
+ this.leader_addr = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LEADER_PORT:
+ if (__field.type == TType.I32) {
+ this.leader_port = iprot.readI32();
+ setLeader_portIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case COMMITTED_LOG_ID:
+ if (__field.type == TType.I64) {
+ this.committed_log_id = iprot.readI64();
+ setCommitted_log_idIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LAST_LOG_ID:
+ if (__field.type == TType.I64) {
+ this.last_log_id = iprot.readI64();
+ setLast_log_idIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LAST_LOG_TERM:
+ if (__field.type == TType.I64) {
+ this.last_log_term = iprot.readI64();
+ setLast_log_termIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.error_code != null) {
+ oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);
+ oprot.writeI32(this.error_code == null ? 0 : this.error_code.getValue());
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(CURRENT_TERM_FIELD_DESC);
+ oprot.writeI64(this.current_term);
+ oprot.writeFieldEnd();
+ if (this.leader_addr != null) {
+ oprot.writeFieldBegin(LEADER_ADDR_FIELD_DESC);
+ oprot.writeString(this.leader_addr);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(LEADER_PORT_FIELD_DESC);
+ oprot.writeI32(this.leader_port);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(COMMITTED_LOG_ID_FIELD_DESC);
+ oprot.writeI64(this.committed_log_id);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(LAST_LOG_ID_FIELD_DESC);
+ oprot.writeI64(this.last_log_id);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(LAST_LOG_TERM_FIELD_DESC);
+ oprot.writeI64(this.last_log_term);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("HeartbeatResponse");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("error_code");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getError_code() == null) {
+ sb.append("null");
+ } else {
+ String error_code_name = this.getError_code() == null ? "null" : this.getError_code().name();
+ if (error_code_name != null) {
+ sb.append(error_code_name);
+ sb.append(" (");
+ }
+ sb.append(this.getError_code());
+ if (error_code_name != null) {
+ sb.append(")");
+ }
+ }
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("current_term");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getCurrent_term(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("leader_addr");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getLeader_addr() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getLeader_addr(), indent + 1, prettyPrint));
+ }
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("leader_port");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getLeader_port(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("committed_log_id");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getCommitted_log_id(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("last_log_id");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getLast_log_id(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("last_log_term");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getLast_log_term(), indent + 1, prettyPrint));
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+}
+
diff --git a/client/src/main/generated/LogEntry.java b/client/src/main/generated/LogEntry.java
new file mode 100644
index 000000000..0262d916b
--- /dev/null
+++ b/client/src/main/generated/LogEntry.java
@@ -0,0 +1,355 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.util.Arrays;
+import com.facebook.thrift.*;
+import com.facebook.thrift.annotations.*;
+import com.facebook.thrift.async.*;
+import com.facebook.thrift.meta_data.*;
+import com.facebook.thrift.server.*;
+import com.facebook.thrift.transport.*;
+import com.facebook.thrift.protocol.*;
+
+@SuppressWarnings({ "unused", "serial" })
+public class LogEntry implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("LogEntry");
+ private static final TField CLUSTER_FIELD_DESC = new TField("cluster", TType.I64, (short)1);
+ private static final TField LOG_STR_FIELD_DESC = new TField("log_str", TType.STRING, (short)2);
+
+ public long cluster;
+ public byte[] log_str;
+ public static final int CLUSTER = 1;
+ public static final int LOG_STR = 2;
+
+ // isset id assignments
+ private static final int __CLUSTER_ISSET_ID = 0;
+ private BitSet __isset_bit_vector = new BitSet(1);
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(CLUSTER, new FieldMetaData("cluster", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(LOG_STR, new FieldMetaData("log_str", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(LogEntry.class, metaDataMap);
+ }
+
+ public LogEntry() {
+ }
+
+ public LogEntry(
+ long cluster,
+ byte[] log_str) {
+ this();
+ this.cluster = cluster;
+ setClusterIsSet(true);
+ this.log_str = log_str;
+ }
+
+ public static class Builder {
+ private long cluster;
+ private byte[] log_str;
+
+ BitSet __optional_isset = new BitSet(1);
+
+ public Builder() {
+ }
+
+ public Builder setCluster(final long cluster) {
+ this.cluster = cluster;
+ __optional_isset.set(__CLUSTER_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLog_str(final byte[] log_str) {
+ this.log_str = log_str;
+ return this;
+ }
+
+ public LogEntry build() {
+ LogEntry result = new LogEntry();
+ if (__optional_isset.get(__CLUSTER_ISSET_ID)) {
+ result.setCluster(this.cluster);
+ }
+ result.setLog_str(this.log_str);
+ return result;
+ }
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public LogEntry(LogEntry other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ this.cluster = TBaseHelper.deepCopy(other.cluster);
+ if (other.isSetLog_str()) {
+ this.log_str = TBaseHelper.deepCopy(other.log_str);
+ }
+ }
+
+ public LogEntry deepCopy() {
+ return new LogEntry(this);
+ }
+
+ public long getCluster() {
+ return this.cluster;
+ }
+
+ public LogEntry setCluster(long cluster) {
+ this.cluster = cluster;
+ setClusterIsSet(true);
+ return this;
+ }
+
+ public void unsetCluster() {
+ __isset_bit_vector.clear(__CLUSTER_ISSET_ID);
+ }
+
+ // Returns true if field cluster is set (has been assigned a value) and false otherwise
+ public boolean isSetCluster() {
+ return __isset_bit_vector.get(__CLUSTER_ISSET_ID);
+ }
+
+ public void setClusterIsSet(boolean __value) {
+ __isset_bit_vector.set(__CLUSTER_ISSET_ID, __value);
+ }
+
+ public byte[] getLog_str() {
+ return this.log_str;
+ }
+
+ public LogEntry setLog_str(byte[] log_str) {
+ this.log_str = log_str;
+ return this;
+ }
+
+ public void unsetLog_str() {
+ this.log_str = null;
+ }
+
+ // Returns true if field log_str is set (has been assigned a value) and false otherwise
+ public boolean isSetLog_str() {
+ return this.log_str != null;
+ }
+
+ public void setLog_strIsSet(boolean __value) {
+ if (!__value) {
+ this.log_str = null;
+ }
+ }
+
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case CLUSTER:
+ if (__value == null) {
+ unsetCluster();
+ } else {
+ setCluster((Long)__value);
+ }
+ break;
+
+ case LOG_STR:
+ if (__value == null) {
+ unsetLog_str();
+ } else {
+ setLog_str((byte[])__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case CLUSTER:
+ return new Long(getCluster());
+
+ case LOG_STR:
+ return getLog_str();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof LogEntry))
+ return false;
+ LogEntry that = (LogEntry)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.cluster, that.cluster)) { return false; }
+
+ if (!TBaseHelper.equalsSlow(this.isSetLog_str(), that.isSetLog_str(), this.log_str, that.log_str)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {cluster, log_str});
+ }
+
+ @Override
+ public int compareTo(LogEntry other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetCluster()).compareTo(other.isSetCluster());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(cluster, other.cluster);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLog_str()).compareTo(other.isSetLog_str());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(log_str, other.log_str);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case CLUSTER:
+ if (__field.type == TType.I64) {
+ this.cluster = iprot.readI64();
+ setClusterIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LOG_STR:
+ if (__field.type == TType.STRING) {
+ this.log_str = iprot.readBinary();
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(CLUSTER_FIELD_DESC);
+ oprot.writeI64(this.cluster);
+ oprot.writeFieldEnd();
+ if (this.log_str != null) {
+ oprot.writeFieldBegin(LOG_STR_FIELD_DESC);
+ oprot.writeBinary(this.log_str);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("LogEntry");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("cluster");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getCluster(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("log_str");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getLog_str() == null) {
+ sb.append("null");
+ } else {
+ int __log_str_size = Math.min(this.getLog_str().length, 128);
+ for (int i = 0; i < __log_str_size; i++) {
+ if (i != 0) sb.append(" ");
+ sb.append(Integer.toHexString(this.getLog_str()[i]).length() > 1 ? Integer.toHexString(this.getLog_str()[i]).substring(Integer.toHexString(this.getLog_str()[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.getLog_str()[i]).toUpperCase());
+ }
+ if (this.getLog_str().length > 128) sb.append(" ...");
+ }
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+}
+
diff --git a/client/src/main/generated/RaftexService.java b/client/src/main/generated/RaftexService.java
new file mode 100644
index 000000000..e00e536ca
--- /dev/null
+++ b/client/src/main/generated/RaftexService.java
@@ -0,0 +1,2279 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.facebook.thrift.*;
+import com.facebook.thrift.annotations.*;
+import com.facebook.thrift.async.*;
+import com.facebook.thrift.meta_data.*;
+import com.facebook.thrift.server.*;
+import com.facebook.thrift.transport.*;
+import com.facebook.thrift.protocol.*;
+
+@SuppressWarnings({ "unused", "serial" })
+public class RaftexService {
+
+ public interface Iface {
+
+ public AskForVoteResponse askForVote(AskForVoteRequest req) throws TException;
+
+ public AppendLogResponse appendLog(AppendLogRequest req) throws TException;
+
+ public SendSnapshotResponse sendSnapshot(SendSnapshotRequest req) throws TException;
+
+ public HeartbeatResponse heartbeat(HeartbeatRequest req) throws TException;
+
+ }
+
+ public interface AsyncIface {
+
+ public void askForVote(AskForVoteRequest req, AsyncMethodCallback resultHandler) throws TException;
+
+ public void appendLog(AppendLogRequest req, AsyncMethodCallback resultHandler) throws TException;
+
+ public void sendSnapshot(SendSnapshotRequest req, AsyncMethodCallback resultHandler) throws TException;
+
+ public void heartbeat(HeartbeatRequest req, AsyncMethodCallback resultHandler) throws TException;
+
+ }
+
+ public static class Client extends EventHandlerBase implements Iface, TClientIf {
+ public Client(TProtocol prot)
+ {
+ this(prot, prot);
+ }
+
+ public Client(TProtocol iprot, TProtocol oprot)
+ {
+ iprot_ = iprot;
+ oprot_ = oprot;
+ }
+
+ protected TProtocol iprot_;
+ protected TProtocol oprot_;
+
+ protected int seqid_;
+
+ @Override
+ public TProtocol getInputProtocol()
+ {
+ return this.iprot_;
+ }
+
+ @Override
+ public TProtocol getOutputProtocol()
+ {
+ return this.oprot_;
+ }
+
+ public AskForVoteResponse askForVote(AskForVoteRequest req) throws TException
+ {
+ ContextStack ctx = getContextStack("RaftexService.askForVote", null);
+ this.setContextStack(ctx);
+ send_askForVote(req);
+ return recv_askForVote();
+ }
+
+ public void send_askForVote(AskForVoteRequest req) throws TException
+ {
+ ContextStack ctx = this.getContextStack();
+ super.preWrite(ctx, "RaftexService.askForVote", null);
+ oprot_.writeMessageBegin(new TMessage("askForVote", TMessageType.CALL, seqid_));
+ askForVote_args args = new askForVote_args();
+ args.req = req;
+ args.write(oprot_);
+ oprot_.writeMessageEnd();
+ oprot_.getTransport().flush();
+ super.postWrite(ctx, "RaftexService.askForVote", args);
+ return;
+ }
+
+ public AskForVoteResponse recv_askForVote() throws TException
+ {
+ ContextStack ctx = super.getContextStack();
+ long bytes;
+ TMessageType mtype;
+ super.preRead(ctx, "RaftexService.askForVote");
+ TMessage msg = iprot_.readMessageBegin();
+ if (msg.type == TMessageType.EXCEPTION) {
+ TApplicationException x = TApplicationException.read(iprot_);
+ iprot_.readMessageEnd();
+ throw x;
+ }
+ askForVote_result result = new askForVote_result();
+ result.read(iprot_);
+ iprot_.readMessageEnd();
+ super.postRead(ctx, "RaftexService.askForVote", result);
+
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new TApplicationException(TApplicationException.MISSING_RESULT, "askForVote failed: unknown result");
+ }
+
+ public AppendLogResponse appendLog(AppendLogRequest req) throws TException
+ {
+ ContextStack ctx = getContextStack("RaftexService.appendLog", null);
+ this.setContextStack(ctx);
+ send_appendLog(req);
+ return recv_appendLog();
+ }
+
+ public void send_appendLog(AppendLogRequest req) throws TException
+ {
+ ContextStack ctx = this.getContextStack();
+ super.preWrite(ctx, "RaftexService.appendLog", null);
+ oprot_.writeMessageBegin(new TMessage("appendLog", TMessageType.CALL, seqid_));
+ appendLog_args args = new appendLog_args();
+ args.req = req;
+ args.write(oprot_);
+ oprot_.writeMessageEnd();
+ oprot_.getTransport().flush();
+ super.postWrite(ctx, "RaftexService.appendLog", args);
+ return;
+ }
+
+ public AppendLogResponse recv_appendLog() throws TException
+ {
+ ContextStack ctx = super.getContextStack();
+ long bytes;
+ TMessageType mtype;
+ super.preRead(ctx, "RaftexService.appendLog");
+ TMessage msg = iprot_.readMessageBegin();
+ if (msg.type == TMessageType.EXCEPTION) {
+ TApplicationException x = TApplicationException.read(iprot_);
+ iprot_.readMessageEnd();
+ throw x;
+ }
+ appendLog_result result = new appendLog_result();
+ result.read(iprot_);
+ iprot_.readMessageEnd();
+ super.postRead(ctx, "RaftexService.appendLog", result);
+
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new TApplicationException(TApplicationException.MISSING_RESULT, "appendLog failed: unknown result");
+ }
+
+ public SendSnapshotResponse sendSnapshot(SendSnapshotRequest req) throws TException
+ {
+ ContextStack ctx = getContextStack("RaftexService.sendSnapshot", null);
+ this.setContextStack(ctx);
+ send_sendSnapshot(req);
+ return recv_sendSnapshot();
+ }
+
+ public void send_sendSnapshot(SendSnapshotRequest req) throws TException
+ {
+ ContextStack ctx = this.getContextStack();
+ super.preWrite(ctx, "RaftexService.sendSnapshot", null);
+ oprot_.writeMessageBegin(new TMessage("sendSnapshot", TMessageType.CALL, seqid_));
+ sendSnapshot_args args = new sendSnapshot_args();
+ args.req = req;
+ args.write(oprot_);
+ oprot_.writeMessageEnd();
+ oprot_.getTransport().flush();
+ super.postWrite(ctx, "RaftexService.sendSnapshot", args);
+ return;
+ }
+
+ public SendSnapshotResponse recv_sendSnapshot() throws TException
+ {
+ ContextStack ctx = super.getContextStack();
+ long bytes;
+ TMessageType mtype;
+ super.preRead(ctx, "RaftexService.sendSnapshot");
+ TMessage msg = iprot_.readMessageBegin();
+ if (msg.type == TMessageType.EXCEPTION) {
+ TApplicationException x = TApplicationException.read(iprot_);
+ iprot_.readMessageEnd();
+ throw x;
+ }
+ sendSnapshot_result result = new sendSnapshot_result();
+ result.read(iprot_);
+ iprot_.readMessageEnd();
+ super.postRead(ctx, "RaftexService.sendSnapshot", result);
+
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendSnapshot failed: unknown result");
+ }
+
+ public HeartbeatResponse heartbeat(HeartbeatRequest req) throws TException
+ {
+ ContextStack ctx = getContextStack("RaftexService.heartbeat", null);
+ this.setContextStack(ctx);
+ send_heartbeat(req);
+ return recv_heartbeat();
+ }
+
+ public void send_heartbeat(HeartbeatRequest req) throws TException
+ {
+ ContextStack ctx = this.getContextStack();
+ super.preWrite(ctx, "RaftexService.heartbeat", null);
+ oprot_.writeMessageBegin(new TMessage("heartbeat", TMessageType.CALL, seqid_));
+ heartbeat_args args = new heartbeat_args();
+ args.req = req;
+ args.write(oprot_);
+ oprot_.writeMessageEnd();
+ oprot_.getTransport().flush();
+ super.postWrite(ctx, "RaftexService.heartbeat", args);
+ return;
+ }
+
+ public HeartbeatResponse recv_heartbeat() throws TException
+ {
+ ContextStack ctx = super.getContextStack();
+ long bytes;
+ TMessageType mtype;
+ super.preRead(ctx, "RaftexService.heartbeat");
+ TMessage msg = iprot_.readMessageBegin();
+ if (msg.type == TMessageType.EXCEPTION) {
+ TApplicationException x = TApplicationException.read(iprot_);
+ iprot_.readMessageEnd();
+ throw x;
+ }
+ heartbeat_result result = new heartbeat_result();
+ result.read(iprot_);
+ iprot_.readMessageEnd();
+ super.postRead(ctx, "RaftexService.heartbeat", result);
+
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new TApplicationException(TApplicationException.MISSING_RESULT, "heartbeat failed: unknown result");
+ }
+
+ }
+ public static class AsyncClient extends TAsyncClient implements AsyncIface {
+ public static class Factory implements TAsyncClientFactory {
+ private TAsyncClientManager clientManager;
+ private TProtocolFactory protocolFactory;
+ public Factory(TAsyncClientManager clientManager, TProtocolFactory protocolFactory) {
+ this.clientManager = clientManager;
+ this.protocolFactory = protocolFactory;
+ }
+ public AsyncClient getAsyncClient(TNonblockingTransport transport) {
+ return new AsyncClient(protocolFactory, clientManager, transport);
+ }
+ }
+
+ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientManager, TNonblockingTransport transport) {
+ super(protocolFactory, clientManager, transport);
+ }
+
+ public void askForVote(AskForVoteRequest req, AsyncMethodCallback resultHandler15) throws TException {
+ checkReady();
+ askForVote_call method_call = new askForVote_call(req, resultHandler15, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class askForVote_call extends TAsyncMethodCall {
+ private AskForVoteRequest req;
+ public askForVote_call(AskForVoteRequest req, AsyncMethodCallback resultHandler16, TAsyncClient client12, TProtocolFactory protocolFactory13, TNonblockingTransport transport14) throws TException {
+ super(client12, protocolFactory13, transport14, resultHandler16, false);
+ this.req = req;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("askForVote", TMessageType.CALL, 0));
+ askForVote_args args = new askForVote_args();
+ args.setReq(req);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public AskForVoteResponse getResult() throws TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_askForVote();
+ }
+ }
+
+ public void appendLog(AppendLogRequest req, AsyncMethodCallback resultHandler20) throws TException {
+ checkReady();
+ appendLog_call method_call = new appendLog_call(req, resultHandler20, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class appendLog_call extends TAsyncMethodCall {
+ private AppendLogRequest req;
+ public appendLog_call(AppendLogRequest req, AsyncMethodCallback resultHandler21, TAsyncClient client17, TProtocolFactory protocolFactory18, TNonblockingTransport transport19) throws TException {
+ super(client17, protocolFactory18, transport19, resultHandler21, false);
+ this.req = req;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("appendLog", TMessageType.CALL, 0));
+ appendLog_args args = new appendLog_args();
+ args.setReq(req);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public AppendLogResponse getResult() throws TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_appendLog();
+ }
+ }
+
+ public void sendSnapshot(SendSnapshotRequest req, AsyncMethodCallback resultHandler25) throws TException {
+ checkReady();
+ sendSnapshot_call method_call = new sendSnapshot_call(req, resultHandler25, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class sendSnapshot_call extends TAsyncMethodCall {
+ private SendSnapshotRequest req;
+ public sendSnapshot_call(SendSnapshotRequest req, AsyncMethodCallback resultHandler26, TAsyncClient client22, TProtocolFactory protocolFactory23, TNonblockingTransport transport24) throws TException {
+ super(client22, protocolFactory23, transport24, resultHandler26, false);
+ this.req = req;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("sendSnapshot", TMessageType.CALL, 0));
+ sendSnapshot_args args = new sendSnapshot_args();
+ args.setReq(req);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public SendSnapshotResponse getResult() throws TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_sendSnapshot();
+ }
+ }
+
+ public void heartbeat(HeartbeatRequest req, AsyncMethodCallback resultHandler30) throws TException {
+ checkReady();
+ heartbeat_call method_call = new heartbeat_call(req, resultHandler30, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class heartbeat_call extends TAsyncMethodCall {
+ private HeartbeatRequest req;
+ public heartbeat_call(HeartbeatRequest req, AsyncMethodCallback resultHandler31, TAsyncClient client27, TProtocolFactory protocolFactory28, TNonblockingTransport transport29) throws TException {
+ super(client27, protocolFactory28, transport29, resultHandler31, false);
+ this.req = req;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("heartbeat", TMessageType.CALL, 0));
+ heartbeat_args args = new heartbeat_args();
+ args.setReq(req);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public HeartbeatResponse getResult() throws TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_heartbeat();
+ }
+ }
+
+ }
+
+ public static class Processor implements TProcessor {
+ private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+ public Processor(Iface iface)
+ {
+ iface_ = iface;
+ event_handler_ = new TProcessorEventHandler(); // Empty handler
+ processMap_.put("askForVote", new askForVote());
+ processMap_.put("appendLog", new appendLog());
+ processMap_.put("sendSnapshot", new sendSnapshot());
+ processMap_.put("heartbeat", new heartbeat());
+ }
+
+ protected static interface ProcessFunction {
+ public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException;
+ }
+
+ public void setEventHandler(TProcessorEventHandler handler) {
+ this.event_handler_ = handler;
+ }
+
+ private Iface iface_;
+ protected TProcessorEventHandler event_handler_;
+ protected final HashMap processMap_ = new HashMap();
+
+ public boolean process(TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException
+ {
+ TMessage msg = iprot.readMessageBegin();
+ ProcessFunction fn = processMap_.get(msg.name);
+ if (fn == null) {
+ TProtocolUtil.skip(iprot, TType.STRUCT);
+ iprot.readMessageEnd();
+ TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
+ oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
+ x.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ return true;
+ }
+ fn.process(msg.seqid, iprot, oprot, server_ctx);
+ return true;
+ }
+
+ private class askForVote implements ProcessFunction {
+ public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException
+ {
+ Object handler_ctx = event_handler_.getContext("RaftexService.askForVote", server_ctx);
+ askForVote_args args = new askForVote_args();
+ event_handler_.preRead(handler_ctx, "RaftexService.askForVote");
+ args.read(iprot);
+ iprot.readMessageEnd();
+ event_handler_.postRead(handler_ctx, "RaftexService.askForVote", args);
+ askForVote_result result = new askForVote_result();
+ result.success = iface_.askForVote(args.req);
+ event_handler_.preWrite(handler_ctx, "RaftexService.askForVote", result);
+ oprot.writeMessageBegin(new TMessage("askForVote", TMessageType.REPLY, seqid));
+ result.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ event_handler_.postWrite(handler_ctx, "RaftexService.askForVote", result);
+ }
+
+ }
+
+ private class appendLog implements ProcessFunction {
+ public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException
+ {
+ Object handler_ctx = event_handler_.getContext("RaftexService.appendLog", server_ctx);
+ appendLog_args args = new appendLog_args();
+ event_handler_.preRead(handler_ctx, "RaftexService.appendLog");
+ args.read(iprot);
+ iprot.readMessageEnd();
+ event_handler_.postRead(handler_ctx, "RaftexService.appendLog", args);
+ appendLog_result result = new appendLog_result();
+ result.success = iface_.appendLog(args.req);
+ event_handler_.preWrite(handler_ctx, "RaftexService.appendLog", result);
+ oprot.writeMessageBegin(new TMessage("appendLog", TMessageType.REPLY, seqid));
+ result.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ event_handler_.postWrite(handler_ctx, "RaftexService.appendLog", result);
+ }
+
+ }
+
+ private class sendSnapshot implements ProcessFunction {
+ public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException
+ {
+ Object handler_ctx = event_handler_.getContext("RaftexService.sendSnapshot", server_ctx);
+ sendSnapshot_args args = new sendSnapshot_args();
+ event_handler_.preRead(handler_ctx, "RaftexService.sendSnapshot");
+ args.read(iprot);
+ iprot.readMessageEnd();
+ event_handler_.postRead(handler_ctx, "RaftexService.sendSnapshot", args);
+ sendSnapshot_result result = new sendSnapshot_result();
+ result.success = iface_.sendSnapshot(args.req);
+ event_handler_.preWrite(handler_ctx, "RaftexService.sendSnapshot", result);
+ oprot.writeMessageBegin(new TMessage("sendSnapshot", TMessageType.REPLY, seqid));
+ result.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ event_handler_.postWrite(handler_ctx, "RaftexService.sendSnapshot", result);
+ }
+
+ }
+
+ private class heartbeat implements ProcessFunction {
+ public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException
+ {
+ Object handler_ctx = event_handler_.getContext("RaftexService.heartbeat", server_ctx);
+ heartbeat_args args = new heartbeat_args();
+ event_handler_.preRead(handler_ctx, "RaftexService.heartbeat");
+ args.read(iprot);
+ iprot.readMessageEnd();
+ event_handler_.postRead(handler_ctx, "RaftexService.heartbeat", args);
+ heartbeat_result result = new heartbeat_result();
+ result.success = iface_.heartbeat(args.req);
+ event_handler_.preWrite(handler_ctx, "RaftexService.heartbeat", result);
+ oprot.writeMessageBegin(new TMessage("heartbeat", TMessageType.REPLY, seqid));
+ result.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ event_handler_.postWrite(handler_ctx, "RaftexService.heartbeat", result);
+ }
+
+ }
+
+ }
+
+ public static class askForVote_args implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("askForVote_args");
+ private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1);
+
+ public AskForVoteRequest req;
+ public static final int REQ = 1;
+
+ // isset id assignments
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(REQ, new FieldMetaData("req", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, AskForVoteRequest.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(askForVote_args.class, metaDataMap);
+ }
+
+ public askForVote_args() {
+ }
+
+ public askForVote_args(
+ AskForVoteRequest req) {
+ this();
+ this.req = req;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public askForVote_args(askForVote_args other) {
+ if (other.isSetReq()) {
+ this.req = TBaseHelper.deepCopy(other.req);
+ }
+ }
+
+ public askForVote_args deepCopy() {
+ return new askForVote_args(this);
+ }
+
+ public AskForVoteRequest getReq() {
+ return this.req;
+ }
+
+ public askForVote_args setReq(AskForVoteRequest req) {
+ this.req = req;
+ return this;
+ }
+
+ public void unsetReq() {
+ this.req = null;
+ }
+
+ // Returns true if field req is set (has been assigned a value) and false otherwise
+ public boolean isSetReq() {
+ return this.req != null;
+ }
+
+ public void setReqIsSet(boolean __value) {
+ if (!__value) {
+ this.req = null;
+ }
+ }
+
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case REQ:
+ if (__value == null) {
+ unsetReq();
+ } else {
+ setReq((AskForVoteRequest)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case REQ:
+ return getReq();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof askForVote_args))
+ return false;
+ askForVote_args that = (askForVote_args)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.isSetReq(), that.isSetReq(), this.req, that.req)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {req});
+ }
+
+ @Override
+ public int compareTo(askForVote_args other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(req, other.req);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case REQ:
+ if (__field.type == TType.STRUCT) {
+ this.req = new AskForVoteRequest();
+ this.req.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.req != null) {
+ oprot.writeFieldBegin(REQ_FIELD_DESC);
+ this.req.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("askForVote_args");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("req");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getReq() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getReq(), indent + 1, prettyPrint));
+ }
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+ }
+
+ public static class askForVote_result implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("askForVote_result");
+ private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
+
+ public AskForVoteResponse success;
+ public static final int SUCCESS = 0;
+
+ // isset id assignments
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, AskForVoteResponse.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(askForVote_result.class, metaDataMap);
+ }
+
+ public askForVote_result() {
+ }
+
+ public askForVote_result(
+ AskForVoteResponse success) {
+ this();
+ this.success = success;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public askForVote_result(askForVote_result other) {
+ if (other.isSetSuccess()) {
+ this.success = TBaseHelper.deepCopy(other.success);
+ }
+ }
+
+ public askForVote_result deepCopy() {
+ return new askForVote_result(this);
+ }
+
+ public AskForVoteResponse getSuccess() {
+ return this.success;
+ }
+
+ public askForVote_result setSuccess(AskForVoteResponse success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ // Returns true if field success is set (has been assigned a value) and false otherwise
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean __value) {
+ if (!__value) {
+ this.success = null;
+ }
+ }
+
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case SUCCESS:
+ if (__value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((AskForVoteResponse)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case SUCCESS:
+ return getSuccess();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof askForVote_result))
+ return false;
+ askForVote_result that = (askForVote_result)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {success});
+ }
+
+ @Override
+ public int compareTo(askForVote_result other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case SUCCESS:
+ if (__field.type == TType.STRUCT) {
+ this.success = new AskForVoteResponse();
+ this.success.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ oprot.writeStructBegin(STRUCT_DESC);
+
+ if (this.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ this.success.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("askForVote_result");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("success");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getSuccess() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getSuccess(), indent + 1, prettyPrint));
+ }
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+ }
+
+ public static class appendLog_args implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("appendLog_args");
+ private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1);
+
+ public AppendLogRequest req;
+ public static final int REQ = 1;
+
+ // isset id assignments
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(REQ, new FieldMetaData("req", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, AppendLogRequest.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(appendLog_args.class, metaDataMap);
+ }
+
+ public appendLog_args() {
+ }
+
+ public appendLog_args(
+ AppendLogRequest req) {
+ this();
+ this.req = req;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public appendLog_args(appendLog_args other) {
+ if (other.isSetReq()) {
+ this.req = TBaseHelper.deepCopy(other.req);
+ }
+ }
+
+ public appendLog_args deepCopy() {
+ return new appendLog_args(this);
+ }
+
+ public AppendLogRequest getReq() {
+ return this.req;
+ }
+
+ public appendLog_args setReq(AppendLogRequest req) {
+ this.req = req;
+ return this;
+ }
+
+ public void unsetReq() {
+ this.req = null;
+ }
+
+ // Returns true if field req is set (has been assigned a value) and false otherwise
+ public boolean isSetReq() {
+ return this.req != null;
+ }
+
+ public void setReqIsSet(boolean __value) {
+ if (!__value) {
+ this.req = null;
+ }
+ }
+
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case REQ:
+ if (__value == null) {
+ unsetReq();
+ } else {
+ setReq((AppendLogRequest)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case REQ:
+ return getReq();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof appendLog_args))
+ return false;
+ appendLog_args that = (appendLog_args)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.isSetReq(), that.isSetReq(), this.req, that.req)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {req});
+ }
+
+ @Override
+ public int compareTo(appendLog_args other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(req, other.req);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case REQ:
+ if (__field.type == TType.STRUCT) {
+ this.req = new AppendLogRequest();
+ this.req.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.req != null) {
+ oprot.writeFieldBegin(REQ_FIELD_DESC);
+ this.req.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("appendLog_args");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("req");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getReq() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getReq(), indent + 1, prettyPrint));
+ }
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+ }
+
+ public static class appendLog_result implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("appendLog_result");
+ private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
+
+ public AppendLogResponse success;
+ public static final int SUCCESS = 0;
+
+ // isset id assignments
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, AppendLogResponse.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(appendLog_result.class, metaDataMap);
+ }
+
+ public appendLog_result() {
+ }
+
+ public appendLog_result(
+ AppendLogResponse success) {
+ this();
+ this.success = success;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public appendLog_result(appendLog_result other) {
+ if (other.isSetSuccess()) {
+ this.success = TBaseHelper.deepCopy(other.success);
+ }
+ }
+
+ public appendLog_result deepCopy() {
+ return new appendLog_result(this);
+ }
+
+ public AppendLogResponse getSuccess() {
+ return this.success;
+ }
+
+ public appendLog_result setSuccess(AppendLogResponse success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ // Returns true if field success is set (has been assigned a value) and false otherwise
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean __value) {
+ if (!__value) {
+ this.success = null;
+ }
+ }
+
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case SUCCESS:
+ if (__value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((AppendLogResponse)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case SUCCESS:
+ return getSuccess();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof appendLog_result))
+ return false;
+ appendLog_result that = (appendLog_result)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {success});
+ }
+
+ @Override
+ public int compareTo(appendLog_result other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case SUCCESS:
+ if (__field.type == TType.STRUCT) {
+ this.success = new AppendLogResponse();
+ this.success.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ oprot.writeStructBegin(STRUCT_DESC);
+
+ if (this.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ this.success.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("appendLog_result");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("success");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getSuccess() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getSuccess(), indent + 1, prettyPrint));
+ }
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+ }
+
+ public static class sendSnapshot_args implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("sendSnapshot_args");
+ private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1);
+
+ public SendSnapshotRequest req;
+ public static final int REQ = 1;
+
+ // isset id assignments
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(REQ, new FieldMetaData("req", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, SendSnapshotRequest.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(sendSnapshot_args.class, metaDataMap);
+ }
+
+ public sendSnapshot_args() {
+ }
+
+ public sendSnapshot_args(
+ SendSnapshotRequest req) {
+ this();
+ this.req = req;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public sendSnapshot_args(sendSnapshot_args other) {
+ if (other.isSetReq()) {
+ this.req = TBaseHelper.deepCopy(other.req);
+ }
+ }
+
+ public sendSnapshot_args deepCopy() {
+ return new sendSnapshot_args(this);
+ }
+
+ public SendSnapshotRequest getReq() {
+ return this.req;
+ }
+
+ public sendSnapshot_args setReq(SendSnapshotRequest req) {
+ this.req = req;
+ return this;
+ }
+
+ public void unsetReq() {
+ this.req = null;
+ }
+
+ // Returns true if field req is set (has been assigned a value) and false otherwise
+ public boolean isSetReq() {
+ return this.req != null;
+ }
+
+ public void setReqIsSet(boolean __value) {
+ if (!__value) {
+ this.req = null;
+ }
+ }
+
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case REQ:
+ if (__value == null) {
+ unsetReq();
+ } else {
+ setReq((SendSnapshotRequest)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case REQ:
+ return getReq();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof sendSnapshot_args))
+ return false;
+ sendSnapshot_args that = (sendSnapshot_args)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.isSetReq(), that.isSetReq(), this.req, that.req)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {req});
+ }
+
+ @Override
+ public int compareTo(sendSnapshot_args other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(req, other.req);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case REQ:
+ if (__field.type == TType.STRUCT) {
+ this.req = new SendSnapshotRequest();
+ this.req.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.req != null) {
+ oprot.writeFieldBegin(REQ_FIELD_DESC);
+ this.req.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("sendSnapshot_args");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("req");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getReq() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getReq(), indent + 1, prettyPrint));
+ }
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+ }
+
+ public static class sendSnapshot_result implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("sendSnapshot_result");
+ private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
+
+ public SendSnapshotResponse success;
+ public static final int SUCCESS = 0;
+
+ // isset id assignments
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, SendSnapshotResponse.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(sendSnapshot_result.class, metaDataMap);
+ }
+
+ public sendSnapshot_result() {
+ }
+
+ public sendSnapshot_result(
+ SendSnapshotResponse success) {
+ this();
+ this.success = success;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public sendSnapshot_result(sendSnapshot_result other) {
+ if (other.isSetSuccess()) {
+ this.success = TBaseHelper.deepCopy(other.success);
+ }
+ }
+
+ public sendSnapshot_result deepCopy() {
+ return new sendSnapshot_result(this);
+ }
+
+ public SendSnapshotResponse getSuccess() {
+ return this.success;
+ }
+
+ public sendSnapshot_result setSuccess(SendSnapshotResponse success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ // Returns true if field success is set (has been assigned a value) and false otherwise
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean __value) {
+ if (!__value) {
+ this.success = null;
+ }
+ }
+
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case SUCCESS:
+ if (__value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((SendSnapshotResponse)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case SUCCESS:
+ return getSuccess();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof sendSnapshot_result))
+ return false;
+ sendSnapshot_result that = (sendSnapshot_result)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {success});
+ }
+
+ @Override
+ public int compareTo(sendSnapshot_result other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case SUCCESS:
+ if (__field.type == TType.STRUCT) {
+ this.success = new SendSnapshotResponse();
+ this.success.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ oprot.writeStructBegin(STRUCT_DESC);
+
+ if (this.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ this.success.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("sendSnapshot_result");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("success");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getSuccess() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getSuccess(), indent + 1, prettyPrint));
+ }
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+ }
+
+ public static class heartbeat_args implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("heartbeat_args");
+ private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1);
+
+ public HeartbeatRequest req;
+ public static final int REQ = 1;
+
+ // isset id assignments
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(REQ, new FieldMetaData("req", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, HeartbeatRequest.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(heartbeat_args.class, metaDataMap);
+ }
+
+ public heartbeat_args() {
+ }
+
+ public heartbeat_args(
+ HeartbeatRequest req) {
+ this();
+ this.req = req;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public heartbeat_args(heartbeat_args other) {
+ if (other.isSetReq()) {
+ this.req = TBaseHelper.deepCopy(other.req);
+ }
+ }
+
+ public heartbeat_args deepCopy() {
+ return new heartbeat_args(this);
+ }
+
+ public HeartbeatRequest getReq() {
+ return this.req;
+ }
+
+ public heartbeat_args setReq(HeartbeatRequest req) {
+ this.req = req;
+ return this;
+ }
+
+ public void unsetReq() {
+ this.req = null;
+ }
+
+ // Returns true if field req is set (has been assigned a value) and false otherwise
+ public boolean isSetReq() {
+ return this.req != null;
+ }
+
+ public void setReqIsSet(boolean __value) {
+ if (!__value) {
+ this.req = null;
+ }
+ }
+
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case REQ:
+ if (__value == null) {
+ unsetReq();
+ } else {
+ setReq((HeartbeatRequest)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case REQ:
+ return getReq();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof heartbeat_args))
+ return false;
+ heartbeat_args that = (heartbeat_args)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.isSetReq(), that.isSetReq(), this.req, that.req)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {req});
+ }
+
+ @Override
+ public int compareTo(heartbeat_args other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(req, other.req);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case REQ:
+ if (__field.type == TType.STRUCT) {
+ this.req = new HeartbeatRequest();
+ this.req.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.req != null) {
+ oprot.writeFieldBegin(REQ_FIELD_DESC);
+ this.req.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("heartbeat_args");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("req");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getReq() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getReq(), indent + 1, prettyPrint));
+ }
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+ }
+
+ public static class heartbeat_result implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("heartbeat_result");
+ private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
+
+ public HeartbeatResponse success;
+ public static final int SUCCESS = 0;
+
+ // isset id assignments
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, HeartbeatResponse.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(heartbeat_result.class, metaDataMap);
+ }
+
+ public heartbeat_result() {
+ }
+
+ public heartbeat_result(
+ HeartbeatResponse success) {
+ this();
+ this.success = success;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public heartbeat_result(heartbeat_result other) {
+ if (other.isSetSuccess()) {
+ this.success = TBaseHelper.deepCopy(other.success);
+ }
+ }
+
+ public heartbeat_result deepCopy() {
+ return new heartbeat_result(this);
+ }
+
+ public HeartbeatResponse getSuccess() {
+ return this.success;
+ }
+
+ public heartbeat_result setSuccess(HeartbeatResponse success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ // Returns true if field success is set (has been assigned a value) and false otherwise
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean __value) {
+ if (!__value) {
+ this.success = null;
+ }
+ }
+
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case SUCCESS:
+ if (__value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((HeartbeatResponse)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case SUCCESS:
+ return getSuccess();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof heartbeat_result))
+ return false;
+ heartbeat_result that = (heartbeat_result)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {success});
+ }
+
+ @Override
+ public int compareTo(heartbeat_result other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case SUCCESS:
+ if (__field.type == TType.STRUCT) {
+ this.success = new HeartbeatResponse();
+ this.success.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ oprot.writeStructBegin(STRUCT_DESC);
+
+ if (this.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ this.success.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("heartbeat_result");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("success");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getSuccess() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getSuccess(), indent + 1, prettyPrint));
+ }
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+ }
+
+}
diff --git a/client/src/main/generated/SendSnapshotRequest.java b/client/src/main/generated/SendSnapshotRequest.java
new file mode 100644
index 000000000..fba18ea9e
--- /dev/null
+++ b/client/src/main/generated/SendSnapshotRequest.java
@@ -0,0 +1,1111 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.util.Arrays;
+import com.facebook.thrift.*;
+import com.facebook.thrift.annotations.*;
+import com.facebook.thrift.async.*;
+import com.facebook.thrift.meta_data.*;
+import com.facebook.thrift.server.*;
+import com.facebook.thrift.transport.*;
+import com.facebook.thrift.protocol.*;
+
+@SuppressWarnings({ "unused", "serial" })
+public class SendSnapshotRequest implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("SendSnapshotRequest");
+ private static final TField SPACE_FIELD_DESC = new TField("space", TType.I32, (short)1);
+ private static final TField PART_FIELD_DESC = new TField("part", TType.I32, (short)2);
+ private static final TField TERM_FIELD_DESC = new TField("term", TType.I64, (short)3);
+ private static final TField COMMITTED_LOG_ID_FIELD_DESC = new TField("committed_log_id", TType.I64, (short)4);
+ private static final TField COMMITTED_LOG_TERM_FIELD_DESC = new TField("committed_log_term", TType.I64, (short)5);
+ private static final TField LEADER_ADDR_FIELD_DESC = new TField("leader_addr", TType.STRING, (short)6);
+ private static final TField LEADER_PORT_FIELD_DESC = new TField("leader_port", TType.I32, (short)7);
+ private static final TField ROWS_FIELD_DESC = new TField("rows", TType.LIST, (short)8);
+ private static final TField TOTAL_SIZE_FIELD_DESC = new TField("total_size", TType.I64, (short)9);
+ private static final TField TOTAL_COUNT_FIELD_DESC = new TField("total_count", TType.I64, (short)10);
+ private static final TField DONE_FIELD_DESC = new TField("done", TType.BOOL, (short)11);
+
+ public int space;
+ public int part;
+ public long term;
+ public long committed_log_id;
+ public long committed_log_term;
+ public String leader_addr;
+ public int leader_port;
+ public List rows;
+ public long total_size;
+ public long total_count;
+ public boolean done;
+ public static final int SPACE = 1;
+ public static final int PART = 2;
+ public static final int TERM = 3;
+ public static final int COMMITTED_LOG_ID = 4;
+ public static final int COMMITTED_LOG_TERM = 5;
+ public static final int LEADER_ADDR = 6;
+ public static final int LEADER_PORT = 7;
+ public static final int ROWS = 8;
+ public static final int TOTAL_SIZE = 9;
+ public static final int TOTAL_COUNT = 10;
+ public static final int DONE = 11;
+
+ // isset id assignments
+ private static final int __SPACE_ISSET_ID = 0;
+ private static final int __PART_ISSET_ID = 1;
+ private static final int __TERM_ISSET_ID = 2;
+ private static final int __COMMITTED_LOG_ID_ISSET_ID = 3;
+ private static final int __COMMITTED_LOG_TERM_ISSET_ID = 4;
+ private static final int __LEADER_PORT_ISSET_ID = 5;
+ private static final int __TOTAL_SIZE_ISSET_ID = 6;
+ private static final int __TOTAL_COUNT_ISSET_ID = 7;
+ private static final int __DONE_ISSET_ID = 8;
+ private BitSet __isset_bit_vector = new BitSet(9);
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(SPACE, new FieldMetaData("space", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMetaDataMap.put(PART, new FieldMetaData("part", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMetaDataMap.put(TERM, new FieldMetaData("term", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(COMMITTED_LOG_ID, new FieldMetaData("committed_log_id", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(COMMITTED_LOG_TERM, new FieldMetaData("committed_log_term", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(LEADER_ADDR, new FieldMetaData("leader_addr", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ tmpMetaDataMap.put(LEADER_PORT, new FieldMetaData("leader_port", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMetaDataMap.put(ROWS, new FieldMetaData("rows", TFieldRequirementType.DEFAULT,
+ new ListMetaData(TType.LIST,
+ new FieldValueMetaData(TType.STRING))));
+ tmpMetaDataMap.put(TOTAL_SIZE, new FieldMetaData("total_size", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(TOTAL_COUNT, new FieldMetaData("total_count", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(SendSnapshotRequest.class, metaDataMap);
+ }
+
+ public SendSnapshotRequest() {
+ }
+
+ public SendSnapshotRequest(
+ int space,
+ int part,
+ long term,
+ long committed_log_id,
+ long committed_log_term,
+ String leader_addr,
+ int leader_port,
+ List rows,
+ long total_size,
+ long total_count,
+ boolean done) {
+ this();
+ this.space = space;
+ setSpaceIsSet(true);
+ this.part = part;
+ setPartIsSet(true);
+ this.term = term;
+ setTermIsSet(true);
+ this.committed_log_id = committed_log_id;
+ setCommitted_log_idIsSet(true);
+ this.committed_log_term = committed_log_term;
+ setCommitted_log_termIsSet(true);
+ this.leader_addr = leader_addr;
+ this.leader_port = leader_port;
+ setLeader_portIsSet(true);
+ this.rows = rows;
+ this.total_size = total_size;
+ setTotal_sizeIsSet(true);
+ this.total_count = total_count;
+ setTotal_countIsSet(true);
+ this.done = done;
+ setDoneIsSet(true);
+ }
+
+ public static class Builder {
+ private int space;
+ private int part;
+ private long term;
+ private long committed_log_id;
+ private long committed_log_term;
+ private String leader_addr;
+ private int leader_port;
+ private List rows;
+ private long total_size;
+ private long total_count;
+ private boolean done;
+
+ BitSet __optional_isset = new BitSet(9);
+
+ public Builder() {
+ }
+
+ public Builder setSpace(final int space) {
+ this.space = space;
+ __optional_isset.set(__SPACE_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setPart(final int part) {
+ this.part = part;
+ __optional_isset.set(__PART_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setTerm(final long term) {
+ this.term = term;
+ __optional_isset.set(__TERM_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setCommitted_log_id(final long committed_log_id) {
+ this.committed_log_id = committed_log_id;
+ __optional_isset.set(__COMMITTED_LOG_ID_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setCommitted_log_term(final long committed_log_term) {
+ this.committed_log_term = committed_log_term;
+ __optional_isset.set(__COMMITTED_LOG_TERM_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setLeader_addr(final String leader_addr) {
+ this.leader_addr = leader_addr;
+ return this;
+ }
+
+ public Builder setLeader_port(final int leader_port) {
+ this.leader_port = leader_port;
+ __optional_isset.set(__LEADER_PORT_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setRows(final List rows) {
+ this.rows = rows;
+ return this;
+ }
+
+ public Builder setTotal_size(final long total_size) {
+ this.total_size = total_size;
+ __optional_isset.set(__TOTAL_SIZE_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setTotal_count(final long total_count) {
+ this.total_count = total_count;
+ __optional_isset.set(__TOTAL_COUNT_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setDone(final boolean done) {
+ this.done = done;
+ __optional_isset.set(__DONE_ISSET_ID, true);
+ return this;
+ }
+
+ public SendSnapshotRequest build() {
+ SendSnapshotRequest result = new SendSnapshotRequest();
+ if (__optional_isset.get(__SPACE_ISSET_ID)) {
+ result.setSpace(this.space);
+ }
+ if (__optional_isset.get(__PART_ISSET_ID)) {
+ result.setPart(this.part);
+ }
+ if (__optional_isset.get(__TERM_ISSET_ID)) {
+ result.setTerm(this.term);
+ }
+ if (__optional_isset.get(__COMMITTED_LOG_ID_ISSET_ID)) {
+ result.setCommitted_log_id(this.committed_log_id);
+ }
+ if (__optional_isset.get(__COMMITTED_LOG_TERM_ISSET_ID)) {
+ result.setCommitted_log_term(this.committed_log_term);
+ }
+ result.setLeader_addr(this.leader_addr);
+ if (__optional_isset.get(__LEADER_PORT_ISSET_ID)) {
+ result.setLeader_port(this.leader_port);
+ }
+ result.setRows(this.rows);
+ if (__optional_isset.get(__TOTAL_SIZE_ISSET_ID)) {
+ result.setTotal_size(this.total_size);
+ }
+ if (__optional_isset.get(__TOTAL_COUNT_ISSET_ID)) {
+ result.setTotal_count(this.total_count);
+ }
+ if (__optional_isset.get(__DONE_ISSET_ID)) {
+ result.setDone(this.done);
+ }
+ return result;
+ }
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public SendSnapshotRequest(SendSnapshotRequest other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ this.space = TBaseHelper.deepCopy(other.space);
+ this.part = TBaseHelper.deepCopy(other.part);
+ this.term = TBaseHelper.deepCopy(other.term);
+ this.committed_log_id = TBaseHelper.deepCopy(other.committed_log_id);
+ this.committed_log_term = TBaseHelper.deepCopy(other.committed_log_term);
+ if (other.isSetLeader_addr()) {
+ this.leader_addr = TBaseHelper.deepCopy(other.leader_addr);
+ }
+ this.leader_port = TBaseHelper.deepCopy(other.leader_port);
+ if (other.isSetRows()) {
+ this.rows = TBaseHelper.deepCopy(other.rows);
+ }
+ this.total_size = TBaseHelper.deepCopy(other.total_size);
+ this.total_count = TBaseHelper.deepCopy(other.total_count);
+ this.done = TBaseHelper.deepCopy(other.done);
+ }
+
+ public SendSnapshotRequest deepCopy() {
+ return new SendSnapshotRequest(this);
+ }
+
+ public int getSpace() {
+ return this.space;
+ }
+
+ public SendSnapshotRequest setSpace(int space) {
+ this.space = space;
+ setSpaceIsSet(true);
+ return this;
+ }
+
+ public void unsetSpace() {
+ __isset_bit_vector.clear(__SPACE_ISSET_ID);
+ }
+
+ // Returns true if field space is set (has been assigned a value) and false otherwise
+ public boolean isSetSpace() {
+ return __isset_bit_vector.get(__SPACE_ISSET_ID);
+ }
+
+ public void setSpaceIsSet(boolean __value) {
+ __isset_bit_vector.set(__SPACE_ISSET_ID, __value);
+ }
+
+ public int getPart() {
+ return this.part;
+ }
+
+ public SendSnapshotRequest setPart(int part) {
+ this.part = part;
+ setPartIsSet(true);
+ return this;
+ }
+
+ public void unsetPart() {
+ __isset_bit_vector.clear(__PART_ISSET_ID);
+ }
+
+ // Returns true if field part is set (has been assigned a value) and false otherwise
+ public boolean isSetPart() {
+ return __isset_bit_vector.get(__PART_ISSET_ID);
+ }
+
+ public void setPartIsSet(boolean __value) {
+ __isset_bit_vector.set(__PART_ISSET_ID, __value);
+ }
+
+ public long getTerm() {
+ return this.term;
+ }
+
+ public SendSnapshotRequest setTerm(long term) {
+ this.term = term;
+ setTermIsSet(true);
+ return this;
+ }
+
+ public void unsetTerm() {
+ __isset_bit_vector.clear(__TERM_ISSET_ID);
+ }
+
+ // Returns true if field term is set (has been assigned a value) and false otherwise
+ public boolean isSetTerm() {
+ return __isset_bit_vector.get(__TERM_ISSET_ID);
+ }
+
+ public void setTermIsSet(boolean __value) {
+ __isset_bit_vector.set(__TERM_ISSET_ID, __value);
+ }
+
+ public long getCommitted_log_id() {
+ return this.committed_log_id;
+ }
+
+ public SendSnapshotRequest setCommitted_log_id(long committed_log_id) {
+ this.committed_log_id = committed_log_id;
+ setCommitted_log_idIsSet(true);
+ return this;
+ }
+
+ public void unsetCommitted_log_id() {
+ __isset_bit_vector.clear(__COMMITTED_LOG_ID_ISSET_ID);
+ }
+
+ // Returns true if field committed_log_id is set (has been assigned a value) and false otherwise
+ public boolean isSetCommitted_log_id() {
+ return __isset_bit_vector.get(__COMMITTED_LOG_ID_ISSET_ID);
+ }
+
+ public void setCommitted_log_idIsSet(boolean __value) {
+ __isset_bit_vector.set(__COMMITTED_LOG_ID_ISSET_ID, __value);
+ }
+
+ public long getCommitted_log_term() {
+ return this.committed_log_term;
+ }
+
+ public SendSnapshotRequest setCommitted_log_term(long committed_log_term) {
+ this.committed_log_term = committed_log_term;
+ setCommitted_log_termIsSet(true);
+ return this;
+ }
+
+ public void unsetCommitted_log_term() {
+ __isset_bit_vector.clear(__COMMITTED_LOG_TERM_ISSET_ID);
+ }
+
+ // Returns true if field committed_log_term is set (has been assigned a value) and false otherwise
+ public boolean isSetCommitted_log_term() {
+ return __isset_bit_vector.get(__COMMITTED_LOG_TERM_ISSET_ID);
+ }
+
+ public void setCommitted_log_termIsSet(boolean __value) {
+ __isset_bit_vector.set(__COMMITTED_LOG_TERM_ISSET_ID, __value);
+ }
+
+ public String getLeader_addr() {
+ return this.leader_addr;
+ }
+
+ public SendSnapshotRequest setLeader_addr(String leader_addr) {
+ this.leader_addr = leader_addr;
+ return this;
+ }
+
+ public void unsetLeader_addr() {
+ this.leader_addr = null;
+ }
+
+ // Returns true if field leader_addr is set (has been assigned a value) and false otherwise
+ public boolean isSetLeader_addr() {
+ return this.leader_addr != null;
+ }
+
+ public void setLeader_addrIsSet(boolean __value) {
+ if (!__value) {
+ this.leader_addr = null;
+ }
+ }
+
+ public int getLeader_port() {
+ return this.leader_port;
+ }
+
+ public SendSnapshotRequest setLeader_port(int leader_port) {
+ this.leader_port = leader_port;
+ setLeader_portIsSet(true);
+ return this;
+ }
+
+ public void unsetLeader_port() {
+ __isset_bit_vector.clear(__LEADER_PORT_ISSET_ID);
+ }
+
+ // Returns true if field leader_port is set (has been assigned a value) and false otherwise
+ public boolean isSetLeader_port() {
+ return __isset_bit_vector.get(__LEADER_PORT_ISSET_ID);
+ }
+
+ public void setLeader_portIsSet(boolean __value) {
+ __isset_bit_vector.set(__LEADER_PORT_ISSET_ID, __value);
+ }
+
+ public List getRows() {
+ return this.rows;
+ }
+
+ public SendSnapshotRequest setRows(List rows) {
+ this.rows = rows;
+ return this;
+ }
+
+ public void unsetRows() {
+ this.rows = null;
+ }
+
+ // Returns true if field rows is set (has been assigned a value) and false otherwise
+ public boolean isSetRows() {
+ return this.rows != null;
+ }
+
+ public void setRowsIsSet(boolean __value) {
+ if (!__value) {
+ this.rows = null;
+ }
+ }
+
+ public long getTotal_size() {
+ return this.total_size;
+ }
+
+ public SendSnapshotRequest setTotal_size(long total_size) {
+ this.total_size = total_size;
+ setTotal_sizeIsSet(true);
+ return this;
+ }
+
+ public void unsetTotal_size() {
+ __isset_bit_vector.clear(__TOTAL_SIZE_ISSET_ID);
+ }
+
+ // Returns true if field total_size is set (has been assigned a value) and false otherwise
+ public boolean isSetTotal_size() {
+ return __isset_bit_vector.get(__TOTAL_SIZE_ISSET_ID);
+ }
+
+ public void setTotal_sizeIsSet(boolean __value) {
+ __isset_bit_vector.set(__TOTAL_SIZE_ISSET_ID, __value);
+ }
+
+ public long getTotal_count() {
+ return this.total_count;
+ }
+
+ public SendSnapshotRequest setTotal_count(long total_count) {
+ this.total_count = total_count;
+ setTotal_countIsSet(true);
+ return this;
+ }
+
+ public void unsetTotal_count() {
+ __isset_bit_vector.clear(__TOTAL_COUNT_ISSET_ID);
+ }
+
+ // Returns true if field total_count is set (has been assigned a value) and false otherwise
+ public boolean isSetTotal_count() {
+ return __isset_bit_vector.get(__TOTAL_COUNT_ISSET_ID);
+ }
+
+ public void setTotal_countIsSet(boolean __value) {
+ __isset_bit_vector.set(__TOTAL_COUNT_ISSET_ID, __value);
+ }
+
+ public boolean isDone() {
+ return this.done;
+ }
+
+ public SendSnapshotRequest setDone(boolean done) {
+ this.done = done;
+ setDoneIsSet(true);
+ return this;
+ }
+
+ public void unsetDone() {
+ __isset_bit_vector.clear(__DONE_ISSET_ID);
+ }
+
+ // Returns true if field done is set (has been assigned a value) and false otherwise
+ public boolean isSetDone() {
+ return __isset_bit_vector.get(__DONE_ISSET_ID);
+ }
+
+ public void setDoneIsSet(boolean __value) {
+ __isset_bit_vector.set(__DONE_ISSET_ID, __value);
+ }
+
+ @SuppressWarnings("unchecked")
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case SPACE:
+ if (__value == null) {
+ unsetSpace();
+ } else {
+ setSpace((Integer)__value);
+ }
+ break;
+
+ case PART:
+ if (__value == null) {
+ unsetPart();
+ } else {
+ setPart((Integer)__value);
+ }
+ break;
+
+ case TERM:
+ if (__value == null) {
+ unsetTerm();
+ } else {
+ setTerm((Long)__value);
+ }
+ break;
+
+ case COMMITTED_LOG_ID:
+ if (__value == null) {
+ unsetCommitted_log_id();
+ } else {
+ setCommitted_log_id((Long)__value);
+ }
+ break;
+
+ case COMMITTED_LOG_TERM:
+ if (__value == null) {
+ unsetCommitted_log_term();
+ } else {
+ setCommitted_log_term((Long)__value);
+ }
+ break;
+
+ case LEADER_ADDR:
+ if (__value == null) {
+ unsetLeader_addr();
+ } else {
+ setLeader_addr((String)__value);
+ }
+ break;
+
+ case LEADER_PORT:
+ if (__value == null) {
+ unsetLeader_port();
+ } else {
+ setLeader_port((Integer)__value);
+ }
+ break;
+
+ case ROWS:
+ if (__value == null) {
+ unsetRows();
+ } else {
+ setRows((List)__value);
+ }
+ break;
+
+ case TOTAL_SIZE:
+ if (__value == null) {
+ unsetTotal_size();
+ } else {
+ setTotal_size((Long)__value);
+ }
+ break;
+
+ case TOTAL_COUNT:
+ if (__value == null) {
+ unsetTotal_count();
+ } else {
+ setTotal_count((Long)__value);
+ }
+ break;
+
+ case DONE:
+ if (__value == null) {
+ unsetDone();
+ } else {
+ setDone((Boolean)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case SPACE:
+ return new Integer(getSpace());
+
+ case PART:
+ return new Integer(getPart());
+
+ case TERM:
+ return new Long(getTerm());
+
+ case COMMITTED_LOG_ID:
+ return new Long(getCommitted_log_id());
+
+ case COMMITTED_LOG_TERM:
+ return new Long(getCommitted_log_term());
+
+ case LEADER_ADDR:
+ return getLeader_addr();
+
+ case LEADER_PORT:
+ return new Integer(getLeader_port());
+
+ case ROWS:
+ return getRows();
+
+ case TOTAL_SIZE:
+ return new Long(getTotal_size());
+
+ case TOTAL_COUNT:
+ return new Long(getTotal_count());
+
+ case DONE:
+ return new Boolean(isDone());
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof SendSnapshotRequest))
+ return false;
+ SendSnapshotRequest that = (SendSnapshotRequest)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.space, that.space)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.part, that.part)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.term, that.term)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.committed_log_id, that.committed_log_id)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.committed_log_term, that.committed_log_term)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.isSetLeader_addr(), that.isSetLeader_addr(), this.leader_addr, that.leader_addr)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.leader_port, that.leader_port)) { return false; }
+
+ if (!TBaseHelper.equalsSlow(this.isSetRows(), that.isSetRows(), this.rows, that.rows)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.total_size, that.total_size)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.total_count, that.total_count)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.done, that.done)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {space, part, term, committed_log_id, committed_log_term, leader_addr, leader_port, rows, total_size, total_count, done});
+ }
+
+ @Override
+ public int compareTo(SendSnapshotRequest other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSpace()).compareTo(other.isSetSpace());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(space, other.space);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetPart()).compareTo(other.isSetPart());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(part, other.part);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetTerm()).compareTo(other.isSetTerm());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(term, other.term);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetCommitted_log_id()).compareTo(other.isSetCommitted_log_id());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(committed_log_id, other.committed_log_id);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetCommitted_log_term()).compareTo(other.isSetCommitted_log_term());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(committed_log_term, other.committed_log_term);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLeader_addr()).compareTo(other.isSetLeader_addr());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(leader_addr, other.leader_addr);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetLeader_port()).compareTo(other.isSetLeader_port());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(leader_port, other.leader_port);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetRows()).compareTo(other.isSetRows());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(rows, other.rows);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetTotal_size()).compareTo(other.isSetTotal_size());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(total_size, other.total_size);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetTotal_count()).compareTo(other.isSetTotal_count());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(total_count, other.total_count);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetDone()).compareTo(other.isSetDone());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(done, other.done);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case SPACE:
+ if (__field.type == TType.I32) {
+ this.space = iprot.readI32();
+ setSpaceIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case PART:
+ if (__field.type == TType.I32) {
+ this.part = iprot.readI32();
+ setPartIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case TERM:
+ if (__field.type == TType.I64) {
+ this.term = iprot.readI64();
+ setTermIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case COMMITTED_LOG_ID:
+ if (__field.type == TType.I64) {
+ this.committed_log_id = iprot.readI64();
+ setCommitted_log_idIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case COMMITTED_LOG_TERM:
+ if (__field.type == TType.I64) {
+ this.committed_log_term = iprot.readI64();
+ setCommitted_log_termIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LEADER_ADDR:
+ if (__field.type == TType.STRING) {
+ this.leader_addr = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case LEADER_PORT:
+ if (__field.type == TType.I32) {
+ this.leader_port = iprot.readI32();
+ setLeader_portIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case ROWS:
+ if (__field.type == TType.LIST) {
+ {
+ TList _list4 = iprot.readListBegin();
+ this.rows = new ArrayList(Math.max(0, _list4.size));
+ for (int _i5 = 0;
+ (_list4.size < 0) ? iprot.peekList() : (_i5 < _list4.size);
+ ++_i5)
+ {
+ byte[] _elem6;
+ _elem6 = iprot.readBinary();
+ this.rows.add(_elem6);
+ }
+ iprot.readListEnd();
+ }
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case TOTAL_SIZE:
+ if (__field.type == TType.I64) {
+ this.total_size = iprot.readI64();
+ setTotal_sizeIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case TOTAL_COUNT:
+ if (__field.type == TType.I64) {
+ this.total_count = iprot.readI64();
+ setTotal_countIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case DONE:
+ if (__field.type == TType.BOOL) {
+ this.done = iprot.readBool();
+ setDoneIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(SPACE_FIELD_DESC);
+ oprot.writeI32(this.space);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(PART_FIELD_DESC);
+ oprot.writeI32(this.part);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(TERM_FIELD_DESC);
+ oprot.writeI64(this.term);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(COMMITTED_LOG_ID_FIELD_DESC);
+ oprot.writeI64(this.committed_log_id);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(COMMITTED_LOG_TERM_FIELD_DESC);
+ oprot.writeI64(this.committed_log_term);
+ oprot.writeFieldEnd();
+ if (this.leader_addr != null) {
+ oprot.writeFieldBegin(LEADER_ADDR_FIELD_DESC);
+ oprot.writeString(this.leader_addr);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(LEADER_PORT_FIELD_DESC);
+ oprot.writeI32(this.leader_port);
+ oprot.writeFieldEnd();
+ if (this.rows != null) {
+ oprot.writeFieldBegin(ROWS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new TList(TType.STRING, this.rows.size()));
+ for (byte[] _iter7 : this.rows) {
+ oprot.writeBinary(_iter7);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(TOTAL_SIZE_FIELD_DESC);
+ oprot.writeI64(this.total_size);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(TOTAL_COUNT_FIELD_DESC);
+ oprot.writeI64(this.total_count);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(DONE_FIELD_DESC);
+ oprot.writeBool(this.done);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("SendSnapshotRequest");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("space");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getSpace(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("part");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getPart(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("term");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getTerm(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("committed_log_id");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getCommitted_log_id(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("committed_log_term");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getCommitted_log_term(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("leader_addr");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getLeader_addr() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getLeader_addr(), indent + 1, prettyPrint));
+ }
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("leader_port");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getLeader_port(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("rows");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getRows() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getRows(), indent + 1, prettyPrint));
+ }
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("total_size");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getTotal_size(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("total_count");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getTotal_count(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("done");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.isDone(), indent + 1, prettyPrint));
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+}
+
diff --git a/client/src/main/generated/SendSnapshotResponse.java b/client/src/main/generated/SendSnapshotResponse.java
new file mode 100644
index 000000000..aa7c137f4
--- /dev/null
+++ b/client/src/main/generated/SendSnapshotResponse.java
@@ -0,0 +1,283 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.util.Arrays;
+import com.facebook.thrift.*;
+import com.facebook.thrift.annotations.*;
+import com.facebook.thrift.async.*;
+import com.facebook.thrift.meta_data.*;
+import com.facebook.thrift.server.*;
+import com.facebook.thrift.transport.*;
+import com.facebook.thrift.protocol.*;
+
+@SuppressWarnings({ "unused", "serial" })
+public class SendSnapshotResponse implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("SendSnapshotResponse");
+ private static final TField ERROR_CODE_FIELD_DESC = new TField("error_code", TType.I32, (short)1);
+
+ /**
+ *
+ * @see ErrorCode
+ */
+ public ErrorCode error_code;
+ public static final int ERROR_CODE = 1;
+
+ // isset id assignments
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(ERROR_CODE, new FieldMetaData("error_code", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(SendSnapshotResponse.class, metaDataMap);
+ }
+
+ public SendSnapshotResponse() {
+ }
+
+ public SendSnapshotResponse(
+ ErrorCode error_code) {
+ this();
+ this.error_code = error_code;
+ }
+
+ public static class Builder {
+ private ErrorCode error_code;
+
+ public Builder() {
+ }
+
+ public Builder setError_code(final ErrorCode error_code) {
+ this.error_code = error_code;
+ return this;
+ }
+
+ public SendSnapshotResponse build() {
+ SendSnapshotResponse result = new SendSnapshotResponse();
+ result.setError_code(this.error_code);
+ return result;
+ }
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public SendSnapshotResponse(SendSnapshotResponse other) {
+ if (other.isSetError_code()) {
+ this.error_code = TBaseHelper.deepCopy(other.error_code);
+ }
+ }
+
+ public SendSnapshotResponse deepCopy() {
+ return new SendSnapshotResponse(this);
+ }
+
+ /**
+ *
+ * @see ErrorCode
+ */
+ public ErrorCode getError_code() {
+ return this.error_code;
+ }
+
+ /**
+ *
+ * @see ErrorCode
+ */
+ public SendSnapshotResponse setError_code(ErrorCode error_code) {
+ this.error_code = error_code;
+ return this;
+ }
+
+ public void unsetError_code() {
+ this.error_code = null;
+ }
+
+ // Returns true if field error_code is set (has been assigned a value) and false otherwise
+ public boolean isSetError_code() {
+ return this.error_code != null;
+ }
+
+ public void setError_codeIsSet(boolean __value) {
+ if (!__value) {
+ this.error_code = null;
+ }
+ }
+
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case ERROR_CODE:
+ if (__value == null) {
+ unsetError_code();
+ } else {
+ setError_code((ErrorCode)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case ERROR_CODE:
+ return getError_code();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof SendSnapshotResponse))
+ return false;
+ SendSnapshotResponse that = (SendSnapshotResponse)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.isSetError_code(), that.isSetError_code(), this.error_code, that.error_code)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {error_code});
+ }
+
+ @Override
+ public int compareTo(SendSnapshotResponse other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetError_code()).compareTo(other.isSetError_code());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(error_code, other.error_code);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case ERROR_CODE:
+ if (__field.type == TType.I32) {
+ this.error_code = ErrorCode.findByValue(iprot.readI32());
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.error_code != null) {
+ oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);
+ oprot.writeI32(this.error_code == null ? 0 : this.error_code.getValue());
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("SendSnapshotResponse");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("error_code");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getError_code() == null) {
+ sb.append("null");
+ } else {
+ String error_code_name = this.getError_code() == null ? "null" : this.getError_code().name();
+ if (error_code_name != null) {
+ sb.append(error_code_name);
+ sb.append(" (");
+ }
+ sb.append(this.getError_code());
+ if (error_code_name != null) {
+ sb.append(")");
+ }
+ }
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+}
+
diff --git a/client/src/main/generated/com/vesoft/nebula/ErrorCode.java b/client/src/main/generated/com/vesoft/nebula/ErrorCode.java
index fd797bc34..b8ccc0b8f 100644
--- a/client/src/main/generated/com/vesoft/nebula/ErrorCode.java
+++ b/client/src/main/generated/com/vesoft/nebula/ErrorCode.java
@@ -32,6 +32,7 @@ public enum ErrorCode implements com.facebook.thrift.TEnum {
E_PART_NOT_FOUND(-16),
E_KEY_NOT_FOUND(-17),
E_USER_NOT_FOUND(-18),
+ E_STATS_NOT_FOUND(-19),
E_BACKUP_FAILED(-24),
E_BACKUP_EMPTY_TABLE(-25),
E_BACKUP_TABLE_FAILED(-26),
@@ -83,6 +84,7 @@ public enum ErrorCode implements com.facebook.thrift.TEnum {
E_BALANCER_FAILURE(-2047),
E_JOB_NOT_FINISHED(-2048),
E_TASK_REPORT_OUT_DATE(-2049),
+ E_JOB_NOT_IN_SPACE(-2050),
E_INVALID_JOB(-2065),
E_BACKUP_BUILDING_INDEX(-2066),
E_BACKUP_SPACE_NOT_FOUND(-2067),
@@ -125,6 +127,7 @@ public enum ErrorCode implements com.facebook.thrift.TEnum {
E_INVALID_TASK_PARA(-3051),
E_USER_CANCEL(-3052),
E_TASK_EXECUTION_FAILED(-3053),
+ E_PLAN_IS_KILLED(-3060),
E_UNKNOWN(-8000);
private static final Map INDEXED_VALUES = new HashMap();
diff --git a/client/src/main/generated/com/vesoft/nebula/meta/SchemaID.java b/client/src/main/generated/com/vesoft/nebula/SchemaID.java
similarity index 99%
rename from client/src/main/generated/com/vesoft/nebula/meta/SchemaID.java
rename to client/src/main/generated/com/vesoft/nebula/SchemaID.java
index 7f4a2d88e..a55074639 100644
--- a/client/src/main/generated/com/vesoft/nebula/meta/SchemaID.java
+++ b/client/src/main/generated/com/vesoft/nebula/SchemaID.java
@@ -4,7 +4,7 @@
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
-package com.vesoft.nebula.meta;
+package com.vesoft.nebula;
import java.util.List;
import java.util.ArrayList;
diff --git a/client/src/main/generated/com/vesoft/nebula/meta/CheckpointInfo.java b/client/src/main/generated/com/vesoft/nebula/meta/CheckpointInfo.java
deleted file mode 100644
index b7d532080..000000000
--- a/client/src/main/generated/com/vesoft/nebula/meta/CheckpointInfo.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/**
- * Autogenerated by Thrift
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package com.vesoft.nebula.meta;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.util.Arrays;
-import com.facebook.thrift.*;
-import com.facebook.thrift.annotations.*;
-import com.facebook.thrift.async.*;
-import com.facebook.thrift.meta_data.*;
-import com.facebook.thrift.server.*;
-import com.facebook.thrift.transport.*;
-import com.facebook.thrift.protocol.*;
-
-@SuppressWarnings({ "unused", "serial" })
-public class CheckpointInfo implements TBase, java.io.Serializable, Cloneable, Comparable {
- private static final TStruct STRUCT_DESC = new TStruct("CheckpointInfo");
- private static final TField HOST_FIELD_DESC = new TField("host", TType.STRUCT, (short)1);
- private static final TField CHECKPOINT_DIR_FIELD_DESC = new TField("checkpoint_dir", TType.STRING, (short)2);
-
- public com.vesoft.nebula.HostAddr host;
- public byte[] checkpoint_dir;
- public static final int HOST = 1;
- public static final int CHECKPOINT_DIR = 2;
-
- // isset id assignments
-
- public static final Map metaDataMap;
-
- static {
- Map tmpMetaDataMap = new HashMap();
- tmpMetaDataMap.put(HOST, new FieldMetaData("host", TFieldRequirementType.DEFAULT,
- new StructMetaData(TType.STRUCT, com.vesoft.nebula.HostAddr.class)));
- tmpMetaDataMap.put(CHECKPOINT_DIR, new FieldMetaData("checkpoint_dir", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
- }
-
- static {
- FieldMetaData.addStructMetaDataMap(CheckpointInfo.class, metaDataMap);
- }
-
- public CheckpointInfo() {
- }
-
- public CheckpointInfo(
- com.vesoft.nebula.HostAddr host,
- byte[] checkpoint_dir) {
- this();
- this.host = host;
- this.checkpoint_dir = checkpoint_dir;
- }
-
- public static class Builder {
- private com.vesoft.nebula.HostAddr host;
- private byte[] checkpoint_dir;
-
- public Builder() {
- }
-
- public Builder setHost(final com.vesoft.nebula.HostAddr host) {
- this.host = host;
- return this;
- }
-
- public Builder setCheckpoint_dir(final byte[] checkpoint_dir) {
- this.checkpoint_dir = checkpoint_dir;
- return this;
- }
-
- public CheckpointInfo build() {
- CheckpointInfo result = new CheckpointInfo();
- result.setHost(this.host);
- result.setCheckpoint_dir(this.checkpoint_dir);
- return result;
- }
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- /**
- * Performs a deep copy on other.
- */
- public CheckpointInfo(CheckpointInfo other) {
- if (other.isSetHost()) {
- this.host = TBaseHelper.deepCopy(other.host);
- }
- if (other.isSetCheckpoint_dir()) {
- this.checkpoint_dir = TBaseHelper.deepCopy(other.checkpoint_dir);
- }
- }
-
- public CheckpointInfo deepCopy() {
- return new CheckpointInfo(this);
- }
-
- public com.vesoft.nebula.HostAddr getHost() {
- return this.host;
- }
-
- public CheckpointInfo setHost(com.vesoft.nebula.HostAddr host) {
- this.host = host;
- return this;
- }
-
- public void unsetHost() {
- this.host = null;
- }
-
- // Returns true if field host is set (has been assigned a value) and false otherwise
- public boolean isSetHost() {
- return this.host != null;
- }
-
- public void setHostIsSet(boolean __value) {
- if (!__value) {
- this.host = null;
- }
- }
-
- public byte[] getCheckpoint_dir() {
- return this.checkpoint_dir;
- }
-
- public CheckpointInfo setCheckpoint_dir(byte[] checkpoint_dir) {
- this.checkpoint_dir = checkpoint_dir;
- return this;
- }
-
- public void unsetCheckpoint_dir() {
- this.checkpoint_dir = null;
- }
-
- // Returns true if field checkpoint_dir is set (has been assigned a value) and false otherwise
- public boolean isSetCheckpoint_dir() {
- return this.checkpoint_dir != null;
- }
-
- public void setCheckpoint_dirIsSet(boolean __value) {
- if (!__value) {
- this.checkpoint_dir = null;
- }
- }
-
- public void setFieldValue(int fieldID, Object __value) {
- switch (fieldID) {
- case HOST:
- if (__value == null) {
- unsetHost();
- } else {
- setHost((com.vesoft.nebula.HostAddr)__value);
- }
- break;
-
- case CHECKPOINT_DIR:
- if (__value == null) {
- unsetCheckpoint_dir();
- } else {
- setCheckpoint_dir((byte[])__value);
- }
- break;
-
- default:
- throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
- }
- }
-
- public Object getFieldValue(int fieldID) {
- switch (fieldID) {
- case HOST:
- return getHost();
-
- case CHECKPOINT_DIR:
- return getCheckpoint_dir();
-
- default:
- throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
- }
- }
-
- @Override
- public boolean equals(Object _that) {
- if (_that == null)
- return false;
- if (this == _that)
- return true;
- if (!(_that instanceof CheckpointInfo))
- return false;
- CheckpointInfo that = (CheckpointInfo)_that;
-
- if (!TBaseHelper.equalsNobinary(this.isSetHost(), that.isSetHost(), this.host, that.host)) { return false; }
-
- if (!TBaseHelper.equalsSlow(this.isSetCheckpoint_dir(), that.isSetCheckpoint_dir(), this.checkpoint_dir, that.checkpoint_dir)) { return false; }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return Arrays.deepHashCode(new Object[] {host, checkpoint_dir});
- }
-
- @Override
- public int compareTo(CheckpointInfo other) {
- if (other == null) {
- // See java.lang.Comparable docs
- throw new NullPointerException();
- }
-
- if (other == this) {
- return 0;
- }
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetHost()).compareTo(other.isSetHost());
- if (lastComparison != 0) {
- return lastComparison;
- }
- lastComparison = TBaseHelper.compareTo(host, other.host);
- if (lastComparison != 0) {
- return lastComparison;
- }
- lastComparison = Boolean.valueOf(isSetCheckpoint_dir()).compareTo(other.isSetCheckpoint_dir());
- if (lastComparison != 0) {
- return lastComparison;
- }
- lastComparison = TBaseHelper.compareTo(checkpoint_dir, other.checkpoint_dir);
- if (lastComparison != 0) {
- return lastComparison;
- }
- return 0;
- }
-
- public void read(TProtocol iprot) throws TException {
- TField __field;
- iprot.readStructBegin(metaDataMap);
- while (true)
- {
- __field = iprot.readFieldBegin();
- if (__field.type == TType.STOP) {
- break;
- }
- switch (__field.id)
- {
- case HOST:
- if (__field.type == TType.STRUCT) {
- this.host = new com.vesoft.nebula.HostAddr();
- this.host.read(iprot);
- } else {
- TProtocolUtil.skip(iprot, __field.type);
- }
- break;
- case CHECKPOINT_DIR:
- if (__field.type == TType.STRING) {
- this.checkpoint_dir = iprot.readBinary();
- } else {
- TProtocolUtil.skip(iprot, __field.type);
- }
- break;
- default:
- TProtocolUtil.skip(iprot, __field.type);
- break;
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
-
- // check for required fields of primitive type, which can't be checked in the validate method
- validate();
- }
-
- public void write(TProtocol oprot) throws TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.host != null) {
- oprot.writeFieldBegin(HOST_FIELD_DESC);
- this.host.write(oprot);
- oprot.writeFieldEnd();
- }
- if (this.checkpoint_dir != null) {
- oprot.writeFieldBegin(CHECKPOINT_DIR_FIELD_DESC);
- oprot.writeBinary(this.checkpoint_dir);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- @Override
- public String toString() {
- return toString(1, true);
- }
-
- @Override
- public String toString(int indent, boolean prettyPrint) {
- String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
- String newLine = prettyPrint ? "\n" : "";
- String space = prettyPrint ? " " : "";
- StringBuilder sb = new StringBuilder("CheckpointInfo");
- sb.append(space);
- sb.append("(");
- sb.append(newLine);
- boolean first = true;
-
- sb.append(indentStr);
- sb.append("host");
- sb.append(space);
- sb.append(":").append(space);
- if (this.getHost() == null) {
- sb.append("null");
- } else {
- sb.append(TBaseHelper.toString(this.getHost(), indent + 1, prettyPrint));
- }
- first = false;
- if (!first) sb.append("," + newLine);
- sb.append(indentStr);
- sb.append("checkpoint_dir");
- sb.append(space);
- sb.append(":").append(space);
- if (this.getCheckpoint_dir() == null) {
- sb.append("null");
- } else {
- int __checkpoint_dir_size = Math.min(this.getCheckpoint_dir().length, 128);
- for (int i = 0; i < __checkpoint_dir_size; i++) {
- if (i != 0) sb.append(" ");
- sb.append(Integer.toHexString(this.getCheckpoint_dir()[i]).length() > 1 ? Integer.toHexString(this.getCheckpoint_dir()[i]).substring(Integer.toHexString(this.getCheckpoint_dir()[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.getCheckpoint_dir()[i]).toUpperCase());
- }
- if (this.getCheckpoint_dir().length > 128) sb.append(" ...");
- }
- first = false;
- sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws TException {
- // check for required fields
- }
-
-}
-
diff --git a/client/src/main/generated/com/vesoft/nebula/meta/CreateSpaceAsReq.java b/client/src/main/generated/com/vesoft/nebula/meta/CreateSpaceAsReq.java
new file mode 100644
index 000000000..4392f9e43
--- /dev/null
+++ b/client/src/main/generated/com/vesoft/nebula/meta/CreateSpaceAsReq.java
@@ -0,0 +1,360 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package com.vesoft.nebula.meta;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.util.Arrays;
+import com.facebook.thrift.*;
+import com.facebook.thrift.annotations.*;
+import com.facebook.thrift.async.*;
+import com.facebook.thrift.meta_data.*;
+import com.facebook.thrift.server.*;
+import com.facebook.thrift.transport.*;
+import com.facebook.thrift.protocol.*;
+
+@SuppressWarnings({ "unused", "serial" })
+public class CreateSpaceAsReq implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("CreateSpaceAsReq");
+ private static final TField OLD_SPACE_NAME_FIELD_DESC = new TField("old_space_name", TType.STRING, (short)1);
+ private static final TField NEW_SPACE_NAME_FIELD_DESC = new TField("new_space_name", TType.STRING, (short)2);
+
+ public byte[] old_space_name;
+ public byte[] new_space_name;
+ public static final int OLD_SPACE_NAME = 1;
+ public static final int NEW_SPACE_NAME = 2;
+
+ // isset id assignments
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(OLD_SPACE_NAME, new FieldMetaData("old_space_name", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ tmpMetaDataMap.put(NEW_SPACE_NAME, new FieldMetaData("new_space_name", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(CreateSpaceAsReq.class, metaDataMap);
+ }
+
+ public CreateSpaceAsReq() {
+ }
+
+ public CreateSpaceAsReq(
+ byte[] old_space_name,
+ byte[] new_space_name) {
+ this();
+ this.old_space_name = old_space_name;
+ this.new_space_name = new_space_name;
+ }
+
+ public static class Builder {
+ private byte[] old_space_name;
+ private byte[] new_space_name;
+
+ public Builder() {
+ }
+
+ public Builder setOld_space_name(final byte[] old_space_name) {
+ this.old_space_name = old_space_name;
+ return this;
+ }
+
+ public Builder setNew_space_name(final byte[] new_space_name) {
+ this.new_space_name = new_space_name;
+ return this;
+ }
+
+ public CreateSpaceAsReq build() {
+ CreateSpaceAsReq result = new CreateSpaceAsReq();
+ result.setOld_space_name(this.old_space_name);
+ result.setNew_space_name(this.new_space_name);
+ return result;
+ }
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public CreateSpaceAsReq(CreateSpaceAsReq other) {
+ if (other.isSetOld_space_name()) {
+ this.old_space_name = TBaseHelper.deepCopy(other.old_space_name);
+ }
+ if (other.isSetNew_space_name()) {
+ this.new_space_name = TBaseHelper.deepCopy(other.new_space_name);
+ }
+ }
+
+ public CreateSpaceAsReq deepCopy() {
+ return new CreateSpaceAsReq(this);
+ }
+
+ public byte[] getOld_space_name() {
+ return this.old_space_name;
+ }
+
+ public CreateSpaceAsReq setOld_space_name(byte[] old_space_name) {
+ this.old_space_name = old_space_name;
+ return this;
+ }
+
+ public void unsetOld_space_name() {
+ this.old_space_name = null;
+ }
+
+ // Returns true if field old_space_name is set (has been assigned a value) and false otherwise
+ public boolean isSetOld_space_name() {
+ return this.old_space_name != null;
+ }
+
+ public void setOld_space_nameIsSet(boolean __value) {
+ if (!__value) {
+ this.old_space_name = null;
+ }
+ }
+
+ public byte[] getNew_space_name() {
+ return this.new_space_name;
+ }
+
+ public CreateSpaceAsReq setNew_space_name(byte[] new_space_name) {
+ this.new_space_name = new_space_name;
+ return this;
+ }
+
+ public void unsetNew_space_name() {
+ this.new_space_name = null;
+ }
+
+ // Returns true if field new_space_name is set (has been assigned a value) and false otherwise
+ public boolean isSetNew_space_name() {
+ return this.new_space_name != null;
+ }
+
+ public void setNew_space_nameIsSet(boolean __value) {
+ if (!__value) {
+ this.new_space_name = null;
+ }
+ }
+
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case OLD_SPACE_NAME:
+ if (__value == null) {
+ unsetOld_space_name();
+ } else {
+ setOld_space_name((byte[])__value);
+ }
+ break;
+
+ case NEW_SPACE_NAME:
+ if (__value == null) {
+ unsetNew_space_name();
+ } else {
+ setNew_space_name((byte[])__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case OLD_SPACE_NAME:
+ return getOld_space_name();
+
+ case NEW_SPACE_NAME:
+ return getNew_space_name();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof CreateSpaceAsReq))
+ return false;
+ CreateSpaceAsReq that = (CreateSpaceAsReq)_that;
+
+ if (!TBaseHelper.equalsSlow(this.isSetOld_space_name(), that.isSetOld_space_name(), this.old_space_name, that.old_space_name)) { return false; }
+
+ if (!TBaseHelper.equalsSlow(this.isSetNew_space_name(), that.isSetNew_space_name(), this.new_space_name, that.new_space_name)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {old_space_name, new_space_name});
+ }
+
+ @Override
+ public int compareTo(CreateSpaceAsReq other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetOld_space_name()).compareTo(other.isSetOld_space_name());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(old_space_name, other.old_space_name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = Boolean.valueOf(isSetNew_space_name()).compareTo(other.isSetNew_space_name());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(new_space_name, other.new_space_name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case OLD_SPACE_NAME:
+ if (__field.type == TType.STRING) {
+ this.old_space_name = iprot.readBinary();
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case NEW_SPACE_NAME:
+ if (__field.type == TType.STRING) {
+ this.new_space_name = iprot.readBinary();
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.old_space_name != null) {
+ oprot.writeFieldBegin(OLD_SPACE_NAME_FIELD_DESC);
+ oprot.writeBinary(this.old_space_name);
+ oprot.writeFieldEnd();
+ }
+ if (this.new_space_name != null) {
+ oprot.writeFieldBegin(NEW_SPACE_NAME_FIELD_DESC);
+ oprot.writeBinary(this.new_space_name);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("CreateSpaceAsReq");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("old_space_name");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getOld_space_name() == null) {
+ sb.append("null");
+ } else {
+ int __old_space_name_size = Math.min(this.getOld_space_name().length, 128);
+ for (int i = 0; i < __old_space_name_size; i++) {
+ if (i != 0) sb.append(" ");
+ sb.append(Integer.toHexString(this.getOld_space_name()[i]).length() > 1 ? Integer.toHexString(this.getOld_space_name()[i]).substring(Integer.toHexString(this.getOld_space_name()[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.getOld_space_name()[i]).toUpperCase());
+ }
+ if (this.getOld_space_name().length > 128) sb.append(" ...");
+ }
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("new_space_name");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getNew_space_name() == null) {
+ sb.append("null");
+ } else {
+ int __new_space_name_size = Math.min(this.getNew_space_name().length, 128);
+ for (int i = 0; i < __new_space_name_size; i++) {
+ if (i != 0) sb.append(" ");
+ sb.append(Integer.toHexString(this.getNew_space_name()[i]).length() > 1 ? Integer.toHexString(this.getNew_space_name()[i]).substring(Integer.toHexString(this.getNew_space_name()[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.getNew_space_name()[i]).toUpperCase());
+ }
+ if (this.getNew_space_name().length > 128) sb.append(" ...");
+ }
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+}
+
diff --git a/client/src/main/generated/com/vesoft/nebula/meta/FTIndex.java b/client/src/main/generated/com/vesoft/nebula/meta/FTIndex.java
index de6665fd8..6050baa48 100644
--- a/client/src/main/generated/com/vesoft/nebula/meta/FTIndex.java
+++ b/client/src/main/generated/com/vesoft/nebula/meta/FTIndex.java
@@ -31,7 +31,7 @@ public class FTIndex implements TBase, java.io.Serializable, Cloneable, Comparab
private static final TField FIELDS_FIELD_DESC = new TField("fields", TType.LIST, (short)3);
public int space_id;
- public SchemaID depend_schema;
+ public com.vesoft.nebula.SchemaID depend_schema;
public List fields;
public static final int SPACE_ID = 1;
public static final int DEPEND_SCHEMA = 2;
@@ -48,7 +48,7 @@ public class FTIndex implements TBase, java.io.Serializable, Cloneable, Comparab
tmpMetaDataMap.put(SPACE_ID, new FieldMetaData("space_id", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
tmpMetaDataMap.put(DEPEND_SCHEMA, new FieldMetaData("depend_schema", TFieldRequirementType.DEFAULT,
- new StructMetaData(TType.STRUCT, SchemaID.class)));
+ new StructMetaData(TType.STRUCT, com.vesoft.nebula.SchemaID.class)));
tmpMetaDataMap.put(FIELDS, new FieldMetaData("fields", TFieldRequirementType.DEFAULT,
new ListMetaData(TType.LIST,
new FieldValueMetaData(TType.STRING))));
@@ -64,7 +64,7 @@ public FTIndex() {
public FTIndex(
int space_id,
- SchemaID depend_schema,
+ com.vesoft.nebula.SchemaID depend_schema,
List fields) {
this();
this.space_id = space_id;
@@ -75,7 +75,7 @@ public FTIndex(
public static class Builder {
private int space_id;
- private SchemaID depend_schema;
+ private com.vesoft.nebula.SchemaID depend_schema;
private List fields;
BitSet __optional_isset = new BitSet(1);
@@ -89,7 +89,7 @@ public Builder setSpace_id(final int space_id) {
return this;
}
- public Builder setDepend_schema(final SchemaID depend_schema) {
+ public Builder setDepend_schema(final com.vesoft.nebula.SchemaID depend_schema) {
this.depend_schema = depend_schema;
return this;
}
@@ -156,11 +156,11 @@ public void setSpace_idIsSet(boolean __value) {
__isset_bit_vector.set(__SPACE_ID_ISSET_ID, __value);
}
- public SchemaID getDepend_schema() {
+ public com.vesoft.nebula.SchemaID getDepend_schema() {
return this.depend_schema;
}
- public FTIndex setDepend_schema(SchemaID depend_schema) {
+ public FTIndex setDepend_schema(com.vesoft.nebula.SchemaID depend_schema) {
this.depend_schema = depend_schema;
return this;
}
@@ -219,7 +219,7 @@ public void setFieldValue(int fieldID, Object __value) {
if (__value == null) {
unsetDepend_schema();
} else {
- setDepend_schema((SchemaID)__value);
+ setDepend_schema((com.vesoft.nebula.SchemaID)__value);
}
break;
@@ -336,7 +336,7 @@ public void read(TProtocol iprot) throws TException {
break;
case DEPEND_SCHEMA:
if (__field.type == TType.STRUCT) {
- this.depend_schema = new SchemaID();
+ this.depend_schema = new com.vesoft.nebula.SchemaID();
this.depend_schema.read(iprot);
} else {
TProtocolUtil.skip(iprot, __field.type);
diff --git a/client/src/main/generated/com/vesoft/nebula/meta/GetStatisReq.java b/client/src/main/generated/com/vesoft/nebula/meta/GetStatsReq.java
similarity index 90%
rename from client/src/main/generated/com/vesoft/nebula/meta/GetStatisReq.java
rename to client/src/main/generated/com/vesoft/nebula/meta/GetStatsReq.java
index 9070aac9b..cdb622ff8 100644
--- a/client/src/main/generated/com/vesoft/nebula/meta/GetStatisReq.java
+++ b/client/src/main/generated/com/vesoft/nebula/meta/GetStatsReq.java
@@ -24,8 +24,8 @@
import com.facebook.thrift.protocol.*;
@SuppressWarnings({ "unused", "serial" })
-public class GetStatisReq implements TBase, java.io.Serializable, Cloneable, Comparable {
- private static final TStruct STRUCT_DESC = new TStruct("GetStatisReq");
+public class GetStatsReq implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("GetStatsReq");
private static final TField SPACE_ID_FIELD_DESC = new TField("space_id", TType.I32, (short)1);
public int space_id;
@@ -45,13 +45,13 @@ public class GetStatisReq implements TBase, java.io.Serializable, Cloneable, Com
}
static {
- FieldMetaData.addStructMetaDataMap(GetStatisReq.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(GetStatsReq.class, metaDataMap);
}
- public GetStatisReq() {
+ public GetStatsReq() {
}
- public GetStatisReq(
+ public GetStatsReq(
int space_id) {
this();
this.space_id = space_id;
@@ -72,8 +72,8 @@ public Builder setSpace_id(final int space_id) {
return this;
}
- public GetStatisReq build() {
- GetStatisReq result = new GetStatisReq();
+ public GetStatsReq build() {
+ GetStatsReq result = new GetStatsReq();
if (__optional_isset.get(__SPACE_ID_ISSET_ID)) {
result.setSpace_id(this.space_id);
}
@@ -88,21 +88,21 @@ public static Builder builder() {
/**
* Performs a deep copy on other.
*/
- public GetStatisReq(GetStatisReq other) {
+ public GetStatsReq(GetStatsReq other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.space_id = TBaseHelper.deepCopy(other.space_id);
}
- public GetStatisReq deepCopy() {
- return new GetStatisReq(this);
+ public GetStatsReq deepCopy() {
+ return new GetStatsReq(this);
}
public int getSpace_id() {
return this.space_id;
}
- public GetStatisReq setSpace_id(int space_id) {
+ public GetStatsReq setSpace_id(int space_id) {
this.space_id = space_id;
setSpace_idIsSet(true);
return this;
@@ -152,9 +152,9 @@ public boolean equals(Object _that) {
return false;
if (this == _that)
return true;
- if (!(_that instanceof GetStatisReq))
+ if (!(_that instanceof GetStatsReq))
return false;
- GetStatisReq that = (GetStatisReq)_that;
+ GetStatsReq that = (GetStatsReq)_that;
if (!TBaseHelper.equalsNobinary(this.space_id, that.space_id)) { return false; }
@@ -167,7 +167,7 @@ public int hashCode() {
}
@Override
- public int compareTo(GetStatisReq other) {
+ public int compareTo(GetStatsReq other) {
if (other == null) {
// See java.lang.Comparable docs
throw new NullPointerException();
@@ -242,7 +242,7 @@ public String toString(int indent, boolean prettyPrint) {
String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
String newLine = prettyPrint ? "\n" : "";
String space = prettyPrint ? " " : "";
- StringBuilder sb = new StringBuilder("GetStatisReq");
+ StringBuilder sb = new StringBuilder("GetStatsReq");
sb.append(space);
sb.append("(");
sb.append(newLine);
diff --git a/client/src/main/generated/com/vesoft/nebula/meta/GetStatisResp.java b/client/src/main/generated/com/vesoft/nebula/meta/GetStatsResp.java
similarity index 78%
rename from client/src/main/generated/com/vesoft/nebula/meta/GetStatisResp.java
rename to client/src/main/generated/com/vesoft/nebula/meta/GetStatsResp.java
index 4a018a286..0de7589fc 100644
--- a/client/src/main/generated/com/vesoft/nebula/meta/GetStatisResp.java
+++ b/client/src/main/generated/com/vesoft/nebula/meta/GetStatsResp.java
@@ -24,11 +24,11 @@
import com.facebook.thrift.protocol.*;
@SuppressWarnings({ "unused", "serial" })
-public class GetStatisResp implements TBase, java.io.Serializable, Cloneable, Comparable {
- private static final TStruct STRUCT_DESC = new TStruct("GetStatisResp");
+public class GetStatsResp implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("GetStatsResp");
private static final TField CODE_FIELD_DESC = new TField("code", TType.I32, (short)1);
private static final TField LEADER_FIELD_DESC = new TField("leader", TType.STRUCT, (short)2);
- private static final TField STATIS_FIELD_DESC = new TField("statis", TType.STRUCT, (short)3);
+ private static final TField STATS_FIELD_DESC = new TField("stats", TType.STRUCT, (short)3);
/**
*
@@ -36,10 +36,10 @@ public class GetStatisResp implements TBase, java.io.Serializable, Cloneable, Co
*/
public com.vesoft.nebula.ErrorCode code;
public com.vesoft.nebula.HostAddr leader;
- public StatisItem statis;
+ public StatsItem stats;
public static final int CODE = 1;
public static final int LEADER = 2;
- public static final int STATIS = 3;
+ public static final int STATS = 3;
// isset id assignments
@@ -51,32 +51,32 @@ public class GetStatisResp implements TBase, java.io.Serializable, Cloneable, Co
new FieldValueMetaData(TType.I32)));
tmpMetaDataMap.put(LEADER, new FieldMetaData("leader", TFieldRequirementType.DEFAULT,
new StructMetaData(TType.STRUCT, com.vesoft.nebula.HostAddr.class)));
- tmpMetaDataMap.put(STATIS, new FieldMetaData("statis", TFieldRequirementType.DEFAULT,
- new StructMetaData(TType.STRUCT, StatisItem.class)));
+ tmpMetaDataMap.put(STATS, new FieldMetaData("stats", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, StatsItem.class)));
metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
}
static {
- FieldMetaData.addStructMetaDataMap(GetStatisResp.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(GetStatsResp.class, metaDataMap);
}
- public GetStatisResp() {
+ public GetStatsResp() {
}
- public GetStatisResp(
+ public GetStatsResp(
com.vesoft.nebula.ErrorCode code,
com.vesoft.nebula.HostAddr leader,
- StatisItem statis) {
+ StatsItem stats) {
this();
this.code = code;
this.leader = leader;
- this.statis = statis;
+ this.stats = stats;
}
public static class Builder {
private com.vesoft.nebula.ErrorCode code;
private com.vesoft.nebula.HostAddr leader;
- private StatisItem statis;
+ private StatsItem stats;
public Builder() {
}
@@ -91,16 +91,16 @@ public Builder setLeader(final com.vesoft.nebula.HostAddr leader) {
return this;
}
- public Builder setStatis(final StatisItem statis) {
- this.statis = statis;
+ public Builder setStats(final StatsItem stats) {
+ this.stats = stats;
return this;
}
- public GetStatisResp build() {
- GetStatisResp result = new GetStatisResp();
+ public GetStatsResp build() {
+ GetStatsResp result = new GetStatsResp();
result.setCode(this.code);
result.setLeader(this.leader);
- result.setStatis(this.statis);
+ result.setStats(this.stats);
return result;
}
}
@@ -112,20 +112,20 @@ public static Builder builder() {
/**
* Performs a deep copy on other.
*/
- public GetStatisResp(GetStatisResp other) {
+ public GetStatsResp(GetStatsResp other) {
if (other.isSetCode()) {
this.code = TBaseHelper.deepCopy(other.code);
}
if (other.isSetLeader()) {
this.leader = TBaseHelper.deepCopy(other.leader);
}
- if (other.isSetStatis()) {
- this.statis = TBaseHelper.deepCopy(other.statis);
+ if (other.isSetStats()) {
+ this.stats = TBaseHelper.deepCopy(other.stats);
}
}
- public GetStatisResp deepCopy() {
- return new GetStatisResp(this);
+ public GetStatsResp deepCopy() {
+ return new GetStatsResp(this);
}
/**
@@ -140,7 +140,7 @@ public com.vesoft.nebula.ErrorCode getCode() {
*
* @see com.vesoft.nebula.ErrorCode
*/
- public GetStatisResp setCode(com.vesoft.nebula.ErrorCode code) {
+ public GetStatsResp setCode(com.vesoft.nebula.ErrorCode code) {
this.code = code;
return this;
}
@@ -164,7 +164,7 @@ public com.vesoft.nebula.HostAddr getLeader() {
return this.leader;
}
- public GetStatisResp setLeader(com.vesoft.nebula.HostAddr leader) {
+ public GetStatsResp setLeader(com.vesoft.nebula.HostAddr leader) {
this.leader = leader;
return this;
}
@@ -184,27 +184,27 @@ public void setLeaderIsSet(boolean __value) {
}
}
- public StatisItem getStatis() {
- return this.statis;
+ public StatsItem getStats() {
+ return this.stats;
}
- public GetStatisResp setStatis(StatisItem statis) {
- this.statis = statis;
+ public GetStatsResp setStats(StatsItem stats) {
+ this.stats = stats;
return this;
}
- public void unsetStatis() {
- this.statis = null;
+ public void unsetStats() {
+ this.stats = null;
}
- // Returns true if field statis is set (has been assigned a value) and false otherwise
- public boolean isSetStatis() {
- return this.statis != null;
+ // Returns true if field stats is set (has been assigned a value) and false otherwise
+ public boolean isSetStats() {
+ return this.stats != null;
}
- public void setStatisIsSet(boolean __value) {
+ public void setStatsIsSet(boolean __value) {
if (!__value) {
- this.statis = null;
+ this.stats = null;
}
}
@@ -226,11 +226,11 @@ public void setFieldValue(int fieldID, Object __value) {
}
break;
- case STATIS:
+ case STATS:
if (__value == null) {
- unsetStatis();
+ unsetStats();
} else {
- setStatis((StatisItem)__value);
+ setStats((StatsItem)__value);
}
break;
@@ -247,8 +247,8 @@ public Object getFieldValue(int fieldID) {
case LEADER:
return getLeader();
- case STATIS:
- return getStatis();
+ case STATS:
+ return getStats();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
@@ -261,26 +261,26 @@ public boolean equals(Object _that) {
return false;
if (this == _that)
return true;
- if (!(_that instanceof GetStatisResp))
+ if (!(_that instanceof GetStatsResp))
return false;
- GetStatisResp that = (GetStatisResp)_that;
+ GetStatsResp that = (GetStatsResp)_that;
if (!TBaseHelper.equalsNobinary(this.isSetCode(), that.isSetCode(), this.code, that.code)) { return false; }
if (!TBaseHelper.equalsNobinary(this.isSetLeader(), that.isSetLeader(), this.leader, that.leader)) { return false; }
- if (!TBaseHelper.equalsNobinary(this.isSetStatis(), that.isSetStatis(), this.statis, that.statis)) { return false; }
+ if (!TBaseHelper.equalsNobinary(this.isSetStats(), that.isSetStats(), this.stats, that.stats)) { return false; }
return true;
}
@Override
public int hashCode() {
- return Arrays.deepHashCode(new Object[] {code, leader, statis});
+ return Arrays.deepHashCode(new Object[] {code, leader, stats});
}
@Override
- public int compareTo(GetStatisResp other) {
+ public int compareTo(GetStatsResp other) {
if (other == null) {
// See java.lang.Comparable docs
throw new NullPointerException();
@@ -307,11 +307,11 @@ public int compareTo(GetStatisResp other) {
if (lastComparison != 0) {
return lastComparison;
}
- lastComparison = Boolean.valueOf(isSetStatis()).compareTo(other.isSetStatis());
+ lastComparison = Boolean.valueOf(isSetStats()).compareTo(other.isSetStats());
if (lastComparison != 0) {
return lastComparison;
}
- lastComparison = TBaseHelper.compareTo(statis, other.statis);
+ lastComparison = TBaseHelper.compareTo(stats, other.stats);
if (lastComparison != 0) {
return lastComparison;
}
@@ -344,10 +344,10 @@ public void read(TProtocol iprot) throws TException {
TProtocolUtil.skip(iprot, __field.type);
}
break;
- case STATIS:
+ case STATS:
if (__field.type == TType.STRUCT) {
- this.statis = new StatisItem();
- this.statis.read(iprot);
+ this.stats = new StatsItem();
+ this.stats.read(iprot);
} else {
TProtocolUtil.skip(iprot, __field.type);
}
@@ -379,9 +379,9 @@ public void write(TProtocol oprot) throws TException {
this.leader.write(oprot);
oprot.writeFieldEnd();
}
- if (this.statis != null) {
- oprot.writeFieldBegin(STATIS_FIELD_DESC);
- this.statis.write(oprot);
+ if (this.stats != null) {
+ oprot.writeFieldBegin(STATS_FIELD_DESC);
+ this.stats.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -398,7 +398,7 @@ public String toString(int indent, boolean prettyPrint) {
String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
String newLine = prettyPrint ? "\n" : "";
String space = prettyPrint ? " " : "";
- StringBuilder sb = new StringBuilder("GetStatisResp");
+ StringBuilder sb = new StringBuilder("GetStatsResp");
sb.append(space);
sb.append("(");
sb.append(newLine);
@@ -435,13 +435,13 @@ public String toString(int indent, boolean prettyPrint) {
first = false;
if (!first) sb.append("," + newLine);
sb.append(indentStr);
- sb.append("statis");
+ sb.append("stats");
sb.append(space);
sb.append(":").append(space);
- if (this.getStatis() == null) {
+ if (this.getStats() == null) {
sb.append("null");
} else {
- sb.append(TBaseHelper.toString(this.getStatis(), indent + 1, prettyPrint));
+ sb.append(TBaseHelper.toString(this.getStats(), indent + 1, prettyPrint));
}
first = false;
sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
diff --git a/client/src/main/generated/com/vesoft/nebula/meta/HBResp.java b/client/src/main/generated/com/vesoft/nebula/meta/HBResp.java
index ab0cd2ac2..b6a073f16 100644
--- a/client/src/main/generated/com/vesoft/nebula/meta/HBResp.java
+++ b/client/src/main/generated/com/vesoft/nebula/meta/HBResp.java
@@ -30,6 +30,7 @@ public class HBResp implements TBase, java.io.Serializable, Cloneable, Comparabl
private static final TField LEADER_FIELD_DESC = new TField("leader", TType.STRUCT, (short)2);
private static final TField CLUSTER_ID_FIELD_DESC = new TField("cluster_id", TType.I64, (short)3);
private static final TField LAST_UPDATE_TIME_IN_MS_FIELD_DESC = new TField("last_update_time_in_ms", TType.I64, (short)4);
+ private static final TField META_VERSION_FIELD_DESC = new TField("meta_version", TType.I32, (short)5);
/**
*
@@ -39,15 +40,18 @@ public class HBResp implements TBase, java.io.Serializable, Cloneable, Comparabl
public com.vesoft.nebula.HostAddr leader;
public long cluster_id;
public long last_update_time_in_ms;
+ public int meta_version;
public static final int CODE = 1;
public static final int LEADER = 2;
public static final int CLUSTER_ID = 3;
public static final int LAST_UPDATE_TIME_IN_MS = 4;
+ public static final int META_VERSION = 5;
// isset id assignments
private static final int __CLUSTER_ID_ISSET_ID = 0;
private static final int __LAST_UPDATE_TIME_IN_MS_ISSET_ID = 1;
- private BitSet __isset_bit_vector = new BitSet(2);
+ private static final int __META_VERSION_ISSET_ID = 2;
+ private BitSet __isset_bit_vector = new BitSet(3);
public static final Map metaDataMap;
@@ -61,6 +65,8 @@ public class HBResp implements TBase, java.io.Serializable, Cloneable, Comparabl
new FieldValueMetaData(TType.I64)));
tmpMetaDataMap.put(LAST_UPDATE_TIME_IN_MS, new FieldMetaData("last_update_time_in_ms", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I64)));
+ tmpMetaDataMap.put(META_VERSION, new FieldMetaData("meta_version", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
}
@@ -75,7 +81,8 @@ public HBResp(
com.vesoft.nebula.ErrorCode code,
com.vesoft.nebula.HostAddr leader,
long cluster_id,
- long last_update_time_in_ms) {
+ long last_update_time_in_ms,
+ int meta_version) {
this();
this.code = code;
this.leader = leader;
@@ -83,6 +90,8 @@ public HBResp(
setCluster_idIsSet(true);
this.last_update_time_in_ms = last_update_time_in_ms;
setLast_update_time_in_msIsSet(true);
+ this.meta_version = meta_version;
+ setMeta_versionIsSet(true);
}
public static class Builder {
@@ -90,8 +99,9 @@ public static class Builder {
private com.vesoft.nebula.HostAddr leader;
private long cluster_id;
private long last_update_time_in_ms;
+ private int meta_version;
- BitSet __optional_isset = new BitSet(2);
+ BitSet __optional_isset = new BitSet(3);
public Builder() {
}
@@ -118,6 +128,12 @@ public Builder setLast_update_time_in_ms(final long last_update_time_in_ms) {
return this;
}
+ public Builder setMeta_version(final int meta_version) {
+ this.meta_version = meta_version;
+ __optional_isset.set(__META_VERSION_ISSET_ID, true);
+ return this;
+ }
+
public HBResp build() {
HBResp result = new HBResp();
result.setCode(this.code);
@@ -128,6 +144,9 @@ public HBResp build() {
if (__optional_isset.get(__LAST_UPDATE_TIME_IN_MS_ISSET_ID)) {
result.setLast_update_time_in_ms(this.last_update_time_in_ms);
}
+ if (__optional_isset.get(__META_VERSION_ISSET_ID)) {
+ result.setMeta_version(this.meta_version);
+ }
return result;
}
}
@@ -150,6 +169,7 @@ public HBResp(HBResp other) {
}
this.cluster_id = TBaseHelper.deepCopy(other.cluster_id);
this.last_update_time_in_ms = TBaseHelper.deepCopy(other.last_update_time_in_ms);
+ this.meta_version = TBaseHelper.deepCopy(other.meta_version);
}
public HBResp deepCopy() {
@@ -258,6 +278,29 @@ public void setLast_update_time_in_msIsSet(boolean __value) {
__isset_bit_vector.set(__LAST_UPDATE_TIME_IN_MS_ISSET_ID, __value);
}
+ public int getMeta_version() {
+ return this.meta_version;
+ }
+
+ public HBResp setMeta_version(int meta_version) {
+ this.meta_version = meta_version;
+ setMeta_versionIsSet(true);
+ return this;
+ }
+
+ public void unsetMeta_version() {
+ __isset_bit_vector.clear(__META_VERSION_ISSET_ID);
+ }
+
+ // Returns true if field meta_version is set (has been assigned a value) and false otherwise
+ public boolean isSetMeta_version() {
+ return __isset_bit_vector.get(__META_VERSION_ISSET_ID);
+ }
+
+ public void setMeta_versionIsSet(boolean __value) {
+ __isset_bit_vector.set(__META_VERSION_ISSET_ID, __value);
+ }
+
public void setFieldValue(int fieldID, Object __value) {
switch (fieldID) {
case CODE:
@@ -292,6 +335,14 @@ public void setFieldValue(int fieldID, Object __value) {
}
break;
+ case META_VERSION:
+ if (__value == null) {
+ unsetMeta_version();
+ } else {
+ setMeta_version((Integer)__value);
+ }
+ break;
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -311,6 +362,9 @@ public Object getFieldValue(int fieldID) {
case LAST_UPDATE_TIME_IN_MS:
return new Long(getLast_update_time_in_ms());
+ case META_VERSION:
+ return new Integer(getMeta_version());
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -334,12 +388,14 @@ public boolean equals(Object _that) {
if (!TBaseHelper.equalsNobinary(this.last_update_time_in_ms, that.last_update_time_in_ms)) { return false; }
+ if (!TBaseHelper.equalsNobinary(this.meta_version, that.meta_version)) { return false; }
+
return true;
}
@Override
public int hashCode() {
- return Arrays.deepHashCode(new Object[] {code, leader, cluster_id, last_update_time_in_ms});
+ return Arrays.deepHashCode(new Object[] {code, leader, cluster_id, last_update_time_in_ms, meta_version});
}
@Override
@@ -386,6 +442,14 @@ public int compareTo(HBResp other) {
if (lastComparison != 0) {
return lastComparison;
}
+ lastComparison = Boolean.valueOf(isSetMeta_version()).compareTo(other.isSetMeta_version());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(meta_version, other.meta_version);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
return 0;
}
@@ -431,6 +495,14 @@ public void read(TProtocol iprot) throws TException {
TProtocolUtil.skip(iprot, __field.type);
}
break;
+ case META_VERSION:
+ if (__field.type == TType.I32) {
+ this.meta_version = iprot.readI32();
+ setMeta_versionIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
default:
TProtocolUtil.skip(iprot, __field.type);
break;
@@ -464,6 +536,9 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(LAST_UPDATE_TIME_IN_MS_FIELD_DESC);
oprot.writeI64(this.last_update_time_in_ms);
oprot.writeFieldEnd();
+ oprot.writeFieldBegin(META_VERSION_FIELD_DESC);
+ oprot.writeI32(this.meta_version);
+ oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -527,6 +602,13 @@ public String toString(int indent, boolean prettyPrint) {
sb.append(":").append(space);
sb.append(TBaseHelper.toString(this.getLast_update_time_in_ms(), indent + 1, prettyPrint));
first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("meta_version");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getMeta_version(), indent + 1, prettyPrint));
+ first = false;
sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
sb.append(")");
return sb.toString();
diff --git a/client/src/main/generated/com/vesoft/nebula/meta/IndexItem.java b/client/src/main/generated/com/vesoft/nebula/meta/IndexItem.java
index 175bb4f0b..7646d65f1 100644
--- a/client/src/main/generated/com/vesoft/nebula/meta/IndexItem.java
+++ b/client/src/main/generated/com/vesoft/nebula/meta/IndexItem.java
@@ -35,7 +35,7 @@ public class IndexItem implements TBase, java.io.Serializable, Cloneable, Compar
public int index_id;
public byte[] index_name;
- public SchemaID schema_id;
+ public com.vesoft.nebula.SchemaID schema_id;
public byte[] schema_name;
public List fields;
public byte[] comment;
@@ -59,7 +59,7 @@ public class IndexItem implements TBase, java.io.Serializable, Cloneable, Compar
tmpMetaDataMap.put(INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
tmpMetaDataMap.put(SCHEMA_ID, new FieldMetaData("schema_id", TFieldRequirementType.DEFAULT,
- new StructMetaData(TType.STRUCT, SchemaID.class)));
+ new StructMetaData(TType.STRUCT, com.vesoft.nebula.SchemaID.class)));
tmpMetaDataMap.put(SCHEMA_NAME, new FieldMetaData("schema_name", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
tmpMetaDataMap.put(FIELDS, new FieldMetaData("fields", TFieldRequirementType.DEFAULT,
@@ -80,7 +80,7 @@ public IndexItem() {
public IndexItem(
int index_id,
byte[] index_name,
- SchemaID schema_id,
+ com.vesoft.nebula.SchemaID schema_id,
byte[] schema_name,
List fields) {
this();
@@ -95,7 +95,7 @@ public IndexItem(
public IndexItem(
int index_id,
byte[] index_name,
- SchemaID schema_id,
+ com.vesoft.nebula.SchemaID schema_id,
byte[] schema_name,
List fields,
byte[] comment) {
@@ -112,7 +112,7 @@ public IndexItem(
public static class Builder {
private int index_id;
private byte[] index_name;
- private SchemaID schema_id;
+ private com.vesoft.nebula.SchemaID schema_id;
private byte[] schema_name;
private List fields;
private byte[] comment;
@@ -133,7 +133,7 @@ public Builder setIndex_name(final byte[] index_name) {
return this;
}
- public Builder setSchema_id(final SchemaID schema_id) {
+ public Builder setSchema_id(final com.vesoft.nebula.SchemaID schema_id) {
this.schema_id = schema_id;
return this;
}
@@ -246,11 +246,11 @@ public void setIndex_nameIsSet(boolean __value) {
}
}
- public SchemaID getSchema_id() {
+ public com.vesoft.nebula.SchemaID getSchema_id() {
return this.schema_id;
}
- public IndexItem setSchema_id(SchemaID schema_id) {
+ public IndexItem setSchema_id(com.vesoft.nebula.SchemaID schema_id) {
this.schema_id = schema_id;
return this;
}
@@ -365,7 +365,7 @@ public void setFieldValue(int fieldID, Object __value) {
if (__value == null) {
unsetSchema_id();
} else {
- setSchema_id((SchemaID)__value);
+ setSchema_id((com.vesoft.nebula.SchemaID)__value);
}
break;
@@ -544,7 +544,7 @@ public void read(TProtocol iprot) throws TException {
break;
case SCHEMA_ID:
if (__field.type == TType.STRUCT) {
- this.schema_id = new SchemaID();
+ this.schema_id = new com.vesoft.nebula.SchemaID();
this.schema_id.read(iprot);
} else {
TProtocolUtil.skip(iprot, __field.type);
diff --git a/client/src/main/generated/com/vesoft/nebula/meta/MetaService.java b/client/src/main/generated/com/vesoft/nebula/meta/MetaService.java
index 400af0c77..5f5fa84ac 100644
--- a/client/src/main/generated/com/vesoft/nebula/meta/MetaService.java
+++ b/client/src/main/generated/com/vesoft/nebula/meta/MetaService.java
@@ -39,6 +39,8 @@ public interface Iface {
public ListSpacesResp listSpaces(ListSpacesReq req) throws TException;
+ public ExecResp createSpaceAs(CreateSpaceAsReq req) throws TException;
+
public ExecResp createTag(CreateTagReq req) throws TException;
public ExecResp alterTag(AlterTagReq req) throws TException;
@@ -175,7 +177,7 @@ public interface Iface {
public ListListenerResp listListener(ListListenerReq req) throws TException;
- public GetStatisResp getStatis(GetStatisReq req) throws TException;
+ public GetStatsResp getStats(GetStatsReq req) throws TException;
public ExecResp signInFTService(SignInFTServiceReq req) throws TException;
@@ -219,6 +221,8 @@ public interface AsyncIface {
public void listSpaces(ListSpacesReq req, AsyncMethodCallback resultHandler) throws TException;
+ public void createSpaceAs(CreateSpaceAsReq req, AsyncMethodCallback resultHandler) throws TException;
+
public void createTag(CreateTagReq req, AsyncMethodCallback resultHandler) throws TException;
public void alterTag(AlterTagReq req, AsyncMethodCallback resultHandler) throws TException;
@@ -355,7 +359,7 @@ public interface AsyncIface {
public void listListener(ListListenerReq req, AsyncMethodCallback resultHandler) throws TException;
- public void getStatis(GetStatisReq req, AsyncMethodCallback resultHandler) throws TException;
+ public void getStats(GetStatsReq req, AsyncMethodCallback resultHandler) throws TException;
public void signInFTService(SignInFTServiceReq req, AsyncMethodCallback resultHandler) throws TException;
@@ -598,6 +602,51 @@ public ListSpacesResp recv_listSpaces() throws TException
throw new TApplicationException(TApplicationException.MISSING_RESULT, "listSpaces failed: unknown result");
}
+ public ExecResp createSpaceAs(CreateSpaceAsReq req) throws TException
+ {
+ ContextStack ctx = getContextStack("MetaService.createSpaceAs", null);
+ this.setContextStack(ctx);
+ send_createSpaceAs(req);
+ return recv_createSpaceAs();
+ }
+
+ public void send_createSpaceAs(CreateSpaceAsReq req) throws TException
+ {
+ ContextStack ctx = this.getContextStack();
+ super.preWrite(ctx, "MetaService.createSpaceAs", null);
+ oprot_.writeMessageBegin(new TMessage("createSpaceAs", TMessageType.CALL, seqid_));
+ createSpaceAs_args args = new createSpaceAs_args();
+ args.req = req;
+ args.write(oprot_);
+ oprot_.writeMessageEnd();
+ oprot_.getTransport().flush();
+ super.postWrite(ctx, "MetaService.createSpaceAs", args);
+ return;
+ }
+
+ public ExecResp recv_createSpaceAs() throws TException
+ {
+ ContextStack ctx = super.getContextStack();
+ long bytes;
+ TMessageType mtype;
+ super.preRead(ctx, "MetaService.createSpaceAs");
+ TMessage msg = iprot_.readMessageBegin();
+ if (msg.type == TMessageType.EXCEPTION) {
+ TApplicationException x = TApplicationException.read(iprot_);
+ iprot_.readMessageEnd();
+ throw x;
+ }
+ createSpaceAs_result result = new createSpaceAs_result();
+ result.read(iprot_);
+ iprot_.readMessageEnd();
+ super.postRead(ctx, "MetaService.createSpaceAs", result);
+
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new TApplicationException(TApplicationException.MISSING_RESULT, "createSpaceAs failed: unknown result");
+ }
+
public ExecResp createTag(CreateTagReq req) throws TException
{
ContextStack ctx = getContextStack("MetaService.createTag", null);
@@ -3658,49 +3707,49 @@ public ListListenerResp recv_listListener() throws TException
throw new TApplicationException(TApplicationException.MISSING_RESULT, "listListener failed: unknown result");
}
- public GetStatisResp getStatis(GetStatisReq req) throws TException
+ public GetStatsResp getStats(GetStatsReq req) throws TException
{
- ContextStack ctx = getContextStack("MetaService.getStatis", null);
+ ContextStack ctx = getContextStack("MetaService.getStats", null);
this.setContextStack(ctx);
- send_getStatis(req);
- return recv_getStatis();
+ send_getStats(req);
+ return recv_getStats();
}
- public void send_getStatis(GetStatisReq req) throws TException
+ public void send_getStats(GetStatsReq req) throws TException
{
ContextStack ctx = this.getContextStack();
- super.preWrite(ctx, "MetaService.getStatis", null);
- oprot_.writeMessageBegin(new TMessage("getStatis", TMessageType.CALL, seqid_));
- getStatis_args args = new getStatis_args();
+ super.preWrite(ctx, "MetaService.getStats", null);
+ oprot_.writeMessageBegin(new TMessage("getStats", TMessageType.CALL, seqid_));
+ getStats_args args = new getStats_args();
args.req = req;
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
- super.postWrite(ctx, "MetaService.getStatis", args);
+ super.postWrite(ctx, "MetaService.getStats", args);
return;
}
- public GetStatisResp recv_getStatis() throws TException
+ public GetStatsResp recv_getStats() throws TException
{
ContextStack ctx = super.getContextStack();
long bytes;
TMessageType mtype;
- super.preRead(ctx, "MetaService.getStatis");
+ super.preRead(ctx, "MetaService.getStats");
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
- getStatis_result result = new getStatis_result();
+ getStats_result result = new getStats_result();
result.read(iprot_);
iprot_.readMessageEnd();
- super.postRead(ctx, "MetaService.getStatis", result);
+ super.postRead(ctx, "MetaService.getStats", result);
if (result.isSetSuccess()) {
return result.success;
}
- throw new TApplicationException(TApplicationException.MISSING_RESULT, "getStatis failed: unknown result");
+ throw new TApplicationException(TApplicationException.MISSING_RESULT, "getStats failed: unknown result");
}
public ExecResp signInFTService(SignInFTServiceReq req) throws TException
@@ -4396,17 +4445,17 @@ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientM
super(protocolFactory, clientManager, transport);
}
- public void createSpace(CreateSpaceReq req, AsyncMethodCallback resultHandler424) throws TException {
+ public void createSpace(CreateSpaceReq req, AsyncMethodCallback resultHandler425) throws TException {
checkReady();
- createSpace_call method_call = new createSpace_call(req, resultHandler424, this, ___protocolFactory, ___transport);
+ createSpace_call method_call = new createSpace_call(req, resultHandler425, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createSpace_call extends TAsyncMethodCall {
private CreateSpaceReq req;
- public createSpace_call(CreateSpaceReq req, AsyncMethodCallback resultHandler425, TAsyncClient client421, TProtocolFactory protocolFactory422, TNonblockingTransport transport423) throws TException {
- super(client421, protocolFactory422, transport423, resultHandler425, false);
+ public createSpace_call(CreateSpaceReq req, AsyncMethodCallback resultHandler426, TAsyncClient client422, TProtocolFactory protocolFactory423, TNonblockingTransport transport424) throws TException {
+ super(client422, protocolFactory423, transport424, resultHandler426, false);
this.req = req;
}
@@ -4428,17 +4477,17 @@ public ExecResp getResult() throws TException {
}
}
- public void dropSpace(DropSpaceReq req, AsyncMethodCallback resultHandler429) throws TException {
+ public void dropSpace(DropSpaceReq req, AsyncMethodCallback resultHandler430) throws TException {
checkReady();
- dropSpace_call method_call = new dropSpace_call(req, resultHandler429, this, ___protocolFactory, ___transport);
+ dropSpace_call method_call = new dropSpace_call(req, resultHandler430, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class dropSpace_call extends TAsyncMethodCall {
private DropSpaceReq req;
- public dropSpace_call(DropSpaceReq req, AsyncMethodCallback resultHandler430, TAsyncClient client426, TProtocolFactory protocolFactory427, TNonblockingTransport transport428) throws TException {
- super(client426, protocolFactory427, transport428, resultHandler430, false);
+ public dropSpace_call(DropSpaceReq req, AsyncMethodCallback resultHandler431, TAsyncClient client427, TProtocolFactory protocolFactory428, TNonblockingTransport transport429) throws TException {
+ super(client427, protocolFactory428, transport429, resultHandler431, false);
this.req = req;
}
@@ -4460,17 +4509,17 @@ public ExecResp getResult() throws TException {
}
}
- public void getSpace(GetSpaceReq req, AsyncMethodCallback resultHandler434) throws TException {
+ public void getSpace(GetSpaceReq req, AsyncMethodCallback resultHandler435) throws TException {
checkReady();
- getSpace_call method_call = new getSpace_call(req, resultHandler434, this, ___protocolFactory, ___transport);
+ getSpace_call method_call = new getSpace_call(req, resultHandler435, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getSpace_call extends TAsyncMethodCall {
private GetSpaceReq req;
- public getSpace_call(GetSpaceReq req, AsyncMethodCallback resultHandler435, TAsyncClient client431, TProtocolFactory protocolFactory432, TNonblockingTransport transport433) throws TException {
- super(client431, protocolFactory432, transport433, resultHandler435, false);
+ public getSpace_call(GetSpaceReq req, AsyncMethodCallback resultHandler436, TAsyncClient client432, TProtocolFactory protocolFactory433, TNonblockingTransport transport434) throws TException {
+ super(client432, protocolFactory433, transport434, resultHandler436, false);
this.req = req;
}
@@ -4492,17 +4541,17 @@ public GetSpaceResp getResult() throws TException {
}
}
- public void listSpaces(ListSpacesReq req, AsyncMethodCallback resultHandler439) throws TException {
+ public void listSpaces(ListSpacesReq req, AsyncMethodCallback resultHandler440) throws TException {
checkReady();
- listSpaces_call method_call = new listSpaces_call(req, resultHandler439, this, ___protocolFactory, ___transport);
+ listSpaces_call method_call = new listSpaces_call(req, resultHandler440, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listSpaces_call extends TAsyncMethodCall {
private ListSpacesReq req;
- public listSpaces_call(ListSpacesReq req, AsyncMethodCallback resultHandler440, TAsyncClient client436, TProtocolFactory protocolFactory437, TNonblockingTransport transport438) throws TException {
- super(client436, protocolFactory437, transport438, resultHandler440, false);
+ public listSpaces_call(ListSpacesReq req, AsyncMethodCallback resultHandler441, TAsyncClient client437, TProtocolFactory protocolFactory438, TNonblockingTransport transport439) throws TException {
+ super(client437, protocolFactory438, transport439, resultHandler441, false);
this.req = req;
}
@@ -4524,17 +4573,49 @@ public ListSpacesResp getResult() throws TException {
}
}
- public void createTag(CreateTagReq req, AsyncMethodCallback resultHandler444) throws TException {
+ public void createSpaceAs(CreateSpaceAsReq req, AsyncMethodCallback resultHandler445) throws TException {
checkReady();
- createTag_call method_call = new createTag_call(req, resultHandler444, this, ___protocolFactory, ___transport);
+ createSpaceAs_call method_call = new createSpaceAs_call(req, resultHandler445, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class createSpaceAs_call extends TAsyncMethodCall {
+ private CreateSpaceAsReq req;
+ public createSpaceAs_call(CreateSpaceAsReq req, AsyncMethodCallback resultHandler446, TAsyncClient client442, TProtocolFactory protocolFactory443, TNonblockingTransport transport444) throws TException {
+ super(client442, protocolFactory443, transport444, resultHandler446, false);
+ this.req = req;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("createSpaceAs", TMessageType.CALL, 0));
+ createSpaceAs_args args = new createSpaceAs_args();
+ args.setReq(req);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public ExecResp getResult() throws TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_createSpaceAs();
+ }
+ }
+
+ public void createTag(CreateTagReq req, AsyncMethodCallback resultHandler450) throws TException {
+ checkReady();
+ createTag_call method_call = new createTag_call(req, resultHandler450, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createTag_call extends TAsyncMethodCall {
private CreateTagReq req;
- public createTag_call(CreateTagReq req, AsyncMethodCallback resultHandler445, TAsyncClient client441, TProtocolFactory protocolFactory442, TNonblockingTransport transport443) throws TException {
- super(client441, protocolFactory442, transport443, resultHandler445, false);
+ public createTag_call(CreateTagReq req, AsyncMethodCallback resultHandler451, TAsyncClient client447, TProtocolFactory protocolFactory448, TNonblockingTransport transport449) throws TException {
+ super(client447, protocolFactory448, transport449, resultHandler451, false);
this.req = req;
}
@@ -4556,17 +4637,17 @@ public ExecResp getResult() throws TException {
}
}
- public void alterTag(AlterTagReq req, AsyncMethodCallback resultHandler449) throws TException {
+ public void alterTag(AlterTagReq req, AsyncMethodCallback resultHandler455) throws TException {
checkReady();
- alterTag_call method_call = new alterTag_call(req, resultHandler449, this, ___protocolFactory, ___transport);
+ alterTag_call method_call = new alterTag_call(req, resultHandler455, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class alterTag_call extends TAsyncMethodCall {
private AlterTagReq req;
- public alterTag_call(AlterTagReq req, AsyncMethodCallback resultHandler450, TAsyncClient client446, TProtocolFactory protocolFactory447, TNonblockingTransport transport448) throws TException {
- super(client446, protocolFactory447, transport448, resultHandler450, false);
+ public alterTag_call(AlterTagReq req, AsyncMethodCallback resultHandler456, TAsyncClient client452, TProtocolFactory protocolFactory453, TNonblockingTransport transport454) throws TException {
+ super(client452, protocolFactory453, transport454, resultHandler456, false);
this.req = req;
}
@@ -4588,17 +4669,17 @@ public ExecResp getResult() throws TException {
}
}
- public void dropTag(DropTagReq req, AsyncMethodCallback resultHandler454) throws TException {
+ public void dropTag(DropTagReq req, AsyncMethodCallback resultHandler460) throws TException {
checkReady();
- dropTag_call method_call = new dropTag_call(req, resultHandler454, this, ___protocolFactory, ___transport);
+ dropTag_call method_call = new dropTag_call(req, resultHandler460, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class dropTag_call extends TAsyncMethodCall {
private DropTagReq req;
- public dropTag_call(DropTagReq req, AsyncMethodCallback resultHandler455, TAsyncClient client451, TProtocolFactory protocolFactory452, TNonblockingTransport transport453) throws TException {
- super(client451, protocolFactory452, transport453, resultHandler455, false);
+ public dropTag_call(DropTagReq req, AsyncMethodCallback resultHandler461, TAsyncClient client457, TProtocolFactory protocolFactory458, TNonblockingTransport transport459) throws TException {
+ super(client457, protocolFactory458, transport459, resultHandler461, false);
this.req = req;
}
@@ -4620,17 +4701,17 @@ public ExecResp getResult() throws TException {
}
}
- public void getTag(GetTagReq req, AsyncMethodCallback resultHandler459) throws TException {
+ public void getTag(GetTagReq req, AsyncMethodCallback resultHandler465) throws TException {
checkReady();
- getTag_call method_call = new getTag_call(req, resultHandler459, this, ___protocolFactory, ___transport);
+ getTag_call method_call = new getTag_call(req, resultHandler465, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getTag_call extends TAsyncMethodCall {
private GetTagReq req;
- public getTag_call(GetTagReq req, AsyncMethodCallback resultHandler460, TAsyncClient client456, TProtocolFactory protocolFactory457, TNonblockingTransport transport458) throws TException {
- super(client456, protocolFactory457, transport458, resultHandler460, false);
+ public getTag_call(GetTagReq req, AsyncMethodCallback resultHandler466, TAsyncClient client462, TProtocolFactory protocolFactory463, TNonblockingTransport transport464) throws TException {
+ super(client462, protocolFactory463, transport464, resultHandler466, false);
this.req = req;
}
@@ -4652,17 +4733,17 @@ public GetTagResp getResult() throws TException {
}
}
- public void listTags(ListTagsReq req, AsyncMethodCallback resultHandler464) throws TException {
+ public void listTags(ListTagsReq req, AsyncMethodCallback resultHandler470) throws TException {
checkReady();
- listTags_call method_call = new listTags_call(req, resultHandler464, this, ___protocolFactory, ___transport);
+ listTags_call method_call = new listTags_call(req, resultHandler470, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listTags_call extends TAsyncMethodCall {
private ListTagsReq req;
- public listTags_call(ListTagsReq req, AsyncMethodCallback resultHandler465, TAsyncClient client461, TProtocolFactory protocolFactory462, TNonblockingTransport transport463) throws TException {
- super(client461, protocolFactory462, transport463, resultHandler465, false);
+ public listTags_call(ListTagsReq req, AsyncMethodCallback resultHandler471, TAsyncClient client467, TProtocolFactory protocolFactory468, TNonblockingTransport transport469) throws TException {
+ super(client467, protocolFactory468, transport469, resultHandler471, false);
this.req = req;
}
@@ -4684,17 +4765,17 @@ public ListTagsResp getResult() throws TException {
}
}
- public void createEdge(CreateEdgeReq req, AsyncMethodCallback resultHandler469) throws TException {
+ public void createEdge(CreateEdgeReq req, AsyncMethodCallback resultHandler475) throws TException {
checkReady();
- createEdge_call method_call = new createEdge_call(req, resultHandler469, this, ___protocolFactory, ___transport);
+ createEdge_call method_call = new createEdge_call(req, resultHandler475, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createEdge_call extends TAsyncMethodCall {
private CreateEdgeReq req;
- public createEdge_call(CreateEdgeReq req, AsyncMethodCallback resultHandler470, TAsyncClient client466, TProtocolFactory protocolFactory467, TNonblockingTransport transport468) throws TException {
- super(client466, protocolFactory467, transport468, resultHandler470, false);
+ public createEdge_call(CreateEdgeReq req, AsyncMethodCallback resultHandler476, TAsyncClient client472, TProtocolFactory protocolFactory473, TNonblockingTransport transport474) throws TException {
+ super(client472, protocolFactory473, transport474, resultHandler476, false);
this.req = req;
}
@@ -4716,17 +4797,17 @@ public ExecResp getResult() throws TException {
}
}
- public void alterEdge(AlterEdgeReq req, AsyncMethodCallback resultHandler474) throws TException {
+ public void alterEdge(AlterEdgeReq req, AsyncMethodCallback resultHandler480) throws TException {
checkReady();
- alterEdge_call method_call = new alterEdge_call(req, resultHandler474, this, ___protocolFactory, ___transport);
+ alterEdge_call method_call = new alterEdge_call(req, resultHandler480, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class alterEdge_call extends TAsyncMethodCall {
private AlterEdgeReq req;
- public alterEdge_call(AlterEdgeReq req, AsyncMethodCallback resultHandler475, TAsyncClient client471, TProtocolFactory protocolFactory472, TNonblockingTransport transport473) throws TException {
- super(client471, protocolFactory472, transport473, resultHandler475, false);
+ public alterEdge_call(AlterEdgeReq req, AsyncMethodCallback resultHandler481, TAsyncClient client477, TProtocolFactory protocolFactory478, TNonblockingTransport transport479) throws TException {
+ super(client477, protocolFactory478, transport479, resultHandler481, false);
this.req = req;
}
@@ -4748,17 +4829,17 @@ public ExecResp getResult() throws TException {
}
}
- public void dropEdge(DropEdgeReq req, AsyncMethodCallback resultHandler479) throws TException {
+ public void dropEdge(DropEdgeReq req, AsyncMethodCallback resultHandler485) throws TException {
checkReady();
- dropEdge_call method_call = new dropEdge_call(req, resultHandler479, this, ___protocolFactory, ___transport);
+ dropEdge_call method_call = new dropEdge_call(req, resultHandler485, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class dropEdge_call extends TAsyncMethodCall {
private DropEdgeReq req;
- public dropEdge_call(DropEdgeReq req, AsyncMethodCallback resultHandler480, TAsyncClient client476, TProtocolFactory protocolFactory477, TNonblockingTransport transport478) throws TException {
- super(client476, protocolFactory477, transport478, resultHandler480, false);
+ public dropEdge_call(DropEdgeReq req, AsyncMethodCallback resultHandler486, TAsyncClient client482, TProtocolFactory protocolFactory483, TNonblockingTransport transport484) throws TException {
+ super(client482, protocolFactory483, transport484, resultHandler486, false);
this.req = req;
}
@@ -4780,17 +4861,17 @@ public ExecResp getResult() throws TException {
}
}
- public void getEdge(GetEdgeReq req, AsyncMethodCallback resultHandler484) throws TException {
+ public void getEdge(GetEdgeReq req, AsyncMethodCallback resultHandler490) throws TException {
checkReady();
- getEdge_call method_call = new getEdge_call(req, resultHandler484, this, ___protocolFactory, ___transport);
+ getEdge_call method_call = new getEdge_call(req, resultHandler490, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getEdge_call extends TAsyncMethodCall {
private GetEdgeReq req;
- public getEdge_call(GetEdgeReq req, AsyncMethodCallback resultHandler485, TAsyncClient client481, TProtocolFactory protocolFactory482, TNonblockingTransport transport483) throws TException {
- super(client481, protocolFactory482, transport483, resultHandler485, false);
+ public getEdge_call(GetEdgeReq req, AsyncMethodCallback resultHandler491, TAsyncClient client487, TProtocolFactory protocolFactory488, TNonblockingTransport transport489) throws TException {
+ super(client487, protocolFactory488, transport489, resultHandler491, false);
this.req = req;
}
@@ -4812,17 +4893,17 @@ public GetEdgeResp getResult() throws TException {
}
}
- public void listEdges(ListEdgesReq req, AsyncMethodCallback resultHandler489) throws TException {
+ public void listEdges(ListEdgesReq req, AsyncMethodCallback resultHandler495) throws TException {
checkReady();
- listEdges_call method_call = new listEdges_call(req, resultHandler489, this, ___protocolFactory, ___transport);
+ listEdges_call method_call = new listEdges_call(req, resultHandler495, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listEdges_call extends TAsyncMethodCall {
private ListEdgesReq req;
- public listEdges_call(ListEdgesReq req, AsyncMethodCallback resultHandler490, TAsyncClient client486, TProtocolFactory protocolFactory487, TNonblockingTransport transport488) throws TException {
- super(client486, protocolFactory487, transport488, resultHandler490, false);
+ public listEdges_call(ListEdgesReq req, AsyncMethodCallback resultHandler496, TAsyncClient client492, TProtocolFactory protocolFactory493, TNonblockingTransport transport494) throws TException {
+ super(client492, protocolFactory493, transport494, resultHandler496, false);
this.req = req;
}
@@ -4844,17 +4925,17 @@ public ListEdgesResp getResult() throws TException {
}
}
- public void listHosts(ListHostsReq req, AsyncMethodCallback resultHandler494) throws TException {
+ public void listHosts(ListHostsReq req, AsyncMethodCallback resultHandler500) throws TException {
checkReady();
- listHosts_call method_call = new listHosts_call(req, resultHandler494, this, ___protocolFactory, ___transport);
+ listHosts_call method_call = new listHosts_call(req, resultHandler500, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listHosts_call extends TAsyncMethodCall {
private ListHostsReq req;
- public listHosts_call(ListHostsReq req, AsyncMethodCallback resultHandler495, TAsyncClient client491, TProtocolFactory protocolFactory492, TNonblockingTransport transport493) throws TException {
- super(client491, protocolFactory492, transport493, resultHandler495, false);
+ public listHosts_call(ListHostsReq req, AsyncMethodCallback resultHandler501, TAsyncClient client497, TProtocolFactory protocolFactory498, TNonblockingTransport transport499) throws TException {
+ super(client497, protocolFactory498, transport499, resultHandler501, false);
this.req = req;
}
@@ -4876,17 +4957,17 @@ public ListHostsResp getResult() throws TException {
}
}
- public void getPartsAlloc(GetPartsAllocReq req, AsyncMethodCallback resultHandler499) throws TException {
+ public void getPartsAlloc(GetPartsAllocReq req, AsyncMethodCallback resultHandler505) throws TException {
checkReady();
- getPartsAlloc_call method_call = new getPartsAlloc_call(req, resultHandler499, this, ___protocolFactory, ___transport);
+ getPartsAlloc_call method_call = new getPartsAlloc_call(req, resultHandler505, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getPartsAlloc_call extends TAsyncMethodCall {
private GetPartsAllocReq req;
- public getPartsAlloc_call(GetPartsAllocReq req, AsyncMethodCallback resultHandler500, TAsyncClient client496, TProtocolFactory protocolFactory497, TNonblockingTransport transport498) throws TException {
- super(client496, protocolFactory497, transport498, resultHandler500, false);
+ public getPartsAlloc_call(GetPartsAllocReq req, AsyncMethodCallback resultHandler506, TAsyncClient client502, TProtocolFactory protocolFactory503, TNonblockingTransport transport504) throws TException {
+ super(client502, protocolFactory503, transport504, resultHandler506, false);
this.req = req;
}
@@ -4908,17 +4989,17 @@ public GetPartsAllocResp getResult() throws TException {
}
}
- public void listParts(ListPartsReq req, AsyncMethodCallback resultHandler504) throws TException {
+ public void listParts(ListPartsReq req, AsyncMethodCallback resultHandler510) throws TException {
checkReady();
- listParts_call method_call = new listParts_call(req, resultHandler504, this, ___protocolFactory, ___transport);
+ listParts_call method_call = new listParts_call(req, resultHandler510, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listParts_call extends TAsyncMethodCall {
private ListPartsReq req;
- public listParts_call(ListPartsReq req, AsyncMethodCallback resultHandler505, TAsyncClient client501, TProtocolFactory protocolFactory502, TNonblockingTransport transport503) throws TException {
- super(client501, protocolFactory502, transport503, resultHandler505, false);
+ public listParts_call(ListPartsReq req, AsyncMethodCallback resultHandler511, TAsyncClient client507, TProtocolFactory protocolFactory508, TNonblockingTransport transport509) throws TException {
+ super(client507, protocolFactory508, transport509, resultHandler511, false);
this.req = req;
}
@@ -4940,17 +5021,17 @@ public ListPartsResp getResult() throws TException {
}
}
- public void multiPut(MultiPutReq req, AsyncMethodCallback resultHandler509) throws TException {
+ public void multiPut(MultiPutReq req, AsyncMethodCallback resultHandler515) throws TException {
checkReady();
- multiPut_call method_call = new multiPut_call(req, resultHandler509, this, ___protocolFactory, ___transport);
+ multiPut_call method_call = new multiPut_call(req, resultHandler515, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class multiPut_call extends TAsyncMethodCall {
private MultiPutReq req;
- public multiPut_call(MultiPutReq req, AsyncMethodCallback resultHandler510, TAsyncClient client506, TProtocolFactory protocolFactory507, TNonblockingTransport transport508) throws TException {
- super(client506, protocolFactory507, transport508, resultHandler510, false);
+ public multiPut_call(MultiPutReq req, AsyncMethodCallback resultHandler516, TAsyncClient client512, TProtocolFactory protocolFactory513, TNonblockingTransport transport514) throws TException {
+ super(client512, protocolFactory513, transport514, resultHandler516, false);
this.req = req;
}
@@ -4972,17 +5053,17 @@ public ExecResp getResult() throws TException {
}
}
- public void get(GetReq req, AsyncMethodCallback resultHandler514) throws TException {
+ public void get(GetReq req, AsyncMethodCallback resultHandler520) throws TException {
checkReady();
- get_call method_call = new get_call(req, resultHandler514, this, ___protocolFactory, ___transport);
+ get_call method_call = new get_call(req, resultHandler520, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class get_call extends TAsyncMethodCall {
private GetReq req;
- public get_call(GetReq req, AsyncMethodCallback resultHandler515, TAsyncClient client511, TProtocolFactory protocolFactory512, TNonblockingTransport transport513) throws TException {
- super(client511, protocolFactory512, transport513, resultHandler515, false);
+ public get_call(GetReq req, AsyncMethodCallback resultHandler521, TAsyncClient client517, TProtocolFactory protocolFactory518, TNonblockingTransport transport519) throws TException {
+ super(client517, protocolFactory518, transport519, resultHandler521, false);
this.req = req;
}
@@ -5004,17 +5085,17 @@ public GetResp getResult() throws TException {
}
}
- public void multiGet(MultiGetReq req, AsyncMethodCallback resultHandler519) throws TException {
+ public void multiGet(MultiGetReq req, AsyncMethodCallback resultHandler525) throws TException {
checkReady();
- multiGet_call method_call = new multiGet_call(req, resultHandler519, this, ___protocolFactory, ___transport);
+ multiGet_call method_call = new multiGet_call(req, resultHandler525, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class multiGet_call extends TAsyncMethodCall {
private MultiGetReq req;
- public multiGet_call(MultiGetReq req, AsyncMethodCallback resultHandler520, TAsyncClient client516, TProtocolFactory protocolFactory517, TNonblockingTransport transport518) throws TException {
- super(client516, protocolFactory517, transport518, resultHandler520, false);
+ public multiGet_call(MultiGetReq req, AsyncMethodCallback resultHandler526, TAsyncClient client522, TProtocolFactory protocolFactory523, TNonblockingTransport transport524) throws TException {
+ super(client522, protocolFactory523, transport524, resultHandler526, false);
this.req = req;
}
@@ -5036,17 +5117,17 @@ public MultiGetResp getResult() throws TException {
}
}
- public void remove(RemoveReq req, AsyncMethodCallback resultHandler524) throws TException {
+ public void remove(RemoveReq req, AsyncMethodCallback resultHandler530) throws TException {
checkReady();
- remove_call method_call = new remove_call(req, resultHandler524, this, ___protocolFactory, ___transport);
+ remove_call method_call = new remove_call(req, resultHandler530, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class remove_call extends TAsyncMethodCall {
private RemoveReq req;
- public remove_call(RemoveReq req, AsyncMethodCallback resultHandler525, TAsyncClient client521, TProtocolFactory protocolFactory522, TNonblockingTransport transport523) throws TException {
- super(client521, protocolFactory522, transport523, resultHandler525, false);
+ public remove_call(RemoveReq req, AsyncMethodCallback resultHandler531, TAsyncClient client527, TProtocolFactory protocolFactory528, TNonblockingTransport transport529) throws TException {
+ super(client527, protocolFactory528, transport529, resultHandler531, false);
this.req = req;
}
@@ -5068,17 +5149,17 @@ public ExecResp getResult() throws TException {
}
}
- public void removeRange(RemoveRangeReq req, AsyncMethodCallback resultHandler529) throws TException {
+ public void removeRange(RemoveRangeReq req, AsyncMethodCallback resultHandler535) throws TException {
checkReady();
- removeRange_call method_call = new removeRange_call(req, resultHandler529, this, ___protocolFactory, ___transport);
+ removeRange_call method_call = new removeRange_call(req, resultHandler535, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class removeRange_call extends TAsyncMethodCall {
private RemoveRangeReq req;
- public removeRange_call(RemoveRangeReq req, AsyncMethodCallback resultHandler530, TAsyncClient client526, TProtocolFactory protocolFactory527, TNonblockingTransport transport528) throws TException {
- super(client526, protocolFactory527, transport528, resultHandler530, false);
+ public removeRange_call(RemoveRangeReq req, AsyncMethodCallback resultHandler536, TAsyncClient client532, TProtocolFactory protocolFactory533, TNonblockingTransport transport534) throws TException {
+ super(client532, protocolFactory533, transport534, resultHandler536, false);
this.req = req;
}
@@ -5100,17 +5181,17 @@ public ExecResp getResult() throws TException {
}
}
- public void scan(ScanReq req, AsyncMethodCallback resultHandler534) throws TException {
+ public void scan(ScanReq req, AsyncMethodCallback resultHandler540) throws TException {
checkReady();
- scan_call method_call = new scan_call(req, resultHandler534, this, ___protocolFactory, ___transport);
+ scan_call method_call = new scan_call(req, resultHandler540, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class scan_call extends TAsyncMethodCall {
private ScanReq req;
- public scan_call(ScanReq req, AsyncMethodCallback resultHandler535, TAsyncClient client531, TProtocolFactory protocolFactory532, TNonblockingTransport transport533) throws TException {
- super(client531, protocolFactory532, transport533, resultHandler535, false);
+ public scan_call(ScanReq req, AsyncMethodCallback resultHandler541, TAsyncClient client537, TProtocolFactory protocolFactory538, TNonblockingTransport transport539) throws TException {
+ super(client537, protocolFactory538, transport539, resultHandler541, false);
this.req = req;
}
@@ -5132,17 +5213,17 @@ public ScanResp getResult() throws TException {
}
}
- public void createTagIndex(CreateTagIndexReq req, AsyncMethodCallback resultHandler539) throws TException {
+ public void createTagIndex(CreateTagIndexReq req, AsyncMethodCallback resultHandler545) throws TException {
checkReady();
- createTagIndex_call method_call = new createTagIndex_call(req, resultHandler539, this, ___protocolFactory, ___transport);
+ createTagIndex_call method_call = new createTagIndex_call(req, resultHandler545, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createTagIndex_call extends TAsyncMethodCall {
private CreateTagIndexReq req;
- public createTagIndex_call(CreateTagIndexReq req, AsyncMethodCallback resultHandler540, TAsyncClient client536, TProtocolFactory protocolFactory537, TNonblockingTransport transport538) throws TException {
- super(client536, protocolFactory537, transport538, resultHandler540, false);
+ public createTagIndex_call(CreateTagIndexReq req, AsyncMethodCallback resultHandler546, TAsyncClient client542, TProtocolFactory protocolFactory543, TNonblockingTransport transport544) throws TException {
+ super(client542, protocolFactory543, transport544, resultHandler546, false);
this.req = req;
}
@@ -5164,17 +5245,17 @@ public ExecResp getResult() throws TException {
}
}
- public void dropTagIndex(DropTagIndexReq req, AsyncMethodCallback resultHandler544) throws TException {
+ public void dropTagIndex(DropTagIndexReq req, AsyncMethodCallback resultHandler550) throws TException {
checkReady();
- dropTagIndex_call method_call = new dropTagIndex_call(req, resultHandler544, this, ___protocolFactory, ___transport);
+ dropTagIndex_call method_call = new dropTagIndex_call(req, resultHandler550, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class dropTagIndex_call extends TAsyncMethodCall {
private DropTagIndexReq req;
- public dropTagIndex_call(DropTagIndexReq req, AsyncMethodCallback resultHandler545, TAsyncClient client541, TProtocolFactory protocolFactory542, TNonblockingTransport transport543) throws TException {
- super(client541, protocolFactory542, transport543, resultHandler545, false);
+ public dropTagIndex_call(DropTagIndexReq req, AsyncMethodCallback resultHandler551, TAsyncClient client547, TProtocolFactory protocolFactory548, TNonblockingTransport transport549) throws TException {
+ super(client547, protocolFactory548, transport549, resultHandler551, false);
this.req = req;
}
@@ -5196,17 +5277,17 @@ public ExecResp getResult() throws TException {
}
}
- public void getTagIndex(GetTagIndexReq req, AsyncMethodCallback resultHandler549) throws TException {
+ public void getTagIndex(GetTagIndexReq req, AsyncMethodCallback resultHandler555) throws TException {
checkReady();
- getTagIndex_call method_call = new getTagIndex_call(req, resultHandler549, this, ___protocolFactory, ___transport);
+ getTagIndex_call method_call = new getTagIndex_call(req, resultHandler555, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getTagIndex_call extends TAsyncMethodCall {
private GetTagIndexReq req;
- public getTagIndex_call(GetTagIndexReq req, AsyncMethodCallback resultHandler550, TAsyncClient client546, TProtocolFactory protocolFactory547, TNonblockingTransport transport548) throws TException {
- super(client546, protocolFactory547, transport548, resultHandler550, false);
+ public getTagIndex_call(GetTagIndexReq req, AsyncMethodCallback resultHandler556, TAsyncClient client552, TProtocolFactory protocolFactory553, TNonblockingTransport transport554) throws TException {
+ super(client552, protocolFactory553, transport554, resultHandler556, false);
this.req = req;
}
@@ -5228,17 +5309,17 @@ public GetTagIndexResp getResult() throws TException {
}
}
- public void listTagIndexes(ListTagIndexesReq req, AsyncMethodCallback resultHandler554) throws TException {
+ public void listTagIndexes(ListTagIndexesReq req, AsyncMethodCallback resultHandler560) throws TException {
checkReady();
- listTagIndexes_call method_call = new listTagIndexes_call(req, resultHandler554, this, ___protocolFactory, ___transport);
+ listTagIndexes_call method_call = new listTagIndexes_call(req, resultHandler560, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listTagIndexes_call extends TAsyncMethodCall {
private ListTagIndexesReq req;
- public listTagIndexes_call(ListTagIndexesReq req, AsyncMethodCallback resultHandler555, TAsyncClient client551, TProtocolFactory protocolFactory552, TNonblockingTransport transport553) throws TException {
- super(client551, protocolFactory552, transport553, resultHandler555, false);
+ public listTagIndexes_call(ListTagIndexesReq req, AsyncMethodCallback resultHandler561, TAsyncClient client557, TProtocolFactory protocolFactory558, TNonblockingTransport transport559) throws TException {
+ super(client557, protocolFactory558, transport559, resultHandler561, false);
this.req = req;
}
@@ -5260,17 +5341,17 @@ public ListTagIndexesResp getResult() throws TException {
}
}
- public void rebuildTagIndex(RebuildIndexReq req, AsyncMethodCallback resultHandler559) throws TException {
+ public void rebuildTagIndex(RebuildIndexReq req, AsyncMethodCallback resultHandler565) throws TException {
checkReady();
- rebuildTagIndex_call method_call = new rebuildTagIndex_call(req, resultHandler559, this, ___protocolFactory, ___transport);
+ rebuildTagIndex_call method_call = new rebuildTagIndex_call(req, resultHandler565, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class rebuildTagIndex_call extends TAsyncMethodCall {
private RebuildIndexReq req;
- public rebuildTagIndex_call(RebuildIndexReq req, AsyncMethodCallback resultHandler560, TAsyncClient client556, TProtocolFactory protocolFactory557, TNonblockingTransport transport558) throws TException {
- super(client556, protocolFactory557, transport558, resultHandler560, false);
+ public rebuildTagIndex_call(RebuildIndexReq req, AsyncMethodCallback resultHandler566, TAsyncClient client562, TProtocolFactory protocolFactory563, TNonblockingTransport transport564) throws TException {
+ super(client562, protocolFactory563, transport564, resultHandler566, false);
this.req = req;
}
@@ -5292,17 +5373,17 @@ public ExecResp getResult() throws TException {
}
}
- public void listTagIndexStatus(ListIndexStatusReq req, AsyncMethodCallback resultHandler564) throws TException {
+ public void listTagIndexStatus(ListIndexStatusReq req, AsyncMethodCallback resultHandler570) throws TException {
checkReady();
- listTagIndexStatus_call method_call = new listTagIndexStatus_call(req, resultHandler564, this, ___protocolFactory, ___transport);
+ listTagIndexStatus_call method_call = new listTagIndexStatus_call(req, resultHandler570, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listTagIndexStatus_call extends TAsyncMethodCall {
private ListIndexStatusReq req;
- public listTagIndexStatus_call(ListIndexStatusReq req, AsyncMethodCallback resultHandler565, TAsyncClient client561, TProtocolFactory protocolFactory562, TNonblockingTransport transport563) throws TException {
- super(client561, protocolFactory562, transport563, resultHandler565, false);
+ public listTagIndexStatus_call(ListIndexStatusReq req, AsyncMethodCallback resultHandler571, TAsyncClient client567, TProtocolFactory protocolFactory568, TNonblockingTransport transport569) throws TException {
+ super(client567, protocolFactory568, transport569, resultHandler571, false);
this.req = req;
}
@@ -5324,17 +5405,17 @@ public ListIndexStatusResp getResult() throws TException {
}
}
- public void createEdgeIndex(CreateEdgeIndexReq req, AsyncMethodCallback resultHandler569) throws TException {
+ public void createEdgeIndex(CreateEdgeIndexReq req, AsyncMethodCallback resultHandler575) throws TException {
checkReady();
- createEdgeIndex_call method_call = new createEdgeIndex_call(req, resultHandler569, this, ___protocolFactory, ___transport);
+ createEdgeIndex_call method_call = new createEdgeIndex_call(req, resultHandler575, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createEdgeIndex_call extends TAsyncMethodCall {
private CreateEdgeIndexReq req;
- public createEdgeIndex_call(CreateEdgeIndexReq req, AsyncMethodCallback resultHandler570, TAsyncClient client566, TProtocolFactory protocolFactory567, TNonblockingTransport transport568) throws TException {
- super(client566, protocolFactory567, transport568, resultHandler570, false);
+ public createEdgeIndex_call(CreateEdgeIndexReq req, AsyncMethodCallback resultHandler576, TAsyncClient client572, TProtocolFactory protocolFactory573, TNonblockingTransport transport574) throws TException {
+ super(client572, protocolFactory573, transport574, resultHandler576, false);
this.req = req;
}
@@ -5356,17 +5437,17 @@ public ExecResp getResult() throws TException {
}
}
- public void dropEdgeIndex(DropEdgeIndexReq req, AsyncMethodCallback resultHandler574) throws TException {
+ public void dropEdgeIndex(DropEdgeIndexReq req, AsyncMethodCallback resultHandler580) throws TException {
checkReady();
- dropEdgeIndex_call method_call = new dropEdgeIndex_call(req, resultHandler574, this, ___protocolFactory, ___transport);
+ dropEdgeIndex_call method_call = new dropEdgeIndex_call(req, resultHandler580, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class dropEdgeIndex_call extends TAsyncMethodCall {
private DropEdgeIndexReq req;
- public dropEdgeIndex_call(DropEdgeIndexReq req, AsyncMethodCallback resultHandler575, TAsyncClient client571, TProtocolFactory protocolFactory572, TNonblockingTransport transport573) throws TException {
- super(client571, protocolFactory572, transport573, resultHandler575, false);
+ public dropEdgeIndex_call(DropEdgeIndexReq req, AsyncMethodCallback resultHandler581, TAsyncClient client577, TProtocolFactory protocolFactory578, TNonblockingTransport transport579) throws TException {
+ super(client577, protocolFactory578, transport579, resultHandler581, false);
this.req = req;
}
@@ -5388,17 +5469,17 @@ public ExecResp getResult() throws TException {
}
}
- public void getEdgeIndex(GetEdgeIndexReq req, AsyncMethodCallback resultHandler579) throws TException {
+ public void getEdgeIndex(GetEdgeIndexReq req, AsyncMethodCallback resultHandler585) throws TException {
checkReady();
- getEdgeIndex_call method_call = new getEdgeIndex_call(req, resultHandler579, this, ___protocolFactory, ___transport);
+ getEdgeIndex_call method_call = new getEdgeIndex_call(req, resultHandler585, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getEdgeIndex_call extends TAsyncMethodCall {
private GetEdgeIndexReq req;
- public getEdgeIndex_call(GetEdgeIndexReq req, AsyncMethodCallback resultHandler580, TAsyncClient client576, TProtocolFactory protocolFactory577, TNonblockingTransport transport578) throws TException {
- super(client576, protocolFactory577, transport578, resultHandler580, false);
+ public getEdgeIndex_call(GetEdgeIndexReq req, AsyncMethodCallback resultHandler586, TAsyncClient client582, TProtocolFactory protocolFactory583, TNonblockingTransport transport584) throws TException {
+ super(client582, protocolFactory583, transport584, resultHandler586, false);
this.req = req;
}
@@ -5420,17 +5501,17 @@ public GetEdgeIndexResp getResult() throws TException {
}
}
- public void listEdgeIndexes(ListEdgeIndexesReq req, AsyncMethodCallback resultHandler584) throws TException {
+ public void listEdgeIndexes(ListEdgeIndexesReq req, AsyncMethodCallback resultHandler590) throws TException {
checkReady();
- listEdgeIndexes_call method_call = new listEdgeIndexes_call(req, resultHandler584, this, ___protocolFactory, ___transport);
+ listEdgeIndexes_call method_call = new listEdgeIndexes_call(req, resultHandler590, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listEdgeIndexes_call extends TAsyncMethodCall {
private ListEdgeIndexesReq req;
- public listEdgeIndexes_call(ListEdgeIndexesReq req, AsyncMethodCallback resultHandler585, TAsyncClient client581, TProtocolFactory protocolFactory582, TNonblockingTransport transport583) throws TException {
- super(client581, protocolFactory582, transport583, resultHandler585, false);
+ public listEdgeIndexes_call(ListEdgeIndexesReq req, AsyncMethodCallback resultHandler591, TAsyncClient client587, TProtocolFactory protocolFactory588, TNonblockingTransport transport589) throws TException {
+ super(client587, protocolFactory588, transport589, resultHandler591, false);
this.req = req;
}
@@ -5452,17 +5533,17 @@ public ListEdgeIndexesResp getResult() throws TException {
}
}
- public void rebuildEdgeIndex(RebuildIndexReq req, AsyncMethodCallback resultHandler589) throws TException {
+ public void rebuildEdgeIndex(RebuildIndexReq req, AsyncMethodCallback resultHandler595) throws TException {
checkReady();
- rebuildEdgeIndex_call method_call = new rebuildEdgeIndex_call(req, resultHandler589, this, ___protocolFactory, ___transport);
+ rebuildEdgeIndex_call method_call = new rebuildEdgeIndex_call(req, resultHandler595, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class rebuildEdgeIndex_call extends TAsyncMethodCall {
private RebuildIndexReq req;
- public rebuildEdgeIndex_call(RebuildIndexReq req, AsyncMethodCallback resultHandler590, TAsyncClient client586, TProtocolFactory protocolFactory587, TNonblockingTransport transport588) throws TException {
- super(client586, protocolFactory587, transport588, resultHandler590, false);
+ public rebuildEdgeIndex_call(RebuildIndexReq req, AsyncMethodCallback resultHandler596, TAsyncClient client592, TProtocolFactory protocolFactory593, TNonblockingTransport transport594) throws TException {
+ super(client592, protocolFactory593, transport594, resultHandler596, false);
this.req = req;
}
@@ -5484,17 +5565,17 @@ public ExecResp getResult() throws TException {
}
}
- public void listEdgeIndexStatus(ListIndexStatusReq req, AsyncMethodCallback resultHandler594) throws TException {
+ public void listEdgeIndexStatus(ListIndexStatusReq req, AsyncMethodCallback resultHandler600) throws TException {
checkReady();
- listEdgeIndexStatus_call method_call = new listEdgeIndexStatus_call(req, resultHandler594, this, ___protocolFactory, ___transport);
+ listEdgeIndexStatus_call method_call = new listEdgeIndexStatus_call(req, resultHandler600, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listEdgeIndexStatus_call extends TAsyncMethodCall {
private ListIndexStatusReq req;
- public listEdgeIndexStatus_call(ListIndexStatusReq req, AsyncMethodCallback resultHandler595, TAsyncClient client591, TProtocolFactory protocolFactory592, TNonblockingTransport transport593) throws TException {
- super(client591, protocolFactory592, transport593, resultHandler595, false);
+ public listEdgeIndexStatus_call(ListIndexStatusReq req, AsyncMethodCallback resultHandler601, TAsyncClient client597, TProtocolFactory protocolFactory598, TNonblockingTransport transport599) throws TException {
+ super(client597, protocolFactory598, transport599, resultHandler601, false);
this.req = req;
}
@@ -5516,17 +5597,17 @@ public ListIndexStatusResp getResult() throws TException {
}
}
- public void createUser(CreateUserReq req, AsyncMethodCallback resultHandler599) throws TException {
+ public void createUser(CreateUserReq req, AsyncMethodCallback resultHandler605) throws TException {
checkReady();
- createUser_call method_call = new createUser_call(req, resultHandler599, this, ___protocolFactory, ___transport);
+ createUser_call method_call = new createUser_call(req, resultHandler605, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createUser_call extends TAsyncMethodCall {
private CreateUserReq req;
- public createUser_call(CreateUserReq req, AsyncMethodCallback resultHandler600, TAsyncClient client596, TProtocolFactory protocolFactory597, TNonblockingTransport transport598) throws TException {
- super(client596, protocolFactory597, transport598, resultHandler600, false);
+ public createUser_call(CreateUserReq req, AsyncMethodCallback resultHandler606, TAsyncClient client602, TProtocolFactory protocolFactory603, TNonblockingTransport transport604) throws TException {
+ super(client602, protocolFactory603, transport604, resultHandler606, false);
this.req = req;
}
@@ -5548,17 +5629,17 @@ public ExecResp getResult() throws TException {
}
}
- public void dropUser(DropUserReq req, AsyncMethodCallback resultHandler604) throws TException {
+ public void dropUser(DropUserReq req, AsyncMethodCallback resultHandler610) throws TException {
checkReady();
- dropUser_call method_call = new dropUser_call(req, resultHandler604, this, ___protocolFactory, ___transport);
+ dropUser_call method_call = new dropUser_call(req, resultHandler610, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class dropUser_call extends TAsyncMethodCall {
private DropUserReq req;
- public dropUser_call(DropUserReq req, AsyncMethodCallback resultHandler605, TAsyncClient client601, TProtocolFactory protocolFactory602, TNonblockingTransport transport603) throws TException {
- super(client601, protocolFactory602, transport603, resultHandler605, false);
+ public dropUser_call(DropUserReq req, AsyncMethodCallback resultHandler611, TAsyncClient client607, TProtocolFactory protocolFactory608, TNonblockingTransport transport609) throws TException {
+ super(client607, protocolFactory608, transport609, resultHandler611, false);
this.req = req;
}
@@ -5580,17 +5661,17 @@ public ExecResp getResult() throws TException {
}
}
- public void alterUser(AlterUserReq req, AsyncMethodCallback resultHandler609) throws TException {
+ public void alterUser(AlterUserReq req, AsyncMethodCallback resultHandler615) throws TException {
checkReady();
- alterUser_call method_call = new alterUser_call(req, resultHandler609, this, ___protocolFactory, ___transport);
+ alterUser_call method_call = new alterUser_call(req, resultHandler615, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class alterUser_call extends TAsyncMethodCall {
private AlterUserReq req;
- public alterUser_call(AlterUserReq req, AsyncMethodCallback resultHandler610, TAsyncClient client606, TProtocolFactory protocolFactory607, TNonblockingTransport transport608) throws TException {
- super(client606, protocolFactory607, transport608, resultHandler610, false);
+ public alterUser_call(AlterUserReq req, AsyncMethodCallback resultHandler616, TAsyncClient client612, TProtocolFactory protocolFactory613, TNonblockingTransport transport614) throws TException {
+ super(client612, protocolFactory613, transport614, resultHandler616, false);
this.req = req;
}
@@ -5612,17 +5693,17 @@ public ExecResp getResult() throws TException {
}
}
- public void grantRole(GrantRoleReq req, AsyncMethodCallback resultHandler614) throws TException {
+ public void grantRole(GrantRoleReq req, AsyncMethodCallback resultHandler620) throws TException {
checkReady();
- grantRole_call method_call = new grantRole_call(req, resultHandler614, this, ___protocolFactory, ___transport);
+ grantRole_call method_call = new grantRole_call(req, resultHandler620, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class grantRole_call extends TAsyncMethodCall {
private GrantRoleReq req;
- public grantRole_call(GrantRoleReq req, AsyncMethodCallback resultHandler615, TAsyncClient client611, TProtocolFactory protocolFactory612, TNonblockingTransport transport613) throws TException {
- super(client611, protocolFactory612, transport613, resultHandler615, false);
+ public grantRole_call(GrantRoleReq req, AsyncMethodCallback resultHandler621, TAsyncClient client617, TProtocolFactory protocolFactory618, TNonblockingTransport transport619) throws TException {
+ super(client617, protocolFactory618, transport619, resultHandler621, false);
this.req = req;
}
@@ -5644,17 +5725,17 @@ public ExecResp getResult() throws TException {
}
}
- public void revokeRole(RevokeRoleReq req, AsyncMethodCallback resultHandler619) throws TException {
+ public void revokeRole(RevokeRoleReq req, AsyncMethodCallback resultHandler625) throws TException {
checkReady();
- revokeRole_call method_call = new revokeRole_call(req, resultHandler619, this, ___protocolFactory, ___transport);
+ revokeRole_call method_call = new revokeRole_call(req, resultHandler625, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class revokeRole_call extends TAsyncMethodCall {
private RevokeRoleReq req;
- public revokeRole_call(RevokeRoleReq req, AsyncMethodCallback resultHandler620, TAsyncClient client616, TProtocolFactory protocolFactory617, TNonblockingTransport transport618) throws TException {
- super(client616, protocolFactory617, transport618, resultHandler620, false);
+ public revokeRole_call(RevokeRoleReq req, AsyncMethodCallback resultHandler626, TAsyncClient client622, TProtocolFactory protocolFactory623, TNonblockingTransport transport624) throws TException {
+ super(client622, protocolFactory623, transport624, resultHandler626, false);
this.req = req;
}
@@ -5676,17 +5757,17 @@ public ExecResp getResult() throws TException {
}
}
- public void listUsers(ListUsersReq req, AsyncMethodCallback resultHandler624) throws TException {
+ public void listUsers(ListUsersReq req, AsyncMethodCallback resultHandler630) throws TException {
checkReady();
- listUsers_call method_call = new listUsers_call(req, resultHandler624, this, ___protocolFactory, ___transport);
+ listUsers_call method_call = new listUsers_call(req, resultHandler630, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listUsers_call extends TAsyncMethodCall {
private ListUsersReq req;
- public listUsers_call(ListUsersReq req, AsyncMethodCallback resultHandler625, TAsyncClient client621, TProtocolFactory protocolFactory622, TNonblockingTransport transport623) throws TException {
- super(client621, protocolFactory622, transport623, resultHandler625, false);
+ public listUsers_call(ListUsersReq req, AsyncMethodCallback resultHandler631, TAsyncClient client627, TProtocolFactory protocolFactory628, TNonblockingTransport transport629) throws TException {
+ super(client627, protocolFactory628, transport629, resultHandler631, false);
this.req = req;
}
@@ -5708,17 +5789,17 @@ public ListUsersResp getResult() throws TException {
}
}
- public void listRoles(ListRolesReq req, AsyncMethodCallback resultHandler629) throws TException {
+ public void listRoles(ListRolesReq req, AsyncMethodCallback resultHandler635) throws TException {
checkReady();
- listRoles_call method_call = new listRoles_call(req, resultHandler629, this, ___protocolFactory, ___transport);
+ listRoles_call method_call = new listRoles_call(req, resultHandler635, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listRoles_call extends TAsyncMethodCall {
private ListRolesReq req;
- public listRoles_call(ListRolesReq req, AsyncMethodCallback resultHandler630, TAsyncClient client626, TProtocolFactory protocolFactory627, TNonblockingTransport transport628) throws TException {
- super(client626, protocolFactory627, transport628, resultHandler630, false);
+ public listRoles_call(ListRolesReq req, AsyncMethodCallback resultHandler636, TAsyncClient client632, TProtocolFactory protocolFactory633, TNonblockingTransport transport634) throws TException {
+ super(client632, protocolFactory633, transport634, resultHandler636, false);
this.req = req;
}
@@ -5740,17 +5821,17 @@ public ListRolesResp getResult() throws TException {
}
}
- public void getUserRoles(GetUserRolesReq req, AsyncMethodCallback resultHandler634) throws TException {
+ public void getUserRoles(GetUserRolesReq req, AsyncMethodCallback resultHandler640) throws TException {
checkReady();
- getUserRoles_call method_call = new getUserRoles_call(req, resultHandler634, this, ___protocolFactory, ___transport);
+ getUserRoles_call method_call = new getUserRoles_call(req, resultHandler640, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getUserRoles_call extends TAsyncMethodCall {
private GetUserRolesReq req;
- public getUserRoles_call(GetUserRolesReq req, AsyncMethodCallback resultHandler635, TAsyncClient client631, TProtocolFactory protocolFactory632, TNonblockingTransport transport633) throws TException {
- super(client631, protocolFactory632, transport633, resultHandler635, false);
+ public getUserRoles_call(GetUserRolesReq req, AsyncMethodCallback resultHandler641, TAsyncClient client637, TProtocolFactory protocolFactory638, TNonblockingTransport transport639) throws TException {
+ super(client637, protocolFactory638, transport639, resultHandler641, false);
this.req = req;
}
@@ -5772,17 +5853,17 @@ public ListRolesResp getResult() throws TException {
}
}
- public void changePassword(ChangePasswordReq req, AsyncMethodCallback resultHandler639) throws TException {
+ public void changePassword(ChangePasswordReq req, AsyncMethodCallback resultHandler645) throws TException {
checkReady();
- changePassword_call method_call = new changePassword_call(req, resultHandler639, this, ___protocolFactory, ___transport);
+ changePassword_call method_call = new changePassword_call(req, resultHandler645, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class changePassword_call extends TAsyncMethodCall {
private ChangePasswordReq req;
- public changePassword_call(ChangePasswordReq req, AsyncMethodCallback resultHandler640, TAsyncClient client636, TProtocolFactory protocolFactory637, TNonblockingTransport transport638) throws TException {
- super(client636, protocolFactory637, transport638, resultHandler640, false);
+ public changePassword_call(ChangePasswordReq req, AsyncMethodCallback resultHandler646, TAsyncClient client642, TProtocolFactory protocolFactory643, TNonblockingTransport transport644) throws TException {
+ super(client642, protocolFactory643, transport644, resultHandler646, false);
this.req = req;
}
@@ -5804,17 +5885,17 @@ public ExecResp getResult() throws TException {
}
}
- public void heartBeat(HBReq req, AsyncMethodCallback resultHandler644) throws TException {
+ public void heartBeat(HBReq req, AsyncMethodCallback resultHandler650) throws TException {
checkReady();
- heartBeat_call method_call = new heartBeat_call(req, resultHandler644, this, ___protocolFactory, ___transport);
+ heartBeat_call method_call = new heartBeat_call(req, resultHandler650, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class heartBeat_call extends TAsyncMethodCall {
private HBReq req;
- public heartBeat_call(HBReq req, AsyncMethodCallback resultHandler645, TAsyncClient client641, TProtocolFactory protocolFactory642, TNonblockingTransport transport643) throws TException {
- super(client641, protocolFactory642, transport643, resultHandler645, false);
+ public heartBeat_call(HBReq req, AsyncMethodCallback resultHandler651, TAsyncClient client647, TProtocolFactory protocolFactory648, TNonblockingTransport transport649) throws TException {
+ super(client647, protocolFactory648, transport649, resultHandler651, false);
this.req = req;
}
@@ -5836,17 +5917,17 @@ public HBResp getResult() throws TException {
}
}
- public void balance(BalanceReq req, AsyncMethodCallback resultHandler649) throws TException {
+ public void balance(BalanceReq req, AsyncMethodCallback resultHandler655) throws TException {
checkReady();
- balance_call method_call = new balance_call(req, resultHandler649, this, ___protocolFactory, ___transport);
+ balance_call method_call = new balance_call(req, resultHandler655, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class balance_call extends TAsyncMethodCall {
private BalanceReq req;
- public balance_call(BalanceReq req, AsyncMethodCallback resultHandler650, TAsyncClient client646, TProtocolFactory protocolFactory647, TNonblockingTransport transport648) throws TException {
- super(client646, protocolFactory647, transport648, resultHandler650, false);
+ public balance_call(BalanceReq req, AsyncMethodCallback resultHandler656, TAsyncClient client652, TProtocolFactory protocolFactory653, TNonblockingTransport transport654) throws TException {
+ super(client652, protocolFactory653, transport654, resultHandler656, false);
this.req = req;
}
@@ -5868,17 +5949,17 @@ public BalanceResp getResult() throws TException {
}
}
- public void leaderBalance(LeaderBalanceReq req, AsyncMethodCallback resultHandler654) throws TException {
+ public void leaderBalance(LeaderBalanceReq req, AsyncMethodCallback resultHandler660) throws TException {
checkReady();
- leaderBalance_call method_call = new leaderBalance_call(req, resultHandler654, this, ___protocolFactory, ___transport);
+ leaderBalance_call method_call = new leaderBalance_call(req, resultHandler660, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class leaderBalance_call extends TAsyncMethodCall {
private LeaderBalanceReq req;
- public leaderBalance_call(LeaderBalanceReq req, AsyncMethodCallback resultHandler655, TAsyncClient client651, TProtocolFactory protocolFactory652, TNonblockingTransport transport653) throws TException {
- super(client651, protocolFactory652, transport653, resultHandler655, false);
+ public leaderBalance_call(LeaderBalanceReq req, AsyncMethodCallback resultHandler661, TAsyncClient client657, TProtocolFactory protocolFactory658, TNonblockingTransport transport659) throws TException {
+ super(client657, protocolFactory658, transport659, resultHandler661, false);
this.req = req;
}
@@ -5900,17 +5981,17 @@ public ExecResp getResult() throws TException {
}
}
- public void regConfig(RegConfigReq req, AsyncMethodCallback resultHandler659) throws TException {
+ public void regConfig(RegConfigReq req, AsyncMethodCallback resultHandler665) throws TException {
checkReady();
- regConfig_call method_call = new regConfig_call(req, resultHandler659, this, ___protocolFactory, ___transport);
+ regConfig_call method_call = new regConfig_call(req, resultHandler665, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class regConfig_call extends TAsyncMethodCall {
private RegConfigReq req;
- public regConfig_call(RegConfigReq req, AsyncMethodCallback resultHandler660, TAsyncClient client656, TProtocolFactory protocolFactory657, TNonblockingTransport transport658) throws TException {
- super(client656, protocolFactory657, transport658, resultHandler660, false);
+ public regConfig_call(RegConfigReq req, AsyncMethodCallback resultHandler666, TAsyncClient client662, TProtocolFactory protocolFactory663, TNonblockingTransport transport664) throws TException {
+ super(client662, protocolFactory663, transport664, resultHandler666, false);
this.req = req;
}
@@ -5932,17 +6013,17 @@ public ExecResp getResult() throws TException {
}
}
- public void getConfig(GetConfigReq req, AsyncMethodCallback resultHandler664) throws TException {
+ public void getConfig(GetConfigReq req, AsyncMethodCallback resultHandler670) throws TException {
checkReady();
- getConfig_call method_call = new getConfig_call(req, resultHandler664, this, ___protocolFactory, ___transport);
+ getConfig_call method_call = new getConfig_call(req, resultHandler670, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getConfig_call extends TAsyncMethodCall {
private GetConfigReq req;
- public getConfig_call(GetConfigReq req, AsyncMethodCallback resultHandler665, TAsyncClient client661, TProtocolFactory protocolFactory662, TNonblockingTransport transport663) throws TException {
- super(client661, protocolFactory662, transport663, resultHandler665, false);
+ public getConfig_call(GetConfigReq req, AsyncMethodCallback resultHandler671, TAsyncClient client667, TProtocolFactory protocolFactory668, TNonblockingTransport transport669) throws TException {
+ super(client667, protocolFactory668, transport669, resultHandler671, false);
this.req = req;
}
@@ -5964,17 +6045,17 @@ public GetConfigResp getResult() throws TException {
}
}
- public void setConfig(SetConfigReq req, AsyncMethodCallback resultHandler669) throws TException {
+ public void setConfig(SetConfigReq req, AsyncMethodCallback resultHandler675) throws TException {
checkReady();
- setConfig_call method_call = new setConfig_call(req, resultHandler669, this, ___protocolFactory, ___transport);
+ setConfig_call method_call = new setConfig_call(req, resultHandler675, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class setConfig_call extends TAsyncMethodCall {
private SetConfigReq req;
- public setConfig_call(SetConfigReq req, AsyncMethodCallback resultHandler670, TAsyncClient client666, TProtocolFactory protocolFactory667, TNonblockingTransport transport668) throws TException {
- super(client666, protocolFactory667, transport668, resultHandler670, false);
+ public setConfig_call(SetConfigReq req, AsyncMethodCallback resultHandler676, TAsyncClient client672, TProtocolFactory protocolFactory673, TNonblockingTransport transport674) throws TException {
+ super(client672, protocolFactory673, transport674, resultHandler676, false);
this.req = req;
}
@@ -5996,17 +6077,17 @@ public ExecResp getResult() throws TException {
}
}
- public void listConfigs(ListConfigsReq req, AsyncMethodCallback resultHandler674) throws TException {
+ public void listConfigs(ListConfigsReq req, AsyncMethodCallback resultHandler680) throws TException {
checkReady();
- listConfigs_call method_call = new listConfigs_call(req, resultHandler674, this, ___protocolFactory, ___transport);
+ listConfigs_call method_call = new listConfigs_call(req, resultHandler680, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listConfigs_call extends TAsyncMethodCall {
private ListConfigsReq req;
- public listConfigs_call(ListConfigsReq req, AsyncMethodCallback resultHandler675, TAsyncClient client671, TProtocolFactory protocolFactory672, TNonblockingTransport transport673) throws TException {
- super(client671, protocolFactory672, transport673, resultHandler675, false);
+ public listConfigs_call(ListConfigsReq req, AsyncMethodCallback resultHandler681, TAsyncClient client677, TProtocolFactory protocolFactory678, TNonblockingTransport transport679) throws TException {
+ super(client677, protocolFactory678, transport679, resultHandler681, false);
this.req = req;
}
@@ -6028,17 +6109,17 @@ public ListConfigsResp getResult() throws TException {
}
}
- public void createSnapshot(CreateSnapshotReq req, AsyncMethodCallback resultHandler679) throws TException {
+ public void createSnapshot(CreateSnapshotReq req, AsyncMethodCallback resultHandler685) throws TException {
checkReady();
- createSnapshot_call method_call = new createSnapshot_call(req, resultHandler679, this, ___protocolFactory, ___transport);
+ createSnapshot_call method_call = new createSnapshot_call(req, resultHandler685, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createSnapshot_call extends TAsyncMethodCall {
private CreateSnapshotReq req;
- public createSnapshot_call(CreateSnapshotReq req, AsyncMethodCallback resultHandler680, TAsyncClient client676, TProtocolFactory protocolFactory677, TNonblockingTransport transport678) throws TException {
- super(client676, protocolFactory677, transport678, resultHandler680, false);
+ public createSnapshot_call(CreateSnapshotReq req, AsyncMethodCallback resultHandler686, TAsyncClient client682, TProtocolFactory protocolFactory683, TNonblockingTransport transport684) throws TException {
+ super(client682, protocolFactory683, transport684, resultHandler686, false);
this.req = req;
}
@@ -6060,17 +6141,17 @@ public ExecResp getResult() throws TException {
}
}
- public void dropSnapshot(DropSnapshotReq req, AsyncMethodCallback resultHandler684) throws TException {
+ public void dropSnapshot(DropSnapshotReq req, AsyncMethodCallback resultHandler690) throws TException {
checkReady();
- dropSnapshot_call method_call = new dropSnapshot_call(req, resultHandler684, this, ___protocolFactory, ___transport);
+ dropSnapshot_call method_call = new dropSnapshot_call(req, resultHandler690, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class dropSnapshot_call extends TAsyncMethodCall {
private DropSnapshotReq req;
- public dropSnapshot_call(DropSnapshotReq req, AsyncMethodCallback resultHandler685, TAsyncClient client681, TProtocolFactory protocolFactory682, TNonblockingTransport transport683) throws TException {
- super(client681, protocolFactory682, transport683, resultHandler685, false);
+ public dropSnapshot_call(DropSnapshotReq req, AsyncMethodCallback resultHandler691, TAsyncClient client687, TProtocolFactory protocolFactory688, TNonblockingTransport transport689) throws TException {
+ super(client687, protocolFactory688, transport689, resultHandler691, false);
this.req = req;
}
@@ -6092,17 +6173,17 @@ public ExecResp getResult() throws TException {
}
}
- public void listSnapshots(ListSnapshotsReq req, AsyncMethodCallback resultHandler689) throws TException {
+ public void listSnapshots(ListSnapshotsReq req, AsyncMethodCallback resultHandler695) throws TException {
checkReady();
- listSnapshots_call method_call = new listSnapshots_call(req, resultHandler689, this, ___protocolFactory, ___transport);
+ listSnapshots_call method_call = new listSnapshots_call(req, resultHandler695, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listSnapshots_call extends TAsyncMethodCall {
private ListSnapshotsReq req;
- public listSnapshots_call(ListSnapshotsReq req, AsyncMethodCallback resultHandler690, TAsyncClient client686, TProtocolFactory protocolFactory687, TNonblockingTransport transport688) throws TException {
- super(client686, protocolFactory687, transport688, resultHandler690, false);
+ public listSnapshots_call(ListSnapshotsReq req, AsyncMethodCallback resultHandler696, TAsyncClient client692, TProtocolFactory protocolFactory693, TNonblockingTransport transport694) throws TException {
+ super(client692, protocolFactory693, transport694, resultHandler696, false);
this.req = req;
}
@@ -6124,17 +6205,17 @@ public ListSnapshotsResp getResult() throws TException {
}
}
- public void runAdminJob(AdminJobReq req, AsyncMethodCallback resultHandler694) throws TException {
+ public void runAdminJob(AdminJobReq req, AsyncMethodCallback resultHandler700) throws TException {
checkReady();
- runAdminJob_call method_call = new runAdminJob_call(req, resultHandler694, this, ___protocolFactory, ___transport);
+ runAdminJob_call method_call = new runAdminJob_call(req, resultHandler700, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class runAdminJob_call extends TAsyncMethodCall {
private AdminJobReq req;
- public runAdminJob_call(AdminJobReq req, AsyncMethodCallback resultHandler695, TAsyncClient client691, TProtocolFactory protocolFactory692, TNonblockingTransport transport693) throws TException {
- super(client691, protocolFactory692, transport693, resultHandler695, false);
+ public runAdminJob_call(AdminJobReq req, AsyncMethodCallback resultHandler701, TAsyncClient client697, TProtocolFactory protocolFactory698, TNonblockingTransport transport699) throws TException {
+ super(client697, protocolFactory698, transport699, resultHandler701, false);
this.req = req;
}
@@ -6156,17 +6237,17 @@ public AdminJobResp getResult() throws TException {
}
}
- public void addZone(AddZoneReq req, AsyncMethodCallback resultHandler699) throws TException {
+ public void addZone(AddZoneReq req, AsyncMethodCallback resultHandler705) throws TException {
checkReady();
- addZone_call method_call = new addZone_call(req, resultHandler699, this, ___protocolFactory, ___transport);
+ addZone_call method_call = new addZone_call(req, resultHandler705, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class addZone_call extends TAsyncMethodCall {
private AddZoneReq req;
- public addZone_call(AddZoneReq req, AsyncMethodCallback resultHandler700, TAsyncClient client696, TProtocolFactory protocolFactory697, TNonblockingTransport transport698) throws TException {
- super(client696, protocolFactory697, transport698, resultHandler700, false);
+ public addZone_call(AddZoneReq req, AsyncMethodCallback resultHandler706, TAsyncClient client702, TProtocolFactory protocolFactory703, TNonblockingTransport transport704) throws TException {
+ super(client702, protocolFactory703, transport704, resultHandler706, false);
this.req = req;
}
@@ -6188,17 +6269,17 @@ public ExecResp getResult() throws TException {
}
}
- public void dropZone(DropZoneReq req, AsyncMethodCallback resultHandler704) throws TException {
+ public void dropZone(DropZoneReq req, AsyncMethodCallback resultHandler710) throws TException {
checkReady();
- dropZone_call method_call = new dropZone_call(req, resultHandler704, this, ___protocolFactory, ___transport);
+ dropZone_call method_call = new dropZone_call(req, resultHandler710, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class dropZone_call extends TAsyncMethodCall {
private DropZoneReq req;
- public dropZone_call(DropZoneReq req, AsyncMethodCallback resultHandler705, TAsyncClient client701, TProtocolFactory protocolFactory702, TNonblockingTransport transport703) throws TException {
- super(client701, protocolFactory702, transport703, resultHandler705, false);
+ public dropZone_call(DropZoneReq req, AsyncMethodCallback resultHandler711, TAsyncClient client707, TProtocolFactory protocolFactory708, TNonblockingTransport transport709) throws TException {
+ super(client707, protocolFactory708, transport709, resultHandler711, false);
this.req = req;
}
@@ -6220,17 +6301,17 @@ public ExecResp getResult() throws TException {
}
}
- public void addHostIntoZone(AddHostIntoZoneReq req, AsyncMethodCallback resultHandler709) throws TException {
+ public void addHostIntoZone(AddHostIntoZoneReq req, AsyncMethodCallback resultHandler715) throws TException {
checkReady();
- addHostIntoZone_call method_call = new addHostIntoZone_call(req, resultHandler709, this, ___protocolFactory, ___transport);
+ addHostIntoZone_call method_call = new addHostIntoZone_call(req, resultHandler715, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class addHostIntoZone_call extends TAsyncMethodCall {
private AddHostIntoZoneReq req;
- public addHostIntoZone_call(AddHostIntoZoneReq req, AsyncMethodCallback resultHandler710, TAsyncClient client706, TProtocolFactory protocolFactory707, TNonblockingTransport transport708) throws TException {
- super(client706, protocolFactory707, transport708, resultHandler710, false);
+ public addHostIntoZone_call(AddHostIntoZoneReq req, AsyncMethodCallback resultHandler716, TAsyncClient client712, TProtocolFactory protocolFactory713, TNonblockingTransport transport714) throws TException {
+ super(client712, protocolFactory713, transport714, resultHandler716, false);
this.req = req;
}
@@ -6252,17 +6333,17 @@ public ExecResp getResult() throws TException {
}
}
- public void dropHostFromZone(DropHostFromZoneReq req, AsyncMethodCallback resultHandler714) throws TException {
+ public void dropHostFromZone(DropHostFromZoneReq req, AsyncMethodCallback resultHandler720) throws TException {
checkReady();
- dropHostFromZone_call method_call = new dropHostFromZone_call(req, resultHandler714, this, ___protocolFactory, ___transport);
+ dropHostFromZone_call method_call = new dropHostFromZone_call(req, resultHandler720, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class dropHostFromZone_call extends TAsyncMethodCall {
private DropHostFromZoneReq req;
- public dropHostFromZone_call(DropHostFromZoneReq req, AsyncMethodCallback resultHandler715, TAsyncClient client711, TProtocolFactory protocolFactory712, TNonblockingTransport transport713) throws TException {
- super(client711, protocolFactory712, transport713, resultHandler715, false);
+ public dropHostFromZone_call(DropHostFromZoneReq req, AsyncMethodCallback resultHandler721, TAsyncClient client717, TProtocolFactory protocolFactory718, TNonblockingTransport transport719) throws TException {
+ super(client717, protocolFactory718, transport719, resultHandler721, false);
this.req = req;
}
@@ -6284,17 +6365,17 @@ public ExecResp getResult() throws TException {
}
}
- public void getZone(GetZoneReq req, AsyncMethodCallback resultHandler719) throws TException {
+ public void getZone(GetZoneReq req, AsyncMethodCallback resultHandler725) throws TException {
checkReady();
- getZone_call method_call = new getZone_call(req, resultHandler719, this, ___protocolFactory, ___transport);
+ getZone_call method_call = new getZone_call(req, resultHandler725, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getZone_call extends TAsyncMethodCall {
private GetZoneReq req;
- public getZone_call(GetZoneReq req, AsyncMethodCallback resultHandler720, TAsyncClient client716, TProtocolFactory protocolFactory717, TNonblockingTransport transport718) throws TException {
- super(client716, protocolFactory717, transport718, resultHandler720, false);
+ public getZone_call(GetZoneReq req, AsyncMethodCallback resultHandler726, TAsyncClient client722, TProtocolFactory protocolFactory723, TNonblockingTransport transport724) throws TException {
+ super(client722, protocolFactory723, transport724, resultHandler726, false);
this.req = req;
}
@@ -6316,17 +6397,17 @@ public GetZoneResp getResult() throws TException {
}
}
- public void listZones(ListZonesReq req, AsyncMethodCallback resultHandler724) throws TException {
+ public void listZones(ListZonesReq req, AsyncMethodCallback resultHandler730) throws TException {
checkReady();
- listZones_call method_call = new listZones_call(req, resultHandler724, this, ___protocolFactory, ___transport);
+ listZones_call method_call = new listZones_call(req, resultHandler730, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listZones_call extends TAsyncMethodCall {
private ListZonesReq req;
- public listZones_call(ListZonesReq req, AsyncMethodCallback resultHandler725, TAsyncClient client721, TProtocolFactory protocolFactory722, TNonblockingTransport transport723) throws TException {
- super(client721, protocolFactory722, transport723, resultHandler725, false);
+ public listZones_call(ListZonesReq req, AsyncMethodCallback resultHandler731, TAsyncClient client727, TProtocolFactory protocolFactory728, TNonblockingTransport transport729) throws TException {
+ super(client727, protocolFactory728, transport729, resultHandler731, false);
this.req = req;
}
@@ -6348,17 +6429,17 @@ public ListZonesResp getResult() throws TException {
}
}
- public void addGroup(AddGroupReq req, AsyncMethodCallback resultHandler729) throws TException {
+ public void addGroup(AddGroupReq req, AsyncMethodCallback resultHandler735) throws TException {
checkReady();
- addGroup_call method_call = new addGroup_call(req, resultHandler729, this, ___protocolFactory, ___transport);
+ addGroup_call method_call = new addGroup_call(req, resultHandler735, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class addGroup_call extends TAsyncMethodCall {
private AddGroupReq req;
- public addGroup_call(AddGroupReq req, AsyncMethodCallback resultHandler730, TAsyncClient client726, TProtocolFactory protocolFactory727, TNonblockingTransport transport728) throws TException {
- super(client726, protocolFactory727, transport728, resultHandler730, false);
+ public addGroup_call(AddGroupReq req, AsyncMethodCallback resultHandler736, TAsyncClient client732, TProtocolFactory protocolFactory733, TNonblockingTransport transport734) throws TException {
+ super(client732, protocolFactory733, transport734, resultHandler736, false);
this.req = req;
}
@@ -6380,17 +6461,17 @@ public ExecResp getResult() throws TException {
}
}
- public void dropGroup(DropGroupReq req, AsyncMethodCallback resultHandler734) throws TException {
+ public void dropGroup(DropGroupReq req, AsyncMethodCallback resultHandler740) throws TException {
checkReady();
- dropGroup_call method_call = new dropGroup_call(req, resultHandler734, this, ___protocolFactory, ___transport);
+ dropGroup_call method_call = new dropGroup_call(req, resultHandler740, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class dropGroup_call extends TAsyncMethodCall {
private DropGroupReq req;
- public dropGroup_call(DropGroupReq req, AsyncMethodCallback resultHandler735, TAsyncClient client731, TProtocolFactory protocolFactory732, TNonblockingTransport transport733) throws TException {
- super(client731, protocolFactory732, transport733, resultHandler735, false);
+ public dropGroup_call(DropGroupReq req, AsyncMethodCallback resultHandler741, TAsyncClient client737, TProtocolFactory protocolFactory738, TNonblockingTransport transport739) throws TException {
+ super(client737, protocolFactory738, transport739, resultHandler741, false);
this.req = req;
}
@@ -6412,17 +6493,17 @@ public ExecResp getResult() throws TException {
}
}
- public void addZoneIntoGroup(AddZoneIntoGroupReq req, AsyncMethodCallback resultHandler739) throws TException {
+ public void addZoneIntoGroup(AddZoneIntoGroupReq req, AsyncMethodCallback resultHandler745) throws TException {
checkReady();
- addZoneIntoGroup_call method_call = new addZoneIntoGroup_call(req, resultHandler739, this, ___protocolFactory, ___transport);
+ addZoneIntoGroup_call method_call = new addZoneIntoGroup_call(req, resultHandler745, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class addZoneIntoGroup_call extends TAsyncMethodCall {
private AddZoneIntoGroupReq req;
- public addZoneIntoGroup_call(AddZoneIntoGroupReq req, AsyncMethodCallback resultHandler740, TAsyncClient client736, TProtocolFactory protocolFactory737, TNonblockingTransport transport738) throws TException {
- super(client736, protocolFactory737, transport738, resultHandler740, false);
+ public addZoneIntoGroup_call(AddZoneIntoGroupReq req, AsyncMethodCallback resultHandler746, TAsyncClient client742, TProtocolFactory protocolFactory743, TNonblockingTransport transport744) throws TException {
+ super(client742, protocolFactory743, transport744, resultHandler746, false);
this.req = req;
}
@@ -6444,17 +6525,17 @@ public ExecResp getResult() throws TException {
}
}
- public void dropZoneFromGroup(DropZoneFromGroupReq req, AsyncMethodCallback resultHandler744) throws TException {
+ public void dropZoneFromGroup(DropZoneFromGroupReq req, AsyncMethodCallback resultHandler750) throws TException {
checkReady();
- dropZoneFromGroup_call method_call = new dropZoneFromGroup_call(req, resultHandler744, this, ___protocolFactory, ___transport);
+ dropZoneFromGroup_call method_call = new dropZoneFromGroup_call(req, resultHandler750, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class dropZoneFromGroup_call extends TAsyncMethodCall {
private DropZoneFromGroupReq req;
- public dropZoneFromGroup_call(DropZoneFromGroupReq req, AsyncMethodCallback resultHandler745, TAsyncClient client741, TProtocolFactory protocolFactory742, TNonblockingTransport transport743) throws TException {
- super(client741, protocolFactory742, transport743, resultHandler745, false);
+ public dropZoneFromGroup_call(DropZoneFromGroupReq req, AsyncMethodCallback resultHandler751, TAsyncClient client747, TProtocolFactory protocolFactory748, TNonblockingTransport transport749) throws TException {
+ super(client747, protocolFactory748, transport749, resultHandler751, false);
this.req = req;
}
@@ -6476,17 +6557,17 @@ public ExecResp getResult() throws TException {
}
}
- public void getGroup(GetGroupReq req, AsyncMethodCallback resultHandler749) throws TException {
+ public void getGroup(GetGroupReq req, AsyncMethodCallback resultHandler755) throws TException {
checkReady();
- getGroup_call method_call = new getGroup_call(req, resultHandler749, this, ___protocolFactory, ___transport);
+ getGroup_call method_call = new getGroup_call(req, resultHandler755, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getGroup_call extends TAsyncMethodCall {
private GetGroupReq req;
- public getGroup_call(GetGroupReq req, AsyncMethodCallback resultHandler750, TAsyncClient client746, TProtocolFactory protocolFactory747, TNonblockingTransport transport748) throws TException {
- super(client746, protocolFactory747, transport748, resultHandler750, false);
+ public getGroup_call(GetGroupReq req, AsyncMethodCallback resultHandler756, TAsyncClient client752, TProtocolFactory protocolFactory753, TNonblockingTransport transport754) throws TException {
+ super(client752, protocolFactory753, transport754, resultHandler756, false);
this.req = req;
}
@@ -6508,17 +6589,17 @@ public GetGroupResp getResult() throws TException {
}
}
- public void listGroups(ListGroupsReq req, AsyncMethodCallback resultHandler754) throws TException {
+ public void listGroups(ListGroupsReq req, AsyncMethodCallback resultHandler760) throws TException {
checkReady();
- listGroups_call method_call = new listGroups_call(req, resultHandler754, this, ___protocolFactory, ___transport);
+ listGroups_call method_call = new listGroups_call(req, resultHandler760, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listGroups_call extends TAsyncMethodCall {
private ListGroupsReq req;
- public listGroups_call(ListGroupsReq req, AsyncMethodCallback resultHandler755, TAsyncClient client751, TProtocolFactory protocolFactory752, TNonblockingTransport transport753) throws TException {
- super(client751, protocolFactory752, transport753, resultHandler755, false);
+ public listGroups_call(ListGroupsReq req, AsyncMethodCallback resultHandler761, TAsyncClient client757, TProtocolFactory protocolFactory758, TNonblockingTransport transport759) throws TException {
+ super(client757, protocolFactory758, transport759, resultHandler761, false);
this.req = req;
}
@@ -6540,17 +6621,17 @@ public ListGroupsResp getResult() throws TException {
}
}
- public void createBackup(CreateBackupReq req, AsyncMethodCallback resultHandler759) throws TException {
+ public void createBackup(CreateBackupReq req, AsyncMethodCallback resultHandler765) throws TException {
checkReady();
- createBackup_call method_call = new createBackup_call(req, resultHandler759, this, ___protocolFactory, ___transport);
+ createBackup_call method_call = new createBackup_call(req, resultHandler765, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createBackup_call extends TAsyncMethodCall {
private CreateBackupReq req;
- public createBackup_call(CreateBackupReq req, AsyncMethodCallback resultHandler760, TAsyncClient client756, TProtocolFactory protocolFactory757, TNonblockingTransport transport758) throws TException {
- super(client756, protocolFactory757, transport758, resultHandler760, false);
+ public createBackup_call(CreateBackupReq req, AsyncMethodCallback resultHandler766, TAsyncClient client762, TProtocolFactory protocolFactory763, TNonblockingTransport transport764) throws TException {
+ super(client762, protocolFactory763, transport764, resultHandler766, false);
this.req = req;
}
@@ -6572,17 +6653,17 @@ public CreateBackupResp getResult() throws TException {
}
}
- public void restoreMeta(RestoreMetaReq req, AsyncMethodCallback resultHandler764) throws TException {
+ public void restoreMeta(RestoreMetaReq req, AsyncMethodCallback resultHandler770) throws TException {
checkReady();
- restoreMeta_call method_call = new restoreMeta_call(req, resultHandler764, this, ___protocolFactory, ___transport);
+ restoreMeta_call method_call = new restoreMeta_call(req, resultHandler770, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class restoreMeta_call extends TAsyncMethodCall {
private RestoreMetaReq req;
- public restoreMeta_call(RestoreMetaReq req, AsyncMethodCallback resultHandler765, TAsyncClient client761, TProtocolFactory protocolFactory762, TNonblockingTransport transport763) throws TException {
- super(client761, protocolFactory762, transport763, resultHandler765, false);
+ public restoreMeta_call(RestoreMetaReq req, AsyncMethodCallback resultHandler771, TAsyncClient client767, TProtocolFactory protocolFactory768, TNonblockingTransport transport769) throws TException {
+ super(client767, protocolFactory768, transport769, resultHandler771, false);
this.req = req;
}
@@ -6604,17 +6685,17 @@ public ExecResp getResult() throws TException {
}
}
- public void addListener(AddListenerReq req, AsyncMethodCallback resultHandler769) throws TException {
+ public void addListener(AddListenerReq req, AsyncMethodCallback resultHandler775) throws TException {
checkReady();
- addListener_call method_call = new addListener_call(req, resultHandler769, this, ___protocolFactory, ___transport);
+ addListener_call method_call = new addListener_call(req, resultHandler775, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class addListener_call extends TAsyncMethodCall {
private AddListenerReq req;
- public addListener_call(AddListenerReq req, AsyncMethodCallback resultHandler770, TAsyncClient client766, TProtocolFactory protocolFactory767, TNonblockingTransport transport768) throws TException {
- super(client766, protocolFactory767, transport768, resultHandler770, false);
+ public addListener_call(AddListenerReq req, AsyncMethodCallback resultHandler776, TAsyncClient client772, TProtocolFactory protocolFactory773, TNonblockingTransport transport774) throws TException {
+ super(client772, protocolFactory773, transport774, resultHandler776, false);
this.req = req;
}
@@ -6636,17 +6717,17 @@ public ExecResp getResult() throws TException {
}
}
- public void removeListener(RemoveListenerReq req, AsyncMethodCallback resultHandler774) throws TException {
+ public void removeListener(RemoveListenerReq req, AsyncMethodCallback resultHandler780) throws TException {
checkReady();
- removeListener_call method_call = new removeListener_call(req, resultHandler774, this, ___protocolFactory, ___transport);
+ removeListener_call method_call = new removeListener_call(req, resultHandler780, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class removeListener_call extends TAsyncMethodCall {
private RemoveListenerReq req;
- public removeListener_call(RemoveListenerReq req, AsyncMethodCallback resultHandler775, TAsyncClient client771, TProtocolFactory protocolFactory772, TNonblockingTransport transport773) throws TException {
- super(client771, protocolFactory772, transport773, resultHandler775, false);
+ public removeListener_call(RemoveListenerReq req, AsyncMethodCallback resultHandler781, TAsyncClient client777, TProtocolFactory protocolFactory778, TNonblockingTransport transport779) throws TException {
+ super(client777, protocolFactory778, transport779, resultHandler781, false);
this.req = req;
}
@@ -6668,17 +6749,17 @@ public ExecResp getResult() throws TException {
}
}
- public void listListener(ListListenerReq req, AsyncMethodCallback resultHandler779) throws TException {
+ public void listListener(ListListenerReq req, AsyncMethodCallback resultHandler785) throws TException {
checkReady();
- listListener_call method_call = new listListener_call(req, resultHandler779, this, ___protocolFactory, ___transport);
+ listListener_call method_call = new listListener_call(req, resultHandler785, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listListener_call extends TAsyncMethodCall {
private ListListenerReq req;
- public listListener_call(ListListenerReq req, AsyncMethodCallback resultHandler780, TAsyncClient client776, TProtocolFactory protocolFactory777, TNonblockingTransport transport778) throws TException {
- super(client776, protocolFactory777, transport778, resultHandler780, false);
+ public listListener_call(ListListenerReq req, AsyncMethodCallback resultHandler786, TAsyncClient client782, TProtocolFactory protocolFactory783, TNonblockingTransport transport784) throws TException {
+ super(client782, protocolFactory783, transport784, resultHandler786, false);
this.req = req;
}
@@ -6700,49 +6781,49 @@ public ListListenerResp getResult() throws TException {
}
}
- public void getStatis(GetStatisReq req, AsyncMethodCallback resultHandler784) throws TException {
+ public void getStats(GetStatsReq req, AsyncMethodCallback resultHandler790) throws TException {
checkReady();
- getStatis_call method_call = new getStatis_call(req, resultHandler784, this, ___protocolFactory, ___transport);
+ getStats_call method_call = new getStats_call(req, resultHandler790, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getStatis_call extends TAsyncMethodCall {
- private GetStatisReq req;
- public getStatis_call(GetStatisReq req, AsyncMethodCallback resultHandler785, TAsyncClient client781, TProtocolFactory protocolFactory782, TNonblockingTransport transport783) throws TException {
- super(client781, protocolFactory782, transport783, resultHandler785, false);
+ public static class getStats_call extends TAsyncMethodCall {
+ private GetStatsReq req;
+ public getStats_call(GetStatsReq req, AsyncMethodCallback resultHandler791, TAsyncClient client787, TProtocolFactory protocolFactory788, TNonblockingTransport transport789) throws TException {
+ super(client787, protocolFactory788, transport789, resultHandler791, false);
this.req = req;
}
public void write_args(TProtocol prot) throws TException {
- prot.writeMessageBegin(new TMessage("getStatis", TMessageType.CALL, 0));
- getStatis_args args = new getStatis_args();
+ prot.writeMessageBegin(new TMessage("getStats", TMessageType.CALL, 0));
+ getStats_args args = new getStats_args();
args.setReq(req);
args.write(prot);
prot.writeMessageEnd();
}
- public GetStatisResp getResult() throws TException {
+ public GetStatsResp getResult() throws TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_getStatis();
+ return (new Client(prot)).recv_getStats();
}
}
- public void signInFTService(SignInFTServiceReq req, AsyncMethodCallback resultHandler789) throws TException {
+ public void signInFTService(SignInFTServiceReq req, AsyncMethodCallback resultHandler795) throws TException {
checkReady();
- signInFTService_call method_call = new signInFTService_call(req, resultHandler789, this, ___protocolFactory, ___transport);
+ signInFTService_call method_call = new signInFTService_call(req, resultHandler795, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class signInFTService_call extends TAsyncMethodCall {
private SignInFTServiceReq req;
- public signInFTService_call(SignInFTServiceReq req, AsyncMethodCallback resultHandler790, TAsyncClient client786, TProtocolFactory protocolFactory787, TNonblockingTransport transport788) throws TException {
- super(client786, protocolFactory787, transport788, resultHandler790, false);
+ public signInFTService_call(SignInFTServiceReq req, AsyncMethodCallback resultHandler796, TAsyncClient client792, TProtocolFactory protocolFactory793, TNonblockingTransport transport794) throws TException {
+ super(client792, protocolFactory793, transport794, resultHandler796, false);
this.req = req;
}
@@ -6764,17 +6845,17 @@ public ExecResp getResult() throws TException {
}
}
- public void signOutFTService(SignOutFTServiceReq req, AsyncMethodCallback resultHandler794) throws TException {
+ public void signOutFTService(SignOutFTServiceReq req, AsyncMethodCallback resultHandler800) throws TException {
checkReady();
- signOutFTService_call method_call = new signOutFTService_call(req, resultHandler794, this, ___protocolFactory, ___transport);
+ signOutFTService_call method_call = new signOutFTService_call(req, resultHandler800, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class signOutFTService_call extends TAsyncMethodCall {
private SignOutFTServiceReq req;
- public signOutFTService_call(SignOutFTServiceReq req, AsyncMethodCallback resultHandler795, TAsyncClient client791, TProtocolFactory protocolFactory792, TNonblockingTransport transport793) throws TException {
- super(client791, protocolFactory792, transport793, resultHandler795, false);
+ public signOutFTService_call(SignOutFTServiceReq req, AsyncMethodCallback resultHandler801, TAsyncClient client797, TProtocolFactory protocolFactory798, TNonblockingTransport transport799) throws TException {
+ super(client797, protocolFactory798, transport799, resultHandler801, false);
this.req = req;
}
@@ -6796,17 +6877,17 @@ public ExecResp getResult() throws TException {
}
}
- public void listFTClients(ListFTClientsReq req, AsyncMethodCallback resultHandler799) throws TException {
+ public void listFTClients(ListFTClientsReq req, AsyncMethodCallback resultHandler805) throws TException {
checkReady();
- listFTClients_call method_call = new listFTClients_call(req, resultHandler799, this, ___protocolFactory, ___transport);
+ listFTClients_call method_call = new listFTClients_call(req, resultHandler805, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listFTClients_call extends TAsyncMethodCall {
private ListFTClientsReq req;
- public listFTClients_call(ListFTClientsReq req, AsyncMethodCallback resultHandler800, TAsyncClient client796, TProtocolFactory protocolFactory797, TNonblockingTransport transport798) throws TException {
- super(client796, protocolFactory797, transport798, resultHandler800, false);
+ public listFTClients_call(ListFTClientsReq req, AsyncMethodCallback resultHandler806, TAsyncClient client802, TProtocolFactory protocolFactory803, TNonblockingTransport transport804) throws TException {
+ super(client802, protocolFactory803, transport804, resultHandler806, false);
this.req = req;
}
@@ -6828,17 +6909,17 @@ public ListFTClientsResp getResult() throws TException {
}
}
- public void createFTIndex(CreateFTIndexReq req, AsyncMethodCallback resultHandler804) throws TException {
+ public void createFTIndex(CreateFTIndexReq req, AsyncMethodCallback resultHandler810) throws TException {
checkReady();
- createFTIndex_call method_call = new createFTIndex_call(req, resultHandler804, this, ___protocolFactory, ___transport);
+ createFTIndex_call method_call = new createFTIndex_call(req, resultHandler810, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createFTIndex_call extends TAsyncMethodCall {
private CreateFTIndexReq req;
- public createFTIndex_call(CreateFTIndexReq req, AsyncMethodCallback resultHandler805, TAsyncClient client801, TProtocolFactory protocolFactory802, TNonblockingTransport transport803) throws TException {
- super(client801, protocolFactory802, transport803, resultHandler805, false);
+ public createFTIndex_call(CreateFTIndexReq req, AsyncMethodCallback resultHandler811, TAsyncClient client807, TProtocolFactory protocolFactory808, TNonblockingTransport transport809) throws TException {
+ super(client807, protocolFactory808, transport809, resultHandler811, false);
this.req = req;
}
@@ -6860,17 +6941,17 @@ public ExecResp getResult() throws TException {
}
}
- public void dropFTIndex(DropFTIndexReq req, AsyncMethodCallback resultHandler809) throws TException {
+ public void dropFTIndex(DropFTIndexReq req, AsyncMethodCallback resultHandler815) throws TException {
checkReady();
- dropFTIndex_call method_call = new dropFTIndex_call(req, resultHandler809, this, ___protocolFactory, ___transport);
+ dropFTIndex_call method_call = new dropFTIndex_call(req, resultHandler815, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class dropFTIndex_call extends TAsyncMethodCall {
private DropFTIndexReq req;
- public dropFTIndex_call(DropFTIndexReq req, AsyncMethodCallback resultHandler810, TAsyncClient client806, TProtocolFactory protocolFactory807, TNonblockingTransport transport808) throws TException {
- super(client806, protocolFactory807, transport808, resultHandler810, false);
+ public dropFTIndex_call(DropFTIndexReq req, AsyncMethodCallback resultHandler816, TAsyncClient client812, TProtocolFactory protocolFactory813, TNonblockingTransport transport814) throws TException {
+ super(client812, protocolFactory813, transport814, resultHandler816, false);
this.req = req;
}
@@ -6892,17 +6973,17 @@ public ExecResp getResult() throws TException {
}
}
- public void listFTIndexes(ListFTIndexesReq req, AsyncMethodCallback resultHandler814) throws TException {
+ public void listFTIndexes(ListFTIndexesReq req, AsyncMethodCallback resultHandler820) throws TException {
checkReady();
- listFTIndexes_call method_call = new listFTIndexes_call(req, resultHandler814, this, ___protocolFactory, ___transport);
+ listFTIndexes_call method_call = new listFTIndexes_call(req, resultHandler820, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listFTIndexes_call extends TAsyncMethodCall {
private ListFTIndexesReq req;
- public listFTIndexes_call(ListFTIndexesReq req, AsyncMethodCallback resultHandler815, TAsyncClient client811, TProtocolFactory protocolFactory812, TNonblockingTransport transport813) throws TException {
- super(client811, protocolFactory812, transport813, resultHandler815, false);
+ public listFTIndexes_call(ListFTIndexesReq req, AsyncMethodCallback resultHandler821, TAsyncClient client817, TProtocolFactory protocolFactory818, TNonblockingTransport transport819) throws TException {
+ super(client817, protocolFactory818, transport819, resultHandler821, false);
this.req = req;
}
@@ -6924,17 +7005,17 @@ public ListFTIndexesResp getResult() throws TException {
}
}
- public void createSession(CreateSessionReq req, AsyncMethodCallback resultHandler819) throws TException {
+ public void createSession(CreateSessionReq req, AsyncMethodCallback resultHandler825) throws TException {
checkReady();
- createSession_call method_call = new createSession_call(req, resultHandler819, this, ___protocolFactory, ___transport);
+ createSession_call method_call = new createSession_call(req, resultHandler825, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createSession_call extends TAsyncMethodCall {
private CreateSessionReq req;
- public createSession_call(CreateSessionReq req, AsyncMethodCallback resultHandler820, TAsyncClient client816, TProtocolFactory protocolFactory817, TNonblockingTransport transport818) throws TException {
- super(client816, protocolFactory817, transport818, resultHandler820, false);
+ public createSession_call(CreateSessionReq req, AsyncMethodCallback resultHandler826, TAsyncClient client822, TProtocolFactory protocolFactory823, TNonblockingTransport transport824) throws TException {
+ super(client822, protocolFactory823, transport824, resultHandler826, false);
this.req = req;
}
@@ -6956,17 +7037,17 @@ public CreateSessionResp getResult() throws TException {
}
}
- public void updateSessions(UpdateSessionsReq req, AsyncMethodCallback resultHandler824) throws TException {
+ public void updateSessions(UpdateSessionsReq req, AsyncMethodCallback resultHandler830) throws TException {
checkReady();
- updateSessions_call method_call = new updateSessions_call(req, resultHandler824, this, ___protocolFactory, ___transport);
+ updateSessions_call method_call = new updateSessions_call(req, resultHandler830, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class updateSessions_call extends TAsyncMethodCall {
private UpdateSessionsReq req;
- public updateSessions_call(UpdateSessionsReq req, AsyncMethodCallback resultHandler825, TAsyncClient client821, TProtocolFactory protocolFactory822, TNonblockingTransport transport823) throws TException {
- super(client821, protocolFactory822, transport823, resultHandler825, false);
+ public updateSessions_call(UpdateSessionsReq req, AsyncMethodCallback resultHandler831, TAsyncClient client827, TProtocolFactory protocolFactory828, TNonblockingTransport transport829) throws TException {
+ super(client827, protocolFactory828, transport829, resultHandler831, false);
this.req = req;
}
@@ -6988,17 +7069,17 @@ public UpdateSessionsResp getResult() throws TException {
}
}
- public void listSessions(ListSessionsReq req, AsyncMethodCallback resultHandler829) throws TException {
+ public void listSessions(ListSessionsReq req, AsyncMethodCallback resultHandler835) throws TException {
checkReady();
- listSessions_call method_call = new listSessions_call(req, resultHandler829, this, ___protocolFactory, ___transport);
+ listSessions_call method_call = new listSessions_call(req, resultHandler835, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listSessions_call extends TAsyncMethodCall {
private ListSessionsReq req;
- public listSessions_call(ListSessionsReq req, AsyncMethodCallback resultHandler830, TAsyncClient client826, TProtocolFactory protocolFactory827, TNonblockingTransport transport828) throws TException {
- super(client826, protocolFactory827, transport828, resultHandler830, false);
+ public listSessions_call(ListSessionsReq req, AsyncMethodCallback resultHandler836, TAsyncClient client832, TProtocolFactory protocolFactory833, TNonblockingTransport transport834) throws TException {
+ super(client832, protocolFactory833, transport834, resultHandler836, false);
this.req = req;
}
@@ -7020,17 +7101,17 @@ public ListSessionsResp getResult() throws TException {
}
}
- public void getSession(GetSessionReq req, AsyncMethodCallback resultHandler834) throws TException {
+ public void getSession(GetSessionReq req, AsyncMethodCallback resultHandler840) throws TException {
checkReady();
- getSession_call method_call = new getSession_call(req, resultHandler834, this, ___protocolFactory, ___transport);
+ getSession_call method_call = new getSession_call(req, resultHandler840, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getSession_call extends TAsyncMethodCall {
private GetSessionReq req;
- public getSession_call(GetSessionReq req, AsyncMethodCallback resultHandler835, TAsyncClient client831, TProtocolFactory protocolFactory832, TNonblockingTransport transport833) throws TException {
- super(client831, protocolFactory832, transport833, resultHandler835, false);
+ public getSession_call(GetSessionReq req, AsyncMethodCallback resultHandler841, TAsyncClient client837, TProtocolFactory protocolFactory838, TNonblockingTransport transport839) throws TException {
+ super(client837, protocolFactory838, transport839, resultHandler841, false);
this.req = req;
}
@@ -7052,17 +7133,17 @@ public GetSessionResp getResult() throws TException {
}
}
- public void removeSession(RemoveSessionReq req, AsyncMethodCallback resultHandler839) throws TException {
+ public void removeSession(RemoveSessionReq req, AsyncMethodCallback resultHandler845) throws TException {
checkReady();
- removeSession_call method_call = new removeSession_call(req, resultHandler839, this, ___protocolFactory, ___transport);
+ removeSession_call method_call = new removeSession_call(req, resultHandler845, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class removeSession_call extends TAsyncMethodCall {
private RemoveSessionReq req;
- public removeSession_call(RemoveSessionReq req, AsyncMethodCallback resultHandler840, TAsyncClient client836, TProtocolFactory protocolFactory837, TNonblockingTransport transport838) throws TException {
- super(client836, protocolFactory837, transport838, resultHandler840, false);
+ public removeSession_call(RemoveSessionReq req, AsyncMethodCallback resultHandler846, TAsyncClient client842, TProtocolFactory protocolFactory843, TNonblockingTransport transport844) throws TException {
+ super(client842, protocolFactory843, transport844, resultHandler846, false);
this.req = req;
}
@@ -7084,17 +7165,17 @@ public ExecResp getResult() throws TException {
}
}
- public void killQuery(KillQueryReq req, AsyncMethodCallback resultHandler844) throws TException {
+ public void killQuery(KillQueryReq req, AsyncMethodCallback resultHandler850) throws TException {
checkReady();
- killQuery_call method_call = new killQuery_call(req, resultHandler844, this, ___protocolFactory, ___transport);
+ killQuery_call method_call = new killQuery_call(req, resultHandler850, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class killQuery_call extends TAsyncMethodCall {
private KillQueryReq req;
- public killQuery_call(KillQueryReq req, AsyncMethodCallback resultHandler845, TAsyncClient client841, TProtocolFactory protocolFactory842, TNonblockingTransport transport843) throws TException {
- super(client841, protocolFactory842, transport843, resultHandler845, false);
+ public killQuery_call(KillQueryReq req, AsyncMethodCallback resultHandler851, TAsyncClient client847, TProtocolFactory protocolFactory848, TNonblockingTransport transport849) throws TException {
+ super(client847, protocolFactory848, transport849, resultHandler851, false);
this.req = req;
}
@@ -7116,17 +7197,17 @@ public ExecResp getResult() throws TException {
}
}
- public void reportTaskFinish(ReportTaskReq req, AsyncMethodCallback resultHandler849) throws TException {
+ public void reportTaskFinish(ReportTaskReq req, AsyncMethodCallback resultHandler855) throws TException {
checkReady();
- reportTaskFinish_call method_call = new reportTaskFinish_call(req, resultHandler849, this, ___protocolFactory, ___transport);
+ reportTaskFinish_call method_call = new reportTaskFinish_call(req, resultHandler855, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class reportTaskFinish_call extends TAsyncMethodCall {
private ReportTaskReq req;
- public reportTaskFinish_call(ReportTaskReq req, AsyncMethodCallback resultHandler850, TAsyncClient client846, TProtocolFactory protocolFactory847, TNonblockingTransport transport848) throws TException {
- super(client846, protocolFactory847, transport848, resultHandler850, false);
+ public reportTaskFinish_call(ReportTaskReq req, AsyncMethodCallback resultHandler856, TAsyncClient client852, TProtocolFactory protocolFactory853, TNonblockingTransport transport854) throws TException {
+ super(client852, protocolFactory853, transport854, resultHandler856, false);
this.req = req;
}
@@ -7148,17 +7229,17 @@ public ExecResp getResult() throws TException {
}
}
- public void listCluster(ListClusterInfoReq req, AsyncMethodCallback resultHandler854) throws TException {
+ public void listCluster(ListClusterInfoReq req, AsyncMethodCallback resultHandler860) throws TException {
checkReady();
- listCluster_call method_call = new listCluster_call(req, resultHandler854, this, ___protocolFactory, ___transport);
+ listCluster_call method_call = new listCluster_call(req, resultHandler860, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listCluster_call extends TAsyncMethodCall {
private ListClusterInfoReq req;
- public listCluster_call(ListClusterInfoReq req, AsyncMethodCallback resultHandler855, TAsyncClient client851, TProtocolFactory protocolFactory852, TNonblockingTransport transport853) throws TException {
- super(client851, protocolFactory852, transport853, resultHandler855, false);
+ public listCluster_call(ListClusterInfoReq req, AsyncMethodCallback resultHandler861, TAsyncClient client857, TProtocolFactory protocolFactory858, TNonblockingTransport transport859) throws TException {
+ super(client857, protocolFactory858, transport859, resultHandler861, false);
this.req = req;
}
@@ -7180,17 +7261,17 @@ public ListClusterInfoResp getResult() throws TException {
}
}
- public void getMetaDirInfo(GetMetaDirInfoReq req, AsyncMethodCallback resultHandler859) throws TException {
+ public void getMetaDirInfo(GetMetaDirInfoReq req, AsyncMethodCallback resultHandler865) throws TException {
checkReady();
- getMetaDirInfo_call method_call = new getMetaDirInfo_call(req, resultHandler859, this, ___protocolFactory, ___transport);
+ getMetaDirInfo_call method_call = new getMetaDirInfo_call(req, resultHandler865, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getMetaDirInfo_call extends TAsyncMethodCall {
private GetMetaDirInfoReq req;
- public getMetaDirInfo_call(GetMetaDirInfoReq req, AsyncMethodCallback resultHandler860, TAsyncClient client856, TProtocolFactory protocolFactory857, TNonblockingTransport transport858) throws TException {
- super(client856, protocolFactory857, transport858, resultHandler860, false);
+ public getMetaDirInfo_call(GetMetaDirInfoReq req, AsyncMethodCallback resultHandler866, TAsyncClient client862, TProtocolFactory protocolFactory863, TNonblockingTransport transport864) throws TException {
+ super(client862, protocolFactory863, transport864, resultHandler866, false);
this.req = req;
}
@@ -7224,6 +7305,7 @@ public Processor(Iface iface)
processMap_.put("dropSpace", new dropSpace());
processMap_.put("getSpace", new getSpace());
processMap_.put("listSpaces", new listSpaces());
+ processMap_.put("createSpaceAs", new createSpaceAs());
processMap_.put("createTag", new createTag());
processMap_.put("alterTag", new alterTag());
processMap_.put("dropTag", new dropTag());
@@ -7292,7 +7374,7 @@ public Processor(Iface iface)
processMap_.put("addListener", new addListener());
processMap_.put("removeListener", new removeListener());
processMap_.put("listListener", new listListener());
- processMap_.put("getStatis", new getStatis());
+ processMap_.put("getStats", new getStats());
processMap_.put("signInFTService", new signInFTService());
processMap_.put("signOutFTService", new signOutFTService());
processMap_.put("listFTClients", new listFTClients());
@@ -7424,6 +7506,27 @@ public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionCont
}
+ private class createSpaceAs implements ProcessFunction {
+ public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException
+ {
+ Object handler_ctx = event_handler_.getContext("MetaService.createSpaceAs", server_ctx);
+ createSpaceAs_args args = new createSpaceAs_args();
+ event_handler_.preRead(handler_ctx, "MetaService.createSpaceAs");
+ args.read(iprot);
+ iprot.readMessageEnd();
+ event_handler_.postRead(handler_ctx, "MetaService.createSpaceAs", args);
+ createSpaceAs_result result = new createSpaceAs_result();
+ result.success = iface_.createSpaceAs(args.req);
+ event_handler_.preWrite(handler_ctx, "MetaService.createSpaceAs", result);
+ oprot.writeMessageBegin(new TMessage("createSpaceAs", TMessageType.REPLY, seqid));
+ result.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ event_handler_.postWrite(handler_ctx, "MetaService.createSpaceAs", result);
+ }
+
+ }
+
private class createTag implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException
{
@@ -8852,23 +8955,23 @@ public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionCont
}
- private class getStatis implements ProcessFunction {
+ private class getStats implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException
{
- Object handler_ctx = event_handler_.getContext("MetaService.getStatis", server_ctx);
- getStatis_args args = new getStatis_args();
- event_handler_.preRead(handler_ctx, "MetaService.getStatis");
+ Object handler_ctx = event_handler_.getContext("MetaService.getStats", server_ctx);
+ getStats_args args = new getStats_args();
+ event_handler_.preRead(handler_ctx, "MetaService.getStats");
args.read(iprot);
iprot.readMessageEnd();
- event_handler_.postRead(handler_ctx, "MetaService.getStatis", args);
- getStatis_result result = new getStatis_result();
- result.success = iface_.getStatis(args.req);
- event_handler_.preWrite(handler_ctx, "MetaService.getStatis", result);
- oprot.writeMessageBegin(new TMessage("getStatis", TMessageType.REPLY, seqid));
+ event_handler_.postRead(handler_ctx, "MetaService.getStats", args);
+ getStats_result result = new getStats_result();
+ result.success = iface_.getStats(args.req);
+ event_handler_.preWrite(handler_ctx, "MetaService.getStats", result);
+ oprot.writeMessageBegin(new TMessage("getStats", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
- event_handler_.postWrite(handler_ctx, "MetaService.getStatis", result);
+ event_handler_.postWrite(handler_ctx, "MetaService.getStats", result);
}
}
@@ -10930,6 +11033,441 @@ public void validate() throws TException {
}
+ public static class createSpaceAs_args implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("createSpaceAs_args");
+ private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1);
+
+ public CreateSpaceAsReq req;
+ public static final int REQ = 1;
+
+ // isset id assignments
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(REQ, new FieldMetaData("req", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, CreateSpaceAsReq.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(createSpaceAs_args.class, metaDataMap);
+ }
+
+ public createSpaceAs_args() {
+ }
+
+ public createSpaceAs_args(
+ CreateSpaceAsReq req) {
+ this();
+ this.req = req;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public createSpaceAs_args(createSpaceAs_args other) {
+ if (other.isSetReq()) {
+ this.req = TBaseHelper.deepCopy(other.req);
+ }
+ }
+
+ public createSpaceAs_args deepCopy() {
+ return new createSpaceAs_args(this);
+ }
+
+ public CreateSpaceAsReq getReq() {
+ return this.req;
+ }
+
+ public createSpaceAs_args setReq(CreateSpaceAsReq req) {
+ this.req = req;
+ return this;
+ }
+
+ public void unsetReq() {
+ this.req = null;
+ }
+
+ // Returns true if field req is set (has been assigned a value) and false otherwise
+ public boolean isSetReq() {
+ return this.req != null;
+ }
+
+ public void setReqIsSet(boolean __value) {
+ if (!__value) {
+ this.req = null;
+ }
+ }
+
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case REQ:
+ if (__value == null) {
+ unsetReq();
+ } else {
+ setReq((CreateSpaceAsReq)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case REQ:
+ return getReq();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof createSpaceAs_args))
+ return false;
+ createSpaceAs_args that = (createSpaceAs_args)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.isSetReq(), that.isSetReq(), this.req, that.req)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {req});
+ }
+
+ @Override
+ public int compareTo(createSpaceAs_args other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(req, other.req);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case REQ:
+ if (__field.type == TType.STRUCT) {
+ this.req = new CreateSpaceAsReq();
+ this.req.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.req != null) {
+ oprot.writeFieldBegin(REQ_FIELD_DESC);
+ this.req.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("createSpaceAs_args");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("req");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getReq() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getReq(), indent + 1, prettyPrint));
+ }
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+ }
+
+ public static class createSpaceAs_result implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("createSpaceAs_result");
+ private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
+
+ public ExecResp success;
+ public static final int SUCCESS = 0;
+
+ // isset id assignments
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, ExecResp.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(createSpaceAs_result.class, metaDataMap);
+ }
+
+ public createSpaceAs_result() {
+ }
+
+ public createSpaceAs_result(
+ ExecResp success) {
+ this();
+ this.success = success;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public createSpaceAs_result(createSpaceAs_result other) {
+ if (other.isSetSuccess()) {
+ this.success = TBaseHelper.deepCopy(other.success);
+ }
+ }
+
+ public createSpaceAs_result deepCopy() {
+ return new createSpaceAs_result(this);
+ }
+
+ public ExecResp getSuccess() {
+ return this.success;
+ }
+
+ public createSpaceAs_result setSuccess(ExecResp success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ // Returns true if field success is set (has been assigned a value) and false otherwise
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean __value) {
+ if (!__value) {
+ this.success = null;
+ }
+ }
+
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case SUCCESS:
+ if (__value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((ExecResp)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case SUCCESS:
+ return getSuccess();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof createSpaceAs_result))
+ return false;
+ createSpaceAs_result that = (createSpaceAs_result)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {success});
+ }
+
+ @Override
+ public int compareTo(createSpaceAs_result other) {
+ if (other == null) {
+ // See java.lang.Comparable docs
+ throw new NullPointerException();
+ }
+
+ if (other == this) {
+ return 0;
+ }
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ lastComparison = TBaseHelper.compareTo(success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case SUCCESS:
+ if (__field.type == TType.STRUCT) {
+ this.success = new ExecResp();
+ this.success.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ oprot.writeStructBegin(STRUCT_DESC);
+
+ if (this.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ this.success.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("createSpaceAs_result");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("success");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getSuccess() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getSuccess(), indent + 1, prettyPrint));
+ }
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+ }
+
public static class createTag_args implements TBase, java.io.Serializable, Cloneable, Comparable {
private static final TStruct STRUCT_DESC = new TStruct("createTag_args");
private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1);
@@ -40395,11 +40933,11 @@ public void validate() throws TException {
}
- public static class getStatis_args implements TBase, java.io.Serializable, Cloneable, Comparable {
- private static final TStruct STRUCT_DESC = new TStruct("getStatis_args");
+ public static class getStats_args implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("getStats_args");
private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1);
- public GetStatisReq req;
+ public GetStatsReq req;
public static final int REQ = 1;
// isset id assignments
@@ -40409,19 +40947,19 @@ public static class getStatis_args implements TBase, java.io.Serializable, Clone
static {
Map tmpMetaDataMap = new HashMap();
tmpMetaDataMap.put(REQ, new FieldMetaData("req", TFieldRequirementType.DEFAULT,
- new StructMetaData(TType.STRUCT, GetStatisReq.class)));
+ new StructMetaData(TType.STRUCT, GetStatsReq.class)));
metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
}
static {
- FieldMetaData.addStructMetaDataMap(getStatis_args.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(getStats_args.class, metaDataMap);
}
- public getStatis_args() {
+ public getStats_args() {
}
- public getStatis_args(
- GetStatisReq req) {
+ public getStats_args(
+ GetStatsReq req) {
this();
this.req = req;
}
@@ -40429,21 +40967,21 @@ public getStatis_args(
/**
* Performs a deep copy on other.
*/
- public getStatis_args(getStatis_args other) {
+ public getStats_args(getStats_args other) {
if (other.isSetReq()) {
this.req = TBaseHelper.deepCopy(other.req);
}
}
- public getStatis_args deepCopy() {
- return new getStatis_args(this);
+ public getStats_args deepCopy() {
+ return new getStats_args(this);
}
- public GetStatisReq getReq() {
+ public GetStatsReq getReq() {
return this.req;
}
- public getStatis_args setReq(GetStatisReq req) {
+ public getStats_args setReq(GetStatsReq req) {
this.req = req;
return this;
}
@@ -40469,7 +41007,7 @@ public void setFieldValue(int fieldID, Object __value) {
if (__value == null) {
unsetReq();
} else {
- setReq((GetStatisReq)__value);
+ setReq((GetStatsReq)__value);
}
break;
@@ -40494,9 +41032,9 @@ public boolean equals(Object _that) {
return false;
if (this == _that)
return true;
- if (!(_that instanceof getStatis_args))
+ if (!(_that instanceof getStats_args))
return false;
- getStatis_args that = (getStatis_args)_that;
+ getStats_args that = (getStats_args)_that;
if (!TBaseHelper.equalsNobinary(this.isSetReq(), that.isSetReq(), this.req, that.req)) { return false; }
@@ -40509,7 +41047,7 @@ public int hashCode() {
}
@Override
- public int compareTo(getStatis_args other) {
+ public int compareTo(getStats_args other) {
if (other == null) {
// See java.lang.Comparable docs
throw new NullPointerException();
@@ -40544,7 +41082,7 @@ public void read(TProtocol iprot) throws TException {
{
case REQ:
if (__field.type == TType.STRUCT) {
- this.req = new GetStatisReq();
+ this.req = new GetStatsReq();
this.req.read(iprot);
} else {
TProtocolUtil.skip(iprot, __field.type);
@@ -40586,7 +41124,7 @@ public String toString(int indent, boolean prettyPrint) {
String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
String newLine = prettyPrint ? "\n" : "";
String space = prettyPrint ? " " : "";
- StringBuilder sb = new StringBuilder("getStatis_args");
+ StringBuilder sb = new StringBuilder("getStats_args");
sb.append(space);
sb.append("(");
sb.append(newLine);
@@ -40613,11 +41151,11 @@ public void validate() throws TException {
}
- public static class getStatis_result implements TBase, java.io.Serializable, Cloneable, Comparable {
- private static final TStruct STRUCT_DESC = new TStruct("getStatis_result");
+ public static class getStats_result implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("getStats_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
- public GetStatisResp success;
+ public GetStatsResp success;
public static final int SUCCESS = 0;
// isset id assignments
@@ -40627,19 +41165,19 @@ public static class getStatis_result implements TBase, java.io.Serializable, Clo
static {
Map tmpMetaDataMap = new HashMap();
tmpMetaDataMap.put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
- new StructMetaData(TType.STRUCT, GetStatisResp.class)));
+ new StructMetaData(TType.STRUCT, GetStatsResp.class)));
metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
}
static {
- FieldMetaData.addStructMetaDataMap(getStatis_result.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(getStats_result.class, metaDataMap);
}
- public getStatis_result() {
+ public getStats_result() {
}
- public getStatis_result(
- GetStatisResp success) {
+ public getStats_result(
+ GetStatsResp success) {
this();
this.success = success;
}
@@ -40647,21 +41185,21 @@ public getStatis_result(
/**
* Performs a deep copy on other.
*/
- public getStatis_result(getStatis_result other) {
+ public getStats_result(getStats_result other) {
if (other.isSetSuccess()) {
this.success = TBaseHelper.deepCopy(other.success);
}
}
- public getStatis_result deepCopy() {
- return new getStatis_result(this);
+ public getStats_result deepCopy() {
+ return new getStats_result(this);
}
- public GetStatisResp getSuccess() {
+ public GetStatsResp getSuccess() {
return this.success;
}
- public getStatis_result setSuccess(GetStatisResp success) {
+ public getStats_result setSuccess(GetStatsResp success) {
this.success = success;
return this;
}
@@ -40687,7 +41225,7 @@ public void setFieldValue(int fieldID, Object __value) {
if (__value == null) {
unsetSuccess();
} else {
- setSuccess((GetStatisResp)__value);
+ setSuccess((GetStatsResp)__value);
}
break;
@@ -40712,9 +41250,9 @@ public boolean equals(Object _that) {
return false;
if (this == _that)
return true;
- if (!(_that instanceof getStatis_result))
+ if (!(_that instanceof getStats_result))
return false;
- getStatis_result that = (getStatis_result)_that;
+ getStats_result that = (getStats_result)_that;
if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; }
@@ -40727,7 +41265,7 @@ public int hashCode() {
}
@Override
- public int compareTo(getStatis_result other) {
+ public int compareTo(getStats_result other) {
if (other == null) {
// See java.lang.Comparable docs
throw new NullPointerException();
@@ -40762,7 +41300,7 @@ public void read(TProtocol iprot) throws TException {
{
case SUCCESS:
if (__field.type == TType.STRUCT) {
- this.success = new GetStatisResp();
+ this.success = new GetStatsResp();
this.success.read(iprot);
} else {
TProtocolUtil.skip(iprot, __field.type);
@@ -40803,7 +41341,7 @@ public String toString(int indent, boolean prettyPrint) {
String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
String newLine = prettyPrint ? "\n" : "";
String space = prettyPrint ? " " : "";
- StringBuilder sb = new StringBuilder("getStatis_result");
+ StringBuilder sb = new StringBuilder("getStats_result");
sb.append(space);
sb.append("(");
sb.append(newLine);
diff --git a/client/src/main/generated/com/vesoft/nebula/meta/ReportTaskReq.java b/client/src/main/generated/com/vesoft/nebula/meta/ReportTaskReq.java
index 113e26280..148d04980 100644
--- a/client/src/main/generated/com/vesoft/nebula/meta/ReportTaskReq.java
+++ b/client/src/main/generated/com/vesoft/nebula/meta/ReportTaskReq.java
@@ -29,7 +29,7 @@ public class ReportTaskReq implements TBase, java.io.Serializable, Cloneable, Co
private static final TField CODE_FIELD_DESC = new TField("code", TType.I32, (short)1);
private static final TField JOB_ID_FIELD_DESC = new TField("job_id", TType.I32, (short)2);
private static final TField TASK_ID_FIELD_DESC = new TField("task_id", TType.I32, (short)3);
- private static final TField STATIS_FIELD_DESC = new TField("statis", TType.STRUCT, (short)4);
+ private static final TField STATS_FIELD_DESC = new TField("stats", TType.STRUCT, (short)4);
/**
*
@@ -38,11 +38,11 @@ public class ReportTaskReq implements TBase, java.io.Serializable, Cloneable, Co
public com.vesoft.nebula.ErrorCode code;
public int job_id;
public int task_id;
- public StatisItem statis;
+ public StatsItem stats;
public static final int CODE = 1;
public static final int JOB_ID = 2;
public static final int TASK_ID = 3;
- public static final int STATIS = 4;
+ public static final int STATS = 4;
// isset id assignments
private static final int __JOB_ID_ISSET_ID = 0;
@@ -59,8 +59,8 @@ public class ReportTaskReq implements TBase, java.io.Serializable, Cloneable, Co
new FieldValueMetaData(TType.I32)));
tmpMetaDataMap.put(TASK_ID, new FieldMetaData("task_id", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
- tmpMetaDataMap.put(STATIS, new FieldMetaData("statis", TFieldRequirementType.OPTIONAL,
- new StructMetaData(TType.STRUCT, StatisItem.class)));
+ tmpMetaDataMap.put(STATS, new FieldMetaData("stats", TFieldRequirementType.OPTIONAL,
+ new StructMetaData(TType.STRUCT, StatsItem.class)));
metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
}
@@ -87,21 +87,21 @@ public ReportTaskReq(
com.vesoft.nebula.ErrorCode code,
int job_id,
int task_id,
- StatisItem statis) {
+ StatsItem stats) {
this();
this.code = code;
this.job_id = job_id;
setJob_idIsSet(true);
this.task_id = task_id;
setTask_idIsSet(true);
- this.statis = statis;
+ this.stats = stats;
}
public static class Builder {
private com.vesoft.nebula.ErrorCode code;
private int job_id;
private int task_id;
- private StatisItem statis;
+ private StatsItem stats;
BitSet __optional_isset = new BitSet(2);
@@ -125,8 +125,8 @@ public Builder setTask_id(final int task_id) {
return this;
}
- public Builder setStatis(final StatisItem statis) {
- this.statis = statis;
+ public Builder setStats(final StatsItem stats) {
+ this.stats = stats;
return this;
}
@@ -139,7 +139,7 @@ public ReportTaskReq build() {
if (__optional_isset.get(__TASK_ID_ISSET_ID)) {
result.setTask_id(this.task_id);
}
- result.setStatis(this.statis);
+ result.setStats(this.stats);
return result;
}
}
@@ -159,8 +159,8 @@ public ReportTaskReq(ReportTaskReq other) {
}
this.job_id = TBaseHelper.deepCopy(other.job_id);
this.task_id = TBaseHelper.deepCopy(other.task_id);
- if (other.isSetStatis()) {
- this.statis = TBaseHelper.deepCopy(other.statis);
+ if (other.isSetStats()) {
+ this.stats = TBaseHelper.deepCopy(other.stats);
}
}
@@ -246,27 +246,27 @@ public void setTask_idIsSet(boolean __value) {
__isset_bit_vector.set(__TASK_ID_ISSET_ID, __value);
}
- public StatisItem getStatis() {
- return this.statis;
+ public StatsItem getStats() {
+ return this.stats;
}
- public ReportTaskReq setStatis(StatisItem statis) {
- this.statis = statis;
+ public ReportTaskReq setStats(StatsItem stats) {
+ this.stats = stats;
return this;
}
- public void unsetStatis() {
- this.statis = null;
+ public void unsetStats() {
+ this.stats = null;
}
- // Returns true if field statis is set (has been assigned a value) and false otherwise
- public boolean isSetStatis() {
- return this.statis != null;
+ // Returns true if field stats is set (has been assigned a value) and false otherwise
+ public boolean isSetStats() {
+ return this.stats != null;
}
- public void setStatisIsSet(boolean __value) {
+ public void setStatsIsSet(boolean __value) {
if (!__value) {
- this.statis = null;
+ this.stats = null;
}
}
@@ -296,11 +296,11 @@ public void setFieldValue(int fieldID, Object __value) {
}
break;
- case STATIS:
+ case STATS:
if (__value == null) {
- unsetStatis();
+ unsetStats();
} else {
- setStatis((StatisItem)__value);
+ setStats((StatsItem)__value);
}
break;
@@ -320,8 +320,8 @@ public Object getFieldValue(int fieldID) {
case TASK_ID:
return new Integer(getTask_id());
- case STATIS:
- return getStatis();
+ case STATS:
+ return getStats();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
@@ -344,14 +344,14 @@ public boolean equals(Object _that) {
if (!TBaseHelper.equalsNobinary(this.task_id, that.task_id)) { return false; }
- if (!TBaseHelper.equalsNobinary(this.isSetStatis(), that.isSetStatis(), this.statis, that.statis)) { return false; }
+ if (!TBaseHelper.equalsNobinary(this.isSetStats(), that.isSetStats(), this.stats, that.stats)) { return false; }
return true;
}
@Override
public int hashCode() {
- return Arrays.deepHashCode(new Object[] {code, job_id, task_id, statis});
+ return Arrays.deepHashCode(new Object[] {code, job_id, task_id, stats});
}
@Override
@@ -390,11 +390,11 @@ public int compareTo(ReportTaskReq other) {
if (lastComparison != 0) {
return lastComparison;
}
- lastComparison = Boolean.valueOf(isSetStatis()).compareTo(other.isSetStatis());
+ lastComparison = Boolean.valueOf(isSetStats()).compareTo(other.isSetStats());
if (lastComparison != 0) {
return lastComparison;
}
- lastComparison = TBaseHelper.compareTo(statis, other.statis);
+ lastComparison = TBaseHelper.compareTo(stats, other.stats);
if (lastComparison != 0) {
return lastComparison;
}
@@ -435,10 +435,10 @@ public void read(TProtocol iprot) throws TException {
TProtocolUtil.skip(iprot, __field.type);
}
break;
- case STATIS:
+ case STATS:
if (__field.type == TType.STRUCT) {
- this.statis = new StatisItem();
- this.statis.read(iprot);
+ this.stats = new StatsItem();
+ this.stats.read(iprot);
} else {
TProtocolUtil.skip(iprot, __field.type);
}
@@ -471,10 +471,10 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(TASK_ID_FIELD_DESC);
oprot.writeI32(this.task_id);
oprot.writeFieldEnd();
- if (this.statis != null) {
- if (isSetStatis()) {
- oprot.writeFieldBegin(STATIS_FIELD_DESC);
- this.statis.write(oprot);
+ if (this.stats != null) {
+ if (isSetStats()) {
+ oprot.writeFieldBegin(STATS_FIELD_DESC);
+ this.stats.write(oprot);
oprot.writeFieldEnd();
}
}
@@ -530,17 +530,17 @@ public String toString(int indent, boolean prettyPrint) {
sb.append(":").append(space);
sb.append(TBaseHelper.toString(this.getTask_id(), indent + 1, prettyPrint));
first = false;
- if (isSetStatis())
+ if (isSetStats())
{
if (!first) sb.append("," + newLine);
sb.append(indentStr);
- sb.append("statis");
+ sb.append("stats");
sb.append(space);
sb.append(":").append(space);
- if (this.getStatis() == null) {
+ if (this.getStats() == null) {
sb.append("null");
} else {
- sb.append(TBaseHelper.toString(this.getStatis(), indent + 1, prettyPrint));
+ sb.append(TBaseHelper.toString(this.getStats(), indent + 1, prettyPrint));
}
first = false;
}
diff --git a/client/src/main/generated/com/vesoft/nebula/meta/ResponseCommon.java b/client/src/main/generated/com/vesoft/nebula/meta/ResponseCommon.java
deleted file mode 100644
index 3a5ab4cce..000000000
--- a/client/src/main/generated/com/vesoft/nebula/meta/ResponseCommon.java
+++ /dev/null
@@ -1,459 +0,0 @@
-/**
- * Autogenerated by Thrift
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package com.vesoft.nebula.meta;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.util.Arrays;
-import com.facebook.thrift.*;
-import com.facebook.thrift.annotations.*;
-import com.facebook.thrift.async.*;
-import com.facebook.thrift.meta_data.*;
-import com.facebook.thrift.server.*;
-import com.facebook.thrift.transport.*;
-import com.facebook.thrift.protocol.*;
-
-@SuppressWarnings({ "unused", "serial" })
-public class ResponseCommon implements TBase, java.io.Serializable, Cloneable, Comparable {
- private static final TStruct STRUCT_DESC = new TStruct("ResponseCommon");
- private static final TField CODE_FIELD_DESC = new TField("code", TType.I32, (short)1);
- private static final TField ERROR_MSG_FIELD_DESC = new TField("error_msg", TType.STRING, (short)2);
- private static final TField LEADER_FIELD_DESC = new TField("leader", TType.STRUCT, (short)3);
-
- public int code;
- public byte[] error_msg;
- public com.vesoft.nebula.HostAddr leader;
- public static final int CODE = 1;
- public static final int ERROR_MSG = 2;
- public static final int LEADER = 3;
-
- // isset id assignments
- private static final int __CODE_ISSET_ID = 0;
- private BitSet __isset_bit_vector = new BitSet(1);
-
- public static final Map metaDataMap;
-
- static {
- Map tmpMetaDataMap = new HashMap();
- tmpMetaDataMap.put(CODE, new FieldMetaData("code", TFieldRequirementType.REQUIRED,
- new FieldValueMetaData(TType.I32)));
- tmpMetaDataMap.put(ERROR_MSG, new FieldMetaData("error_msg", TFieldRequirementType.REQUIRED,
- new FieldValueMetaData(TType.STRING)));
- tmpMetaDataMap.put(LEADER, new FieldMetaData("leader", TFieldRequirementType.DEFAULT,
- new StructMetaData(TType.STRUCT, com.vesoft.nebula.HostAddr.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
- }
-
- static {
- FieldMetaData.addStructMetaDataMap(ResponseCommon.class, metaDataMap);
- }
-
- public ResponseCommon() {
- }
-
- public ResponseCommon(
- int code,
- byte[] error_msg) {
- this();
- this.code = code;
- setCodeIsSet(true);
- this.error_msg = error_msg;
- }
-
- public ResponseCommon(
- int code,
- byte[] error_msg,
- com.vesoft.nebula.HostAddr leader) {
- this();
- this.code = code;
- setCodeIsSet(true);
- this.error_msg = error_msg;
- this.leader = leader;
- }
-
- public static class Builder {
- private int code;
- private byte[] error_msg;
- private com.vesoft.nebula.HostAddr leader;
-
- BitSet __optional_isset = new BitSet(1);
-
- public Builder() {
- }
-
- public Builder setCode(final int code) {
- this.code = code;
- __optional_isset.set(__CODE_ISSET_ID, true);
- return this;
- }
-
- public Builder setError_msg(final byte[] error_msg) {
- this.error_msg = error_msg;
- return this;
- }
-
- public Builder setLeader(final com.vesoft.nebula.HostAddr leader) {
- this.leader = leader;
- return this;
- }
-
- public ResponseCommon build() {
- ResponseCommon result = new ResponseCommon();
- if (__optional_isset.get(__CODE_ISSET_ID)) {
- result.setCode(this.code);
- }
- result.setError_msg(this.error_msg);
- result.setLeader(this.leader);
- return result;
- }
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- /**
- * Performs a deep copy on other.
- */
- public ResponseCommon(ResponseCommon other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
- this.code = TBaseHelper.deepCopy(other.code);
- if (other.isSetError_msg()) {
- this.error_msg = TBaseHelper.deepCopy(other.error_msg);
- }
- if (other.isSetLeader()) {
- this.leader = TBaseHelper.deepCopy(other.leader);
- }
- }
-
- public ResponseCommon deepCopy() {
- return new ResponseCommon(this);
- }
-
- public int getCode() {
- return this.code;
- }
-
- public ResponseCommon setCode(int code) {
- this.code = code;
- setCodeIsSet(true);
- return this;
- }
-
- public void unsetCode() {
- __isset_bit_vector.clear(__CODE_ISSET_ID);
- }
-
- // Returns true if field code is set (has been assigned a value) and false otherwise
- public boolean isSetCode() {
- return __isset_bit_vector.get(__CODE_ISSET_ID);
- }
-
- public void setCodeIsSet(boolean __value) {
- __isset_bit_vector.set(__CODE_ISSET_ID, __value);
- }
-
- public byte[] getError_msg() {
- return this.error_msg;
- }
-
- public ResponseCommon setError_msg(byte[] error_msg) {
- this.error_msg = error_msg;
- return this;
- }
-
- public void unsetError_msg() {
- this.error_msg = null;
- }
-
- // Returns true if field error_msg is set (has been assigned a value) and false otherwise
- public boolean isSetError_msg() {
- return this.error_msg != null;
- }
-
- public void setError_msgIsSet(boolean __value) {
- if (!__value) {
- this.error_msg = null;
- }
- }
-
- public com.vesoft.nebula.HostAddr getLeader() {
- return this.leader;
- }
-
- public ResponseCommon setLeader(com.vesoft.nebula.HostAddr leader) {
- this.leader = leader;
- return this;
- }
-
- public void unsetLeader() {
- this.leader = null;
- }
-
- // Returns true if field leader is set (has been assigned a value) and false otherwise
- public boolean isSetLeader() {
- return this.leader != null;
- }
-
- public void setLeaderIsSet(boolean __value) {
- if (!__value) {
- this.leader = null;
- }
- }
-
- public void setFieldValue(int fieldID, Object __value) {
- switch (fieldID) {
- case CODE:
- if (__value == null) {
- unsetCode();
- } else {
- setCode((Integer)__value);
- }
- break;
-
- case ERROR_MSG:
- if (__value == null) {
- unsetError_msg();
- } else {
- setError_msg((byte[])__value);
- }
- break;
-
- case LEADER:
- if (__value == null) {
- unsetLeader();
- } else {
- setLeader((com.vesoft.nebula.HostAddr)__value);
- }
- break;
-
- default:
- throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
- }
- }
-
- public Object getFieldValue(int fieldID) {
- switch (fieldID) {
- case CODE:
- return new Integer(getCode());
-
- case ERROR_MSG:
- return getError_msg();
-
- case LEADER:
- return getLeader();
-
- default:
- throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
- }
- }
-
- @Override
- public boolean equals(Object _that) {
- if (_that == null)
- return false;
- if (this == _that)
- return true;
- if (!(_that instanceof ResponseCommon))
- return false;
- ResponseCommon that = (ResponseCommon)_that;
-
- if (!TBaseHelper.equalsNobinary(this.code, that.code)) { return false; }
-
- if (!TBaseHelper.equalsSlow(this.isSetError_msg(), that.isSetError_msg(), this.error_msg, that.error_msg)) { return false; }
-
- if (!TBaseHelper.equalsNobinary(this.isSetLeader(), that.isSetLeader(), this.leader, that.leader)) { return false; }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return Arrays.deepHashCode(new Object[] {code, error_msg, leader});
- }
-
- @Override
- public int compareTo(ResponseCommon other) {
- if (other == null) {
- // See java.lang.Comparable docs
- throw new NullPointerException();
- }
-
- if (other == this) {
- return 0;
- }
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetCode()).compareTo(other.isSetCode());
- if (lastComparison != 0) {
- return lastComparison;
- }
- lastComparison = TBaseHelper.compareTo(code, other.code);
- if (lastComparison != 0) {
- return lastComparison;
- }
- lastComparison = Boolean.valueOf(isSetError_msg()).compareTo(other.isSetError_msg());
- if (lastComparison != 0) {
- return lastComparison;
- }
- lastComparison = TBaseHelper.compareTo(error_msg, other.error_msg);
- if (lastComparison != 0) {
- return lastComparison;
- }
- lastComparison = Boolean.valueOf(isSetLeader()).compareTo(other.isSetLeader());
- if (lastComparison != 0) {
- return lastComparison;
- }
- lastComparison = TBaseHelper.compareTo(leader, other.leader);
- if (lastComparison != 0) {
- return lastComparison;
- }
- return 0;
- }
-
- public void read(TProtocol iprot) throws TException {
- TField __field;
- iprot.readStructBegin(metaDataMap);
- while (true)
- {
- __field = iprot.readFieldBegin();
- if (__field.type == TType.STOP) {
- break;
- }
- switch (__field.id)
- {
- case CODE:
- if (__field.type == TType.I32) {
- this.code = iprot.readI32();
- setCodeIsSet(true);
- } else {
- TProtocolUtil.skip(iprot, __field.type);
- }
- break;
- case ERROR_MSG:
- if (__field.type == TType.STRING) {
- this.error_msg = iprot.readBinary();
- } else {
- TProtocolUtil.skip(iprot, __field.type);
- }
- break;
- case LEADER:
- if (__field.type == TType.STRUCT) {
- this.leader = new com.vesoft.nebula.HostAddr();
- this.leader.read(iprot);
- } else {
- TProtocolUtil.skip(iprot, __field.type);
- }
- break;
- default:
- TProtocolUtil.skip(iprot, __field.type);
- break;
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
-
- // check for required fields of primitive type, which can't be checked in the validate method
- if (!isSetCode()) {
- throw new TProtocolException("Required field 'code' was not found in serialized data! Struct: " + toString());
- }
- validate();
- }
-
- public void write(TProtocol oprot) throws TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldBegin(CODE_FIELD_DESC);
- oprot.writeI32(this.code);
- oprot.writeFieldEnd();
- if (this.error_msg != null) {
- oprot.writeFieldBegin(ERROR_MSG_FIELD_DESC);
- oprot.writeBinary(this.error_msg);
- oprot.writeFieldEnd();
- }
- if (this.leader != null) {
- oprot.writeFieldBegin(LEADER_FIELD_DESC);
- this.leader.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- @Override
- public String toString() {
- return toString(1, true);
- }
-
- @Override
- public String toString(int indent, boolean prettyPrint) {
- String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
- String newLine = prettyPrint ? "\n" : "";
- String space = prettyPrint ? " " : "";
- StringBuilder sb = new StringBuilder("ResponseCommon");
- sb.append(space);
- sb.append("(");
- sb.append(newLine);
- boolean first = true;
-
- sb.append(indentStr);
- sb.append("code");
- sb.append(space);
- sb.append(":").append(space);
- sb.append(TBaseHelper.toString(this.getCode(), indent + 1, prettyPrint));
- first = false;
- if (!first) sb.append("," + newLine);
- sb.append(indentStr);
- sb.append("error_msg");
- sb.append(space);
- sb.append(":").append(space);
- if (this.getError_msg() == null) {
- sb.append("null");
- } else {
- int __error_msg_size = Math.min(this.getError_msg().length, 128);
- for (int i = 0; i < __error_msg_size; i++) {
- if (i != 0) sb.append(" ");
- sb.append(Integer.toHexString(this.getError_msg()[i]).length() > 1 ? Integer.toHexString(this.getError_msg()[i]).substring(Integer.toHexString(this.getError_msg()[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.getError_msg()[i]).toUpperCase());
- }
- if (this.getError_msg().length > 128) sb.append(" ...");
- }
- first = false;
- if (!first) sb.append("," + newLine);
- sb.append(indentStr);
- sb.append("leader");
- sb.append(space);
- sb.append(":").append(space);
- if (this.getLeader() == null) {
- sb.append("null");
- } else {
- sb.append(TBaseHelper.toString(this.getLeader(), indent + 1, prettyPrint));
- }
- first = false;
- sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws TException {
- // check for required fields
- // alas, we cannot check 'code' because it's a primitive and you chose the non-beans generator.
- if (error_msg == null) {
- throw new TProtocolException(TProtocolException.MISSING_REQUIRED_FIELD, "Required field 'error_msg' was not present! Struct: " + toString());
- }
- }
-
-}
-
diff --git a/client/src/main/generated/com/vesoft/nebula/meta/StatisItem.java b/client/src/main/generated/com/vesoft/nebula/meta/StatsItem.java
similarity index 96%
rename from client/src/main/generated/com/vesoft/nebula/meta/StatisItem.java
rename to client/src/main/generated/com/vesoft/nebula/meta/StatsItem.java
index 850f16215..7c1646564 100644
--- a/client/src/main/generated/com/vesoft/nebula/meta/StatisItem.java
+++ b/client/src/main/generated/com/vesoft/nebula/meta/StatsItem.java
@@ -24,8 +24,8 @@
import com.facebook.thrift.protocol.*;
@SuppressWarnings({ "unused", "serial" })
-public class StatisItem implements TBase, java.io.Serializable, Cloneable, Comparable {
- private static final TStruct STRUCT_DESC = new TStruct("StatisItem");
+public class StatsItem implements TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final TStruct STRUCT_DESC = new TStruct("StatsItem");
private static final TField TAG_VERTICES_FIELD_DESC = new TField("tag_vertices", TType.MAP, (short)1);
private static final TField EDGES_FIELD_DESC = new TField("edges", TType.MAP, (short)2);
private static final TField SPACE_VERTICES_FIELD_DESC = new TField("space_vertices", TType.I64, (short)3);
@@ -90,13 +90,13 @@ public class StatisItem implements TBase, java.io.Serializable, Cloneable, Compa
}
static {
- FieldMetaData.addStructMetaDataMap(StatisItem.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(StatsItem.class, metaDataMap);
}
- public StatisItem() {
+ public StatsItem() {
}
- public StatisItem(
+ public StatsItem(
Map tag_vertices,
Map edges,
long space_vertices,
@@ -167,8 +167,8 @@ public Builder setStatus(final JobStatus status) {
return this;
}
- public StatisItem build() {
- StatisItem result = new StatisItem();
+ public StatsItem build() {
+ StatsItem result = new StatsItem();
result.setTag_vertices(this.tag_vertices);
result.setEdges(this.edges);
if (__optional_isset.get(__SPACE_VERTICES_ISSET_ID)) {
@@ -191,7 +191,7 @@ public static Builder builder() {
/**
* Performs a deep copy on other.
*/
- public StatisItem(StatisItem other) {
+ public StatsItem(StatsItem other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetTag_vertices()) {
@@ -213,15 +213,15 @@ public StatisItem(StatisItem other) {
}
}
- public StatisItem deepCopy() {
- return new StatisItem(this);
+ public StatsItem deepCopy() {
+ return new StatsItem(this);
}
public Map getTag_vertices() {
return this.tag_vertices;
}
- public StatisItem setTag_vertices(Map tag_vertices) {
+ public StatsItem setTag_vertices(Map tag_vertices) {
this.tag_vertices = tag_vertices;
return this;
}
@@ -245,7 +245,7 @@ public Map getEdges() {
return this.edges;
}
- public StatisItem setEdges(Map edges) {
+ public StatsItem setEdges(Map edges) {
this.edges = edges;
return this;
}
@@ -269,7 +269,7 @@ public long getSpace_vertices() {
return this.space_vertices;
}
- public StatisItem setSpace_vertices(long space_vertices) {
+ public StatsItem setSpace_vertices(long space_vertices) {
this.space_vertices = space_vertices;
setSpace_verticesIsSet(true);
return this;
@@ -292,7 +292,7 @@ public long getSpace_edges() {
return this.space_edges;
}
- public StatisItem setSpace_edges(long space_edges) {
+ public StatsItem setSpace_edges(long space_edges) {
this.space_edges = space_edges;
setSpace_edgesIsSet(true);
return this;
@@ -315,7 +315,7 @@ public Map> getPositive_part_correlativity() {
return this.positive_part_correlativity;
}
- public StatisItem setPositive_part_correlativity(Map> positive_part_correlativity) {
+ public StatsItem setPositive_part_correlativity(Map> positive_part_correlativity) {
this.positive_part_correlativity = positive_part_correlativity;
return this;
}
@@ -339,7 +339,7 @@ public Map> getNegative_part_correlativity() {
return this.negative_part_correlativity;
}
- public StatisItem setNegative_part_correlativity(Map> negative_part_correlativity) {
+ public StatsItem setNegative_part_correlativity(Map> negative_part_correlativity) {
this.negative_part_correlativity = negative_part_correlativity;
return this;
}
@@ -371,7 +371,7 @@ public JobStatus getStatus() {
*
* @see JobStatus
*/
- public StatisItem setStatus(JobStatus status) {
+ public StatsItem setStatus(JobStatus status) {
this.status = status;
return this;
}
@@ -489,9 +489,9 @@ public boolean equals(Object _that) {
return false;
if (this == _that)
return true;
- if (!(_that instanceof StatisItem))
+ if (!(_that instanceof StatsItem))
return false;
- StatisItem that = (StatisItem)_that;
+ StatsItem that = (StatsItem)_that;
if (!TBaseHelper.equalsSlow(this.isSetTag_vertices(), that.isSetTag_vertices(), this.tag_vertices, that.tag_vertices)) { return false; }
@@ -516,7 +516,7 @@ public int hashCode() {
}
@Override
- public int compareTo(StatisItem other) {
+ public int compareTo(StatsItem other) {
if (other == null) {
// See java.lang.Comparable docs
throw new NullPointerException();
@@ -832,7 +832,7 @@ public String toString(int indent, boolean prettyPrint) {
String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
String newLine = prettyPrint ? "\n" : "";
String space = prettyPrint ? " " : "";
- StringBuilder sb = new StringBuilder("StatisItem");
+ StringBuilder sb = new StringBuilder("StatsItem");
sb.append(space);
sb.append("(");
sb.append(newLine);
diff --git a/client/src/main/generated/com/vesoft/nebula/storage/AddEdgesRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/AddEdgesRequest.java
index d0b286198..1f961929d 100644
--- a/client/src/main/generated/com/vesoft/nebula/storage/AddEdgesRequest.java
+++ b/client/src/main/generated/com/vesoft/nebula/storage/AddEdgesRequest.java
@@ -30,15 +30,18 @@ public class AddEdgesRequest implements TBase, java.io.Serializable, Cloneable {
private static final TField PARTS_FIELD_DESC = new TField("parts", TType.MAP, (short)2);
private static final TField PROP_NAMES_FIELD_DESC = new TField("prop_names", TType.LIST, (short)3);
private static final TField IF_NOT_EXISTS_FIELD_DESC = new TField("if_not_exists", TType.BOOL, (short)4);
+ private static final TField COMMON_FIELD_DESC = new TField("common", TType.STRUCT, (short)5);
public int space_id;
public Map> parts;
public List prop_names;
public boolean if_not_exists;
+ public RequestCommon common;
public static final int SPACE_ID = 1;
public static final int PARTS = 2;
public static final int PROP_NAMES = 3;
public static final int IF_NOT_EXISTS = 4;
+ public static final int COMMON = 5;
// isset id assignments
private static final int __SPACE_ID_ISSET_ID = 0;
@@ -61,6 +64,8 @@ public class AddEdgesRequest implements TBase, java.io.Serializable, Cloneable {
new FieldValueMetaData(TType.STRING))));
tmpMetaDataMap.put(IF_NOT_EXISTS, new FieldMetaData("if_not_exists", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.BOOL)));
+ tmpMetaDataMap.put(COMMON, new FieldMetaData("common", TFieldRequirementType.OPTIONAL,
+ new StructMetaData(TType.STRUCT, RequestCommon.class)));
metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
}
@@ -85,11 +90,28 @@ public AddEdgesRequest(
setIf_not_existsIsSet(true);
}
+ public AddEdgesRequest(
+ int space_id,
+ Map> parts,
+ List prop_names,
+ boolean if_not_exists,
+ RequestCommon common) {
+ this();
+ this.space_id = space_id;
+ setSpace_idIsSet(true);
+ this.parts = parts;
+ this.prop_names = prop_names;
+ this.if_not_exists = if_not_exists;
+ setIf_not_existsIsSet(true);
+ this.common = common;
+ }
+
public static class Builder {
private int space_id;
private Map> parts;
private List prop_names;
private boolean if_not_exists;
+ private RequestCommon common;
BitSet __optional_isset = new BitSet(2);
@@ -118,6 +140,11 @@ public Builder setIf_not_exists(final boolean if_not_exists) {
return this;
}
+ public Builder setCommon(final RequestCommon common) {
+ this.common = common;
+ return this;
+ }
+
public AddEdgesRequest build() {
AddEdgesRequest result = new AddEdgesRequest();
if (__optional_isset.get(__SPACE_ID_ISSET_ID)) {
@@ -128,6 +155,7 @@ public AddEdgesRequest build() {
if (__optional_isset.get(__IF_NOT_EXISTS_ISSET_ID)) {
result.setIf_not_exists(this.if_not_exists);
}
+ result.setCommon(this.common);
return result;
}
}
@@ -150,6 +178,9 @@ public AddEdgesRequest(AddEdgesRequest other) {
this.prop_names = TBaseHelper.deepCopy(other.prop_names);
}
this.if_not_exists = TBaseHelper.deepCopy(other.if_not_exists);
+ if (other.isSetCommon()) {
+ this.common = TBaseHelper.deepCopy(other.common);
+ }
}
public AddEdgesRequest deepCopy() {
@@ -250,6 +281,30 @@ public void setIf_not_existsIsSet(boolean __value) {
__isset_bit_vector.set(__IF_NOT_EXISTS_ISSET_ID, __value);
}
+ public RequestCommon getCommon() {
+ return this.common;
+ }
+
+ public AddEdgesRequest setCommon(RequestCommon common) {
+ this.common = common;
+ return this;
+ }
+
+ public void unsetCommon() {
+ this.common = null;
+ }
+
+ // Returns true if field common is set (has been assigned a value) and false otherwise
+ public boolean isSetCommon() {
+ return this.common != null;
+ }
+
+ public void setCommonIsSet(boolean __value) {
+ if (!__value) {
+ this.common = null;
+ }
+ }
+
@SuppressWarnings("unchecked")
public void setFieldValue(int fieldID, Object __value) {
switch (fieldID) {
@@ -285,6 +340,14 @@ public void setFieldValue(int fieldID, Object __value) {
}
break;
+ case COMMON:
+ if (__value == null) {
+ unsetCommon();
+ } else {
+ setCommon((RequestCommon)__value);
+ }
+ break;
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -304,6 +367,9 @@ public Object getFieldValue(int fieldID) {
case IF_NOT_EXISTS:
return new Boolean(isIf_not_exists());
+ case COMMON:
+ return getCommon();
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -327,12 +393,14 @@ public boolean equals(Object _that) {
if (!TBaseHelper.equalsNobinary(this.if_not_exists, that.if_not_exists)) { return false; }
+ if (!TBaseHelper.equalsNobinary(this.isSetCommon(), that.isSetCommon(), this.common, that.common)) { return false; }
+
return true;
}
@Override
public int hashCode() {
- return Arrays.deepHashCode(new Object[] {space_id, parts, prop_names, if_not_exists});
+ return Arrays.deepHashCode(new Object[] {space_id, parts, prop_names, if_not_exists, common});
}
public void read(TProtocol iprot) throws TException {
@@ -357,30 +425,30 @@ public void read(TProtocol iprot) throws TException {
case PARTS:
if (__field.type == TType.MAP) {
{
- TMap _map104 = iprot.readMapBegin();
- this.parts = new HashMap>(Math.max(0, 2*_map104.size));
- for (int _i105 = 0;
- (_map104.size < 0) ? iprot.peekMap() : (_i105 < _map104.size);
- ++_i105)
+ TMap _map109 = iprot.readMapBegin();
+ this.parts = new HashMap>(Math.max(0, 2*_map109.size));
+ for (int _i110 = 0;
+ (_map109.size < 0) ? iprot.peekMap() : (_i110 < _map109.size);
+ ++_i110)
{
- int _key106;
- List _val107;
- _key106 = iprot.readI32();
+ int _key111;
+ List _val112;
+ _key111 = iprot.readI32();
{
- TList _list108 = iprot.readListBegin();
- _val107 = new ArrayList(Math.max(0, _list108.size));
- for (int _i109 = 0;
- (_list108.size < 0) ? iprot.peekList() : (_i109 < _list108.size);
- ++_i109)
+ TList _list113 = iprot.readListBegin();
+ _val112 = new ArrayList(Math.max(0, _list113.size));
+ for (int _i114 = 0;
+ (_list113.size < 0) ? iprot.peekList() : (_i114 < _list113.size);
+ ++_i114)
{
- NewEdge _elem110;
- _elem110 = new NewEdge();
- _elem110.read(iprot);
- _val107.add(_elem110);
+ NewEdge _elem115;
+ _elem115 = new NewEdge();
+ _elem115.read(iprot);
+ _val112.add(_elem115);
}
iprot.readListEnd();
}
- this.parts.put(_key106, _val107);
+ this.parts.put(_key111, _val112);
}
iprot.readMapEnd();
}
@@ -391,15 +459,15 @@ public void read(TProtocol iprot) throws TException {
case PROP_NAMES:
if (__field.type == TType.LIST) {
{
- TList _list111 = iprot.readListBegin();
- this.prop_names = new ArrayList(Math.max(0, _list111.size));
- for (int _i112 = 0;
- (_list111.size < 0) ? iprot.peekList() : (_i112 < _list111.size);
- ++_i112)
+ TList _list116 = iprot.readListBegin();
+ this.prop_names = new ArrayList(Math.max(0, _list116.size));
+ for (int _i117 = 0;
+ (_list116.size < 0) ? iprot.peekList() : (_i117 < _list116.size);
+ ++_i117)
{
- byte[] _elem113;
- _elem113 = iprot.readBinary();
- this.prop_names.add(_elem113);
+ byte[] _elem118;
+ _elem118 = iprot.readBinary();
+ this.prop_names.add(_elem118);
}
iprot.readListEnd();
}
@@ -415,6 +483,14 @@ public void read(TProtocol iprot) throws TException {
TProtocolUtil.skip(iprot, __field.type);
}
break;
+ case COMMON:
+ if (__field.type == TType.STRUCT) {
+ this.common = new RequestCommon();
+ this.common.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
default:
TProtocolUtil.skip(iprot, __field.type);
break;
@@ -439,12 +515,12 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(PARTS_FIELD_DESC);
{
oprot.writeMapBegin(new TMap(TType.I32, TType.LIST, this.parts.size()));
- for (Map.Entry> _iter114 : this.parts.entrySet()) {
- oprot.writeI32(_iter114.getKey());
+ for (Map.Entry> _iter119 : this.parts.entrySet()) {
+ oprot.writeI32(_iter119.getKey());
{
- oprot.writeListBegin(new TList(TType.STRUCT, _iter114.getValue().size()));
- for (NewEdge _iter115 : _iter114.getValue()) {
- _iter115.write(oprot);
+ oprot.writeListBegin(new TList(TType.STRUCT, _iter119.getValue().size()));
+ for (NewEdge _iter120 : _iter119.getValue()) {
+ _iter120.write(oprot);
}
oprot.writeListEnd();
}
@@ -457,8 +533,8 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(PROP_NAMES_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.prop_names.size()));
- for (byte[] _iter116 : this.prop_names) {
- oprot.writeBinary(_iter116);
+ for (byte[] _iter121 : this.prop_names) {
+ oprot.writeBinary(_iter121);
}
oprot.writeListEnd();
}
@@ -467,6 +543,13 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(IF_NOT_EXISTS_FIELD_DESC);
oprot.writeBool(this.if_not_exists);
oprot.writeFieldEnd();
+ if (this.common != null) {
+ if (isSetCommon()) {
+ oprot.writeFieldBegin(COMMON_FIELD_DESC);
+ this.common.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -522,6 +605,20 @@ public String toString(int indent, boolean prettyPrint) {
sb.append(":").append(space);
sb.append(TBaseHelper.toString(this.isIf_not_exists(), indent + 1, prettyPrint));
first = false;
+ if (isSetCommon())
+ {
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("common");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getCommon() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getCommon(), indent + 1, prettyPrint));
+ }
+ first = false;
+ }
sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
sb.append(")");
return sb.toString();
diff --git a/client/src/main/generated/com/vesoft/nebula/storage/AddPartReq.java b/client/src/main/generated/com/vesoft/nebula/storage/AddPartReq.java
index 3f481b463..fffba1d5a 100644
--- a/client/src/main/generated/com/vesoft/nebula/storage/AddPartReq.java
+++ b/client/src/main/generated/com/vesoft/nebula/storage/AddPartReq.java
@@ -419,16 +419,16 @@ public void read(TProtocol iprot) throws TException {
case PEERS:
if (__field.type == TType.LIST) {
{
- TList _list179 = iprot.readListBegin();
- this.peers = new ArrayList(Math.max(0, _list179.size));
- for (int _i180 = 0;
- (_list179.size < 0) ? iprot.peekList() : (_i180 < _list179.size);
- ++_i180)
+ TList _list197 = iprot.readListBegin();
+ this.peers = new ArrayList(Math.max(0, _list197.size));
+ for (int _i198 = 0;
+ (_list197.size < 0) ? iprot.peekList() : (_i198 < _list197.size);
+ ++_i198)
{
- com.vesoft.nebula.HostAddr _elem181;
- _elem181 = new com.vesoft.nebula.HostAddr();
- _elem181.read(iprot);
- this.peers.add(_elem181);
+ com.vesoft.nebula.HostAddr _elem199;
+ _elem199 = new com.vesoft.nebula.HostAddr();
+ _elem199.read(iprot);
+ this.peers.add(_elem199);
}
iprot.readListEnd();
}
@@ -466,8 +466,8 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(PEERS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.peers.size()));
- for (com.vesoft.nebula.HostAddr _iter182 : this.peers) {
- _iter182.write(oprot);
+ for (com.vesoft.nebula.HostAddr _iter200 : this.peers) {
+ _iter200.write(oprot);
}
oprot.writeListEnd();
}
diff --git a/client/src/main/generated/com/vesoft/nebula/storage/AddVerticesRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/AddVerticesRequest.java
index 3b44ec4e0..653892acd 100644
--- a/client/src/main/generated/com/vesoft/nebula/storage/AddVerticesRequest.java
+++ b/client/src/main/generated/com/vesoft/nebula/storage/AddVerticesRequest.java
@@ -30,15 +30,18 @@ public class AddVerticesRequest implements TBase, java.io.Serializable, Cloneabl
private static final TField PARTS_FIELD_DESC = new TField("parts", TType.MAP, (short)2);
private static final TField PROP_NAMES_FIELD_DESC = new TField("prop_names", TType.MAP, (short)3);
private static final TField IF_NOT_EXISTS_FIELD_DESC = new TField("if_not_exists", TType.BOOL, (short)4);
+ private static final TField COMMON_FIELD_DESC = new TField("common", TType.STRUCT, (short)5);
public int space_id;
public Map> parts;
public Map> prop_names;
public boolean if_not_exists;
+ public RequestCommon common;
public static final int SPACE_ID = 1;
public static final int PARTS = 2;
public static final int PROP_NAMES = 3;
public static final int IF_NOT_EXISTS = 4;
+ public static final int COMMON = 5;
// isset id assignments
private static final int __SPACE_ID_ISSET_ID = 0;
@@ -63,6 +66,8 @@ public class AddVerticesRequest implements TBase, java.io.Serializable, Cloneabl
new FieldValueMetaData(TType.STRING)))));
tmpMetaDataMap.put(IF_NOT_EXISTS, new FieldMetaData("if_not_exists", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.BOOL)));
+ tmpMetaDataMap.put(COMMON, new FieldMetaData("common", TFieldRequirementType.OPTIONAL,
+ new StructMetaData(TType.STRUCT, RequestCommon.class)));
metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
}
@@ -87,11 +92,28 @@ public AddVerticesRequest(
setIf_not_existsIsSet(true);
}
+ public AddVerticesRequest(
+ int space_id,
+ Map> parts,
+ Map> prop_names,
+ boolean if_not_exists,
+ RequestCommon common) {
+ this();
+ this.space_id = space_id;
+ setSpace_idIsSet(true);
+ this.parts = parts;
+ this.prop_names = prop_names;
+ this.if_not_exists = if_not_exists;
+ setIf_not_existsIsSet(true);
+ this.common = common;
+ }
+
public static class Builder {
private int space_id;
private Map> parts;
private Map> prop_names;
private boolean if_not_exists;
+ private RequestCommon common;
BitSet __optional_isset = new BitSet(2);
@@ -120,6 +142,11 @@ public Builder setIf_not_exists(final boolean if_not_exists) {
return this;
}
+ public Builder setCommon(final RequestCommon common) {
+ this.common = common;
+ return this;
+ }
+
public AddVerticesRequest build() {
AddVerticesRequest result = new AddVerticesRequest();
if (__optional_isset.get(__SPACE_ID_ISSET_ID)) {
@@ -130,6 +157,7 @@ public AddVerticesRequest build() {
if (__optional_isset.get(__IF_NOT_EXISTS_ISSET_ID)) {
result.setIf_not_exists(this.if_not_exists);
}
+ result.setCommon(this.common);
return result;
}
}
@@ -152,6 +180,9 @@ public AddVerticesRequest(AddVerticesRequest other) {
this.prop_names = TBaseHelper.deepCopy(other.prop_names);
}
this.if_not_exists = TBaseHelper.deepCopy(other.if_not_exists);
+ if (other.isSetCommon()) {
+ this.common = TBaseHelper.deepCopy(other.common);
+ }
}
public AddVerticesRequest deepCopy() {
@@ -252,6 +283,30 @@ public void setIf_not_existsIsSet(boolean __value) {
__isset_bit_vector.set(__IF_NOT_EXISTS_ISSET_ID, __value);
}
+ public RequestCommon getCommon() {
+ return this.common;
+ }
+
+ public AddVerticesRequest setCommon(RequestCommon common) {
+ this.common = common;
+ return this;
+ }
+
+ public void unsetCommon() {
+ this.common = null;
+ }
+
+ // Returns true if field common is set (has been assigned a value) and false otherwise
+ public boolean isSetCommon() {
+ return this.common != null;
+ }
+
+ public void setCommonIsSet(boolean __value) {
+ if (!__value) {
+ this.common = null;
+ }
+ }
+
@SuppressWarnings("unchecked")
public void setFieldValue(int fieldID, Object __value) {
switch (fieldID) {
@@ -287,6 +342,14 @@ public void setFieldValue(int fieldID, Object __value) {
}
break;
+ case COMMON:
+ if (__value == null) {
+ unsetCommon();
+ } else {
+ setCommon((RequestCommon)__value);
+ }
+ break;
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -306,6 +369,9 @@ public Object getFieldValue(int fieldID) {
case IF_NOT_EXISTS:
return new Boolean(isIf_not_exists());
+ case COMMON:
+ return getCommon();
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -329,12 +395,14 @@ public boolean equals(Object _that) {
if (!TBaseHelper.equalsNobinary(this.if_not_exists, that.if_not_exists)) { return false; }
+ if (!TBaseHelper.equalsNobinary(this.isSetCommon(), that.isSetCommon(), this.common, that.common)) { return false; }
+
return true;
}
@Override
public int hashCode() {
- return Arrays.deepHashCode(new Object[] {space_id, parts, prop_names, if_not_exists});
+ return Arrays.deepHashCode(new Object[] {space_id, parts, prop_names, if_not_exists, common});
}
public void read(TProtocol iprot) throws TException {
@@ -359,30 +427,30 @@ public void read(TProtocol iprot) throws TException {
case PARTS:
if (__field.type == TType.MAP) {
{
- TMap _map86 = iprot.readMapBegin();
- this.parts = new HashMap>(Math.max(0, 2*_map86.size));
- for (int _i87 = 0;
- (_map86.size < 0) ? iprot.peekMap() : (_i87 < _map86.size);
- ++_i87)
+ TMap _map91 = iprot.readMapBegin();
+ this.parts = new HashMap>(Math.max(0, 2*_map91.size));
+ for (int _i92 = 0;
+ (_map91.size < 0) ? iprot.peekMap() : (_i92 < _map91.size);
+ ++_i92)
{
- int _key88;
- List _val89;
- _key88 = iprot.readI32();
+ int _key93;
+ List _val94;
+ _key93 = iprot.readI32();
{
- TList _list90 = iprot.readListBegin();
- _val89 = new ArrayList(Math.max(0, _list90.size));
- for (int _i91 = 0;
- (_list90.size < 0) ? iprot.peekList() : (_i91 < _list90.size);
- ++_i91)
+ TList _list95 = iprot.readListBegin();
+ _val94 = new ArrayList(Math.max(0, _list95.size));
+ for (int _i96 = 0;
+ (_list95.size < 0) ? iprot.peekList() : (_i96 < _list95.size);
+ ++_i96)
{
- NewVertex _elem92;
- _elem92 = new NewVertex();
- _elem92.read(iprot);
- _val89.add(_elem92);
+ NewVertex _elem97;
+ _elem97 = new NewVertex();
+ _elem97.read(iprot);
+ _val94.add(_elem97);
}
iprot.readListEnd();
}
- this.parts.put(_key88, _val89);
+ this.parts.put(_key93, _val94);
}
iprot.readMapEnd();
}
@@ -393,29 +461,29 @@ public void read(TProtocol iprot) throws TException {
case PROP_NAMES:
if (__field.type == TType.MAP) {
{
- TMap _map93 = iprot.readMapBegin();
- this.prop_names = new HashMap>(Math.max(0, 2*_map93.size));
- for (int _i94 = 0;
- (_map93.size < 0) ? iprot.peekMap() : (_i94 < _map93.size);
- ++_i94)
+ TMap _map98 = iprot.readMapBegin();
+ this.prop_names = new HashMap>(Math.max(0, 2*_map98.size));
+ for (int _i99 = 0;
+ (_map98.size < 0) ? iprot.peekMap() : (_i99 < _map98.size);
+ ++_i99)
{
- int _key95;
- List _val96;
- _key95 = iprot.readI32();
+ int _key100;
+ List _val101;
+ _key100 = iprot.readI32();
{
- TList _list97 = iprot.readListBegin();
- _val96 = new ArrayList(Math.max(0, _list97.size));
- for (int _i98 = 0;
- (_list97.size < 0) ? iprot.peekList() : (_i98 < _list97.size);
- ++_i98)
+ TList _list102 = iprot.readListBegin();
+ _val101 = new ArrayList(Math.max(0, _list102.size));
+ for (int _i103 = 0;
+ (_list102.size < 0) ? iprot.peekList() : (_i103 < _list102.size);
+ ++_i103)
{
- byte[] _elem99;
- _elem99 = iprot.readBinary();
- _val96.add(_elem99);
+ byte[] _elem104;
+ _elem104 = iprot.readBinary();
+ _val101.add(_elem104);
}
iprot.readListEnd();
}
- this.prop_names.put(_key95, _val96);
+ this.prop_names.put(_key100, _val101);
}
iprot.readMapEnd();
}
@@ -431,6 +499,14 @@ public void read(TProtocol iprot) throws TException {
TProtocolUtil.skip(iprot, __field.type);
}
break;
+ case COMMON:
+ if (__field.type == TType.STRUCT) {
+ this.common = new RequestCommon();
+ this.common.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
default:
TProtocolUtil.skip(iprot, __field.type);
break;
@@ -455,12 +531,12 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(PARTS_FIELD_DESC);
{
oprot.writeMapBegin(new TMap(TType.I32, TType.LIST, this.parts.size()));
- for (Map.Entry> _iter100 : this.parts.entrySet()) {
- oprot.writeI32(_iter100.getKey());
+ for (Map.Entry> _iter105 : this.parts.entrySet()) {
+ oprot.writeI32(_iter105.getKey());
{
- oprot.writeListBegin(new TList(TType.STRUCT, _iter100.getValue().size()));
- for (NewVertex _iter101 : _iter100.getValue()) {
- _iter101.write(oprot);
+ oprot.writeListBegin(new TList(TType.STRUCT, _iter105.getValue().size()));
+ for (NewVertex _iter106 : _iter105.getValue()) {
+ _iter106.write(oprot);
}
oprot.writeListEnd();
}
@@ -473,12 +549,12 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(PROP_NAMES_FIELD_DESC);
{
oprot.writeMapBegin(new TMap(TType.I32, TType.LIST, this.prop_names.size()));
- for (Map.Entry> _iter102 : this.prop_names.entrySet()) {
- oprot.writeI32(_iter102.getKey());
+ for (Map.Entry> _iter107 : this.prop_names.entrySet()) {
+ oprot.writeI32(_iter107.getKey());
{
- oprot.writeListBegin(new TList(TType.STRING, _iter102.getValue().size()));
- for (byte[] _iter103 : _iter102.getValue()) {
- oprot.writeBinary(_iter103);
+ oprot.writeListBegin(new TList(TType.STRING, _iter107.getValue().size()));
+ for (byte[] _iter108 : _iter107.getValue()) {
+ oprot.writeBinary(_iter108);
}
oprot.writeListEnd();
}
@@ -490,6 +566,13 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(IF_NOT_EXISTS_FIELD_DESC);
oprot.writeBool(this.if_not_exists);
oprot.writeFieldEnd();
+ if (this.common != null) {
+ if (isSetCommon()) {
+ oprot.writeFieldBegin(COMMON_FIELD_DESC);
+ this.common.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -545,6 +628,20 @@ public String toString(int indent, boolean prettyPrint) {
sb.append(":").append(space);
sb.append(TBaseHelper.toString(this.isIf_not_exists(), indent + 1, prettyPrint));
first = false;
+ if (isSetCommon())
+ {
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("common");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getCommon() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getCommon(), indent + 1, prettyPrint));
+ }
+ first = false;
+ }
sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
sb.append(")");
return sb.toString();
diff --git a/client/src/main/generated/com/vesoft/nebula/storage/AdminExecResp.java b/client/src/main/generated/com/vesoft/nebula/storage/AdminExecResp.java
index 6ff9e5f7c..cc955ace1 100644
--- a/client/src/main/generated/com/vesoft/nebula/storage/AdminExecResp.java
+++ b/client/src/main/generated/com/vesoft/nebula/storage/AdminExecResp.java
@@ -27,12 +27,12 @@
public class AdminExecResp implements TBase, java.io.Serializable, Cloneable, Comparable {
private static final TStruct STRUCT_DESC = new TStruct("AdminExecResp");
private static final TField RESULT_FIELD_DESC = new TField("result", TType.STRUCT, (short)1);
- private static final TField STATIS_FIELD_DESC = new TField("statis", TType.STRUCT, (short)2);
+ private static final TField STATS_FIELD_DESC = new TField("stats", TType.STRUCT, (short)2);
public ResponseCommon result;
- public com.vesoft.nebula.meta.StatisItem statis;
+ public com.vesoft.nebula.meta.StatsItem stats;
public static final int RESULT = 1;
- public static final int STATIS = 2;
+ public static final int STATS = 2;
// isset id assignments
@@ -42,8 +42,8 @@ public class AdminExecResp implements TBase, java.io.Serializable, Cloneable, Co
Map tmpMetaDataMap = new HashMap();
tmpMetaDataMap.put(RESULT, new FieldMetaData("result", TFieldRequirementType.REQUIRED,
new StructMetaData(TType.STRUCT, ResponseCommon.class)));
- tmpMetaDataMap.put(STATIS, new FieldMetaData("statis", TFieldRequirementType.OPTIONAL,
- new StructMetaData(TType.STRUCT, com.vesoft.nebula.meta.StatisItem.class)));
+ tmpMetaDataMap.put(STATS, new FieldMetaData("stats", TFieldRequirementType.OPTIONAL,
+ new StructMetaData(TType.STRUCT, com.vesoft.nebula.meta.StatsItem.class)));
metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
}
@@ -62,15 +62,15 @@ public AdminExecResp(
public AdminExecResp(
ResponseCommon result,
- com.vesoft.nebula.meta.StatisItem statis) {
+ com.vesoft.nebula.meta.StatsItem stats) {
this();
this.result = result;
- this.statis = statis;
+ this.stats = stats;
}
public static class Builder {
private ResponseCommon result;
- private com.vesoft.nebula.meta.StatisItem statis;
+ private com.vesoft.nebula.meta.StatsItem stats;
public Builder() {
}
@@ -80,15 +80,15 @@ public Builder setResult(final ResponseCommon result) {
return this;
}
- public Builder setStatis(final com.vesoft.nebula.meta.StatisItem statis) {
- this.statis = statis;
+ public Builder setStats(final com.vesoft.nebula.meta.StatsItem stats) {
+ this.stats = stats;
return this;
}
public AdminExecResp build() {
AdminExecResp result = new AdminExecResp();
result.setResult(this.result);
- result.setStatis(this.statis);
+ result.setStats(this.stats);
return result;
}
}
@@ -104,8 +104,8 @@ public AdminExecResp(AdminExecResp other) {
if (other.isSetResult()) {
this.result = TBaseHelper.deepCopy(other.result);
}
- if (other.isSetStatis()) {
- this.statis = TBaseHelper.deepCopy(other.statis);
+ if (other.isSetStats()) {
+ this.stats = TBaseHelper.deepCopy(other.stats);
}
}
@@ -137,27 +137,27 @@ public void setResultIsSet(boolean __value) {
}
}
- public com.vesoft.nebula.meta.StatisItem getStatis() {
- return this.statis;
+ public com.vesoft.nebula.meta.StatsItem getStats() {
+ return this.stats;
}
- public AdminExecResp setStatis(com.vesoft.nebula.meta.StatisItem statis) {
- this.statis = statis;
+ public AdminExecResp setStats(com.vesoft.nebula.meta.StatsItem stats) {
+ this.stats = stats;
return this;
}
- public void unsetStatis() {
- this.statis = null;
+ public void unsetStats() {
+ this.stats = null;
}
- // Returns true if field statis is set (has been assigned a value) and false otherwise
- public boolean isSetStatis() {
- return this.statis != null;
+ // Returns true if field stats is set (has been assigned a value) and false otherwise
+ public boolean isSetStats() {
+ return this.stats != null;
}
- public void setStatisIsSet(boolean __value) {
+ public void setStatsIsSet(boolean __value) {
if (!__value) {
- this.statis = null;
+ this.stats = null;
}
}
@@ -171,11 +171,11 @@ public void setFieldValue(int fieldID, Object __value) {
}
break;
- case STATIS:
+ case STATS:
if (__value == null) {
- unsetStatis();
+ unsetStats();
} else {
- setStatis((com.vesoft.nebula.meta.StatisItem)__value);
+ setStats((com.vesoft.nebula.meta.StatsItem)__value);
}
break;
@@ -189,8 +189,8 @@ public Object getFieldValue(int fieldID) {
case RESULT:
return getResult();
- case STATIS:
- return getStatis();
+ case STATS:
+ return getStats();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
@@ -209,14 +209,14 @@ public boolean equals(Object _that) {
if (!TBaseHelper.equalsNobinary(this.isSetResult(), that.isSetResult(), this.result, that.result)) { return false; }
- if (!TBaseHelper.equalsNobinary(this.isSetStatis(), that.isSetStatis(), this.statis, that.statis)) { return false; }
+ if (!TBaseHelper.equalsNobinary(this.isSetStats(), that.isSetStats(), this.stats, that.stats)) { return false; }
return true;
}
@Override
public int hashCode() {
- return Arrays.deepHashCode(new Object[] {result, statis});
+ return Arrays.deepHashCode(new Object[] {result, stats});
}
@Override
@@ -239,11 +239,11 @@ public int compareTo(AdminExecResp other) {
if (lastComparison != 0) {
return lastComparison;
}
- lastComparison = Boolean.valueOf(isSetStatis()).compareTo(other.isSetStatis());
+ lastComparison = Boolean.valueOf(isSetStats()).compareTo(other.isSetStats());
if (lastComparison != 0) {
return lastComparison;
}
- lastComparison = TBaseHelper.compareTo(statis, other.statis);
+ lastComparison = TBaseHelper.compareTo(stats, other.stats);
if (lastComparison != 0) {
return lastComparison;
}
@@ -269,10 +269,10 @@ public void read(TProtocol iprot) throws TException {
TProtocolUtil.skip(iprot, __field.type);
}
break;
- case STATIS:
+ case STATS:
if (__field.type == TType.STRUCT) {
- this.statis = new com.vesoft.nebula.meta.StatisItem();
- this.statis.read(iprot);
+ this.stats = new com.vesoft.nebula.meta.StatsItem();
+ this.stats.read(iprot);
} else {
TProtocolUtil.skip(iprot, __field.type);
}
@@ -299,10 +299,10 @@ public void write(TProtocol oprot) throws TException {
this.result.write(oprot);
oprot.writeFieldEnd();
}
- if (this.statis != null) {
- if (isSetStatis()) {
- oprot.writeFieldBegin(STATIS_FIELD_DESC);
- this.statis.write(oprot);
+ if (this.stats != null) {
+ if (isSetStats()) {
+ oprot.writeFieldBegin(STATS_FIELD_DESC);
+ this.stats.write(oprot);
oprot.writeFieldEnd();
}
}
@@ -336,17 +336,17 @@ public String toString(int indent, boolean prettyPrint) {
sb.append(TBaseHelper.toString(this.getResult(), indent + 1, prettyPrint));
}
first = false;
- if (isSetStatis())
+ if (isSetStats())
{
if (!first) sb.append("," + newLine);
sb.append(indentStr);
- sb.append("statis");
+ sb.append("stats");
sb.append(space);
sb.append(":").append(space);
- if (this.getStatis() == null) {
+ if (this.getStats() == null) {
sb.append("null");
} else {
- sb.append(TBaseHelper.toString(this.getStatis(), indent + 1, prettyPrint));
+ sb.append(TBaseHelper.toString(this.getStats(), indent + 1, prettyPrint));
}
first = false;
}
diff --git a/client/src/main/generated/com/vesoft/nebula/storage/CheckPeersReq.java b/client/src/main/generated/com/vesoft/nebula/storage/CheckPeersReq.java
index a765bc1d6..d49344245 100644
--- a/client/src/main/generated/com/vesoft/nebula/storage/CheckPeersReq.java
+++ b/client/src/main/generated/com/vesoft/nebula/storage/CheckPeersReq.java
@@ -347,16 +347,16 @@ public void read(TProtocol iprot) throws TException {
case PEERS:
if (__field.type == TType.LIST) {
{
- TList _list192 = iprot.readListBegin();
- this.peers = new ArrayList(Math.max(0, _list192.size));
- for (int _i193 = 0;
- (_list192.size < 0) ? iprot.peekList() : (_i193 < _list192.size);
- ++_i193)
+ TList _list210 = iprot.readListBegin();
+ this.peers = new ArrayList(Math.max(0, _list210.size));
+ for (int _i211 = 0;
+ (_list210.size < 0) ? iprot.peekList() : (_i211 < _list210.size);
+ ++_i211)
{
- com.vesoft.nebula.HostAddr _elem194;
- _elem194 = new com.vesoft.nebula.HostAddr();
- _elem194.read(iprot);
- this.peers.add(_elem194);
+ com.vesoft.nebula.HostAddr _elem212;
+ _elem212 = new com.vesoft.nebula.HostAddr();
+ _elem212.read(iprot);
+ this.peers.add(_elem212);
}
iprot.readListEnd();
}
@@ -391,8 +391,8 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(PEERS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.peers.size()));
- for (com.vesoft.nebula.HostAddr _iter195 : this.peers) {
- _iter195.write(oprot);
+ for (com.vesoft.nebula.HostAddr _iter213 : this.peers) {
+ _iter213.write(oprot);
}
oprot.writeListEnd();
}
diff --git a/client/src/main/generated/com/vesoft/nebula/storage/CreateCPResp.java b/client/src/main/generated/com/vesoft/nebula/storage/CreateCPResp.java
index 7dee66695..d0915204b 100644
--- a/client/src/main/generated/com/vesoft/nebula/storage/CreateCPResp.java
+++ b/client/src/main/generated/com/vesoft/nebula/storage/CreateCPResp.java
@@ -274,16 +274,16 @@ public void read(TProtocol iprot) throws TException {
case INFO:
if (__field.type == TType.LIST) {
{
- TList _list200 = iprot.readListBegin();
- this.info = new ArrayList(Math.max(0, _list200.size));
- for (int _i201 = 0;
- (_list200.size < 0) ? iprot.peekList() : (_i201 < _list200.size);
- ++_i201)
+ TList _list218 = iprot.readListBegin();
+ this.info = new ArrayList(Math.max(0, _list218.size));
+ for (int _i219 = 0;
+ (_list218.size < 0) ? iprot.peekList() : (_i219 < _list218.size);
+ ++_i219)
{
- com.vesoft.nebula.CheckpointInfo _elem202;
- _elem202 = new com.vesoft.nebula.CheckpointInfo();
- _elem202.read(iprot);
- this.info.add(_elem202);
+ com.vesoft.nebula.CheckpointInfo _elem220;
+ _elem220 = new com.vesoft.nebula.CheckpointInfo();
+ _elem220.read(iprot);
+ this.info.add(_elem220);
}
iprot.readListEnd();
}
@@ -317,8 +317,8 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(INFO_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.info.size()));
- for (com.vesoft.nebula.CheckpointInfo _iter203 : this.info) {
- _iter203.write(oprot);
+ for (com.vesoft.nebula.CheckpointInfo _iter221 : this.info) {
+ _iter221.write(oprot);
}
oprot.writeListEnd();
}
diff --git a/client/src/main/generated/com/vesoft/nebula/storage/DelTags.java b/client/src/main/generated/com/vesoft/nebula/storage/DelTags.java
new file mode 100644
index 000000000..0fcd2f118
--- /dev/null
+++ b/client/src/main/generated/com/vesoft/nebula/storage/DelTags.java
@@ -0,0 +1,340 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package com.vesoft.nebula.storage;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.util.Arrays;
+import com.facebook.thrift.*;
+import com.facebook.thrift.annotations.*;
+import com.facebook.thrift.async.*;
+import com.facebook.thrift.meta_data.*;
+import com.facebook.thrift.server.*;
+import com.facebook.thrift.transport.*;
+import com.facebook.thrift.protocol.*;
+
+@SuppressWarnings({ "unused", "serial" })
+public class DelTags implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("DelTags");
+ private static final TField ID_FIELD_DESC = new TField("id", TType.STRUCT, (short)1);
+ private static final TField TAGS_FIELD_DESC = new TField("tags", TType.LIST, (short)2);
+
+ public com.vesoft.nebula.Value id;
+ public List tags;
+ public static final int ID = 1;
+ public static final int TAGS = 2;
+
+ // isset id assignments
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, com.vesoft.nebula.Value.class)));
+ tmpMetaDataMap.put(TAGS, new FieldMetaData("tags", TFieldRequirementType.DEFAULT,
+ new ListMetaData(TType.LIST,
+ new FieldValueMetaData(TType.I32))));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(DelTags.class, metaDataMap);
+ }
+
+ public DelTags() {
+ }
+
+ public DelTags(
+ com.vesoft.nebula.Value id,
+ List tags) {
+ this();
+ this.id = id;
+ this.tags = tags;
+ }
+
+ public static class Builder {
+ private com.vesoft.nebula.Value id;
+ private List tags;
+
+ public Builder() {
+ }
+
+ public Builder setId(final com.vesoft.nebula.Value id) {
+ this.id = id;
+ return this;
+ }
+
+ public Builder setTags(final List tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ public DelTags build() {
+ DelTags result = new DelTags();
+ result.setId(this.id);
+ result.setTags(this.tags);
+ return result;
+ }
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public DelTags(DelTags other) {
+ if (other.isSetId()) {
+ this.id = TBaseHelper.deepCopy(other.id);
+ }
+ if (other.isSetTags()) {
+ this.tags = TBaseHelper.deepCopy(other.tags);
+ }
+ }
+
+ public DelTags deepCopy() {
+ return new DelTags(this);
+ }
+
+ public com.vesoft.nebula.Value getId() {
+ return this.id;
+ }
+
+ public DelTags setId(com.vesoft.nebula.Value id) {
+ this.id = id;
+ return this;
+ }
+
+ public void unsetId() {
+ this.id = null;
+ }
+
+ // Returns true if field id is set (has been assigned a value) and false otherwise
+ public boolean isSetId() {
+ return this.id != null;
+ }
+
+ public void setIdIsSet(boolean __value) {
+ if (!__value) {
+ this.id = null;
+ }
+ }
+
+ public List getTags() {
+ return this.tags;
+ }
+
+ public DelTags setTags(List tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ public void unsetTags() {
+ this.tags = null;
+ }
+
+ // Returns true if field tags is set (has been assigned a value) and false otherwise
+ public boolean isSetTags() {
+ return this.tags != null;
+ }
+
+ public void setTagsIsSet(boolean __value) {
+ if (!__value) {
+ this.tags = null;
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case ID:
+ if (__value == null) {
+ unsetId();
+ } else {
+ setId((com.vesoft.nebula.Value)__value);
+ }
+ break;
+
+ case TAGS:
+ if (__value == null) {
+ unsetTags();
+ } else {
+ setTags((List)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case ID:
+ return getId();
+
+ case TAGS:
+ return getTags();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof DelTags))
+ return false;
+ DelTags that = (DelTags)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.isSetId(), that.isSetId(), this.id, that.id)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.isSetTags(), that.isSetTags(), this.tags, that.tags)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {id, tags});
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case ID:
+ if (__field.type == TType.STRUCT) {
+ this.id = new com.vesoft.nebula.Value();
+ this.id.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case TAGS:
+ if (__field.type == TType.LIST) {
+ {
+ TList _list140 = iprot.readListBegin();
+ this.tags = new ArrayList(Math.max(0, _list140.size));
+ for (int _i141 = 0;
+ (_list140.size < 0) ? iprot.peekList() : (_i141 < _list140.size);
+ ++_i141)
+ {
+ int _elem142;
+ _elem142 = iprot.readI32();
+ this.tags.add(_elem142);
+ }
+ iprot.readListEnd();
+ }
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.id != null) {
+ oprot.writeFieldBegin(ID_FIELD_DESC);
+ this.id.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (this.tags != null) {
+ oprot.writeFieldBegin(TAGS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new TList(TType.I32, this.tags.size()));
+ for (int _iter143 : this.tags) {
+ oprot.writeI32(_iter143);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("DelTags");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("id");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getId() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getId(), indent + 1, prettyPrint));
+ }
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("tags");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getTags() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getTags(), indent + 1, prettyPrint));
+ }
+ first = false;
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+}
+
diff --git a/client/src/main/generated/com/vesoft/nebula/storage/DeleteEdgesRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/DeleteEdgesRequest.java
index 10ffc1b7b..e2b906471 100644
--- a/client/src/main/generated/com/vesoft/nebula/storage/DeleteEdgesRequest.java
+++ b/client/src/main/generated/com/vesoft/nebula/storage/DeleteEdgesRequest.java
@@ -28,11 +28,14 @@ public class DeleteEdgesRequest implements TBase, java.io.Serializable, Cloneabl
private static final TStruct STRUCT_DESC = new TStruct("DeleteEdgesRequest");
private static final TField SPACE_ID_FIELD_DESC = new TField("space_id", TType.I32, (short)1);
private static final TField PARTS_FIELD_DESC = new TField("parts", TType.MAP, (short)2);
+ private static final TField COMMON_FIELD_DESC = new TField("common", TType.STRUCT, (short)3);
public int space_id;
public Map> parts;
+ public RequestCommon common;
public static final int SPACE_ID = 1;
public static final int PARTS = 2;
+ public static final int COMMON = 3;
// isset id assignments
private static final int __SPACE_ID_ISSET_ID = 0;
@@ -49,6 +52,8 @@ public class DeleteEdgesRequest implements TBase, java.io.Serializable, Cloneabl
new FieldValueMetaData(TType.I32),
new ListMetaData(TType.LIST,
new StructMetaData(TType.STRUCT, EdgeKey.class)))));
+ tmpMetaDataMap.put(COMMON, new FieldMetaData("common", TFieldRequirementType.OPTIONAL,
+ new StructMetaData(TType.STRUCT, RequestCommon.class)));
metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
}
@@ -68,9 +73,21 @@ public DeleteEdgesRequest(
this.parts = parts;
}
+ public DeleteEdgesRequest(
+ int space_id,
+ Map> parts,
+ RequestCommon common) {
+ this();
+ this.space_id = space_id;
+ setSpace_idIsSet(true);
+ this.parts = parts;
+ this.common = common;
+ }
+
public static class Builder {
private int space_id;
private Map> parts;
+ private RequestCommon common;
BitSet __optional_isset = new BitSet(1);
@@ -88,12 +105,18 @@ public Builder setParts(final Map> parts) {
return this;
}
+ public Builder setCommon(final RequestCommon common) {
+ this.common = common;
+ return this;
+ }
+
public DeleteEdgesRequest build() {
DeleteEdgesRequest result = new DeleteEdgesRequest();
if (__optional_isset.get(__SPACE_ID_ISSET_ID)) {
result.setSpace_id(this.space_id);
}
result.setParts(this.parts);
+ result.setCommon(this.common);
return result;
}
}
@@ -112,6 +135,9 @@ public DeleteEdgesRequest(DeleteEdgesRequest other) {
if (other.isSetParts()) {
this.parts = TBaseHelper.deepCopy(other.parts);
}
+ if (other.isSetCommon()) {
+ this.common = TBaseHelper.deepCopy(other.common);
+ }
}
public DeleteEdgesRequest deepCopy() {
@@ -165,6 +191,30 @@ public void setPartsIsSet(boolean __value) {
}
}
+ public RequestCommon getCommon() {
+ return this.common;
+ }
+
+ public DeleteEdgesRequest setCommon(RequestCommon common) {
+ this.common = common;
+ return this;
+ }
+
+ public void unsetCommon() {
+ this.common = null;
+ }
+
+ // Returns true if field common is set (has been assigned a value) and false otherwise
+ public boolean isSetCommon() {
+ return this.common != null;
+ }
+
+ public void setCommonIsSet(boolean __value) {
+ if (!__value) {
+ this.common = null;
+ }
+ }
+
@SuppressWarnings("unchecked")
public void setFieldValue(int fieldID, Object __value) {
switch (fieldID) {
@@ -184,6 +234,14 @@ public void setFieldValue(int fieldID, Object __value) {
}
break;
+ case COMMON:
+ if (__value == null) {
+ unsetCommon();
+ } else {
+ setCommon((RequestCommon)__value);
+ }
+ break;
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -197,6 +255,9 @@ public Object getFieldValue(int fieldID) {
case PARTS:
return getParts();
+ case COMMON:
+ return getCommon();
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -216,12 +277,14 @@ public boolean equals(Object _that) {
if (!TBaseHelper.equalsNobinary(this.isSetParts(), that.isSetParts(), this.parts, that.parts)) { return false; }
+ if (!TBaseHelper.equalsNobinary(this.isSetCommon(), that.isSetCommon(), this.common, that.common)) { return false; }
+
return true;
}
@Override
public int hashCode() {
- return Arrays.deepHashCode(new Object[] {space_id, parts});
+ return Arrays.deepHashCode(new Object[] {space_id, parts, common});
}
public void read(TProtocol iprot) throws TException {
@@ -246,30 +309,30 @@ public void read(TProtocol iprot) throws TException {
case PARTS:
if (__field.type == TType.MAP) {
{
- TMap _map126 = iprot.readMapBegin();
- this.parts = new HashMap>(Math.max(0, 2*_map126.size));
- for (int _i127 = 0;
- (_map126.size < 0) ? iprot.peekMap() : (_i127 < _map126.size);
- ++_i127)
+ TMap _map131 = iprot.readMapBegin();
+ this.parts = new HashMap>(Math.max(0, 2*_map131.size));
+ for (int _i132 = 0;
+ (_map131.size < 0) ? iprot.peekMap() : (_i132 < _map131.size);
+ ++_i132)
{
- int _key128;
- List _val129;
- _key128 = iprot.readI32();
+ int _key133;
+ List _val134;
+ _key133 = iprot.readI32();
{
- TList _list130 = iprot.readListBegin();
- _val129 = new ArrayList(Math.max(0, _list130.size));
- for (int _i131 = 0;
- (_list130.size < 0) ? iprot.peekList() : (_i131 < _list130.size);
- ++_i131)
+ TList _list135 = iprot.readListBegin();
+ _val134 = new ArrayList(Math.max(0, _list135.size));
+ for (int _i136 = 0;
+ (_list135.size < 0) ? iprot.peekList() : (_i136 < _list135.size);
+ ++_i136)
{
- EdgeKey _elem132;
- _elem132 = new EdgeKey();
- _elem132.read(iprot);
- _val129.add(_elem132);
+ EdgeKey _elem137;
+ _elem137 = new EdgeKey();
+ _elem137.read(iprot);
+ _val134.add(_elem137);
}
iprot.readListEnd();
}
- this.parts.put(_key128, _val129);
+ this.parts.put(_key133, _val134);
}
iprot.readMapEnd();
}
@@ -277,6 +340,14 @@ public void read(TProtocol iprot) throws TException {
TProtocolUtil.skip(iprot, __field.type);
}
break;
+ case COMMON:
+ if (__field.type == TType.STRUCT) {
+ this.common = new RequestCommon();
+ this.common.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
default:
TProtocolUtil.skip(iprot, __field.type);
break;
@@ -301,12 +372,12 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(PARTS_FIELD_DESC);
{
oprot.writeMapBegin(new TMap(TType.I32, TType.LIST, this.parts.size()));
- for (Map.Entry> _iter133 : this.parts.entrySet()) {
- oprot.writeI32(_iter133.getKey());
+ for (Map.Entry> _iter138 : this.parts.entrySet()) {
+ oprot.writeI32(_iter138.getKey());
{
- oprot.writeListBegin(new TList(TType.STRUCT, _iter133.getValue().size()));
- for (EdgeKey _iter134 : _iter133.getValue()) {
- _iter134.write(oprot);
+ oprot.writeListBegin(new TList(TType.STRUCT, _iter138.getValue().size()));
+ for (EdgeKey _iter139 : _iter138.getValue()) {
+ _iter139.write(oprot);
}
oprot.writeListEnd();
}
@@ -315,6 +386,13 @@ public void write(TProtocol oprot) throws TException {
}
oprot.writeFieldEnd();
}
+ if (this.common != null) {
+ if (isSetCommon()) {
+ oprot.writeFieldBegin(COMMON_FIELD_DESC);
+ this.common.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -352,6 +430,20 @@ public String toString(int indent, boolean prettyPrint) {
sb.append(TBaseHelper.toString(this.getParts(), indent + 1, prettyPrint));
}
first = false;
+ if (isSetCommon())
+ {
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("common");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getCommon() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getCommon(), indent + 1, prettyPrint));
+ }
+ first = false;
+ }
sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
sb.append(")");
return sb.toString();
diff --git a/client/src/main/generated/com/vesoft/nebula/storage/DeleteTagsRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/DeleteTagsRequest.java
new file mode 100644
index 000000000..964d9d0ef
--- /dev/null
+++ b/client/src/main/generated/com/vesoft/nebula/storage/DeleteTagsRequest.java
@@ -0,0 +1,457 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package com.vesoft.nebula.storage;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.util.Arrays;
+import com.facebook.thrift.*;
+import com.facebook.thrift.annotations.*;
+import com.facebook.thrift.async.*;
+import com.facebook.thrift.meta_data.*;
+import com.facebook.thrift.server.*;
+import com.facebook.thrift.transport.*;
+import com.facebook.thrift.protocol.*;
+
+@SuppressWarnings({ "unused", "serial" })
+public class DeleteTagsRequest implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("DeleteTagsRequest");
+ private static final TField SPACE_ID_FIELD_DESC = new TField("space_id", TType.I32, (short)1);
+ private static final TField PARTS_FIELD_DESC = new TField("parts", TType.MAP, (short)2);
+ private static final TField COMMON_FIELD_DESC = new TField("common", TType.STRUCT, (short)3);
+
+ public int space_id;
+ public Map> parts;
+ public RequestCommon common;
+ public static final int SPACE_ID = 1;
+ public static final int PARTS = 2;
+ public static final int COMMON = 3;
+
+ // isset id assignments
+ private static final int __SPACE_ID_ISSET_ID = 0;
+ private BitSet __isset_bit_vector = new BitSet(1);
+
+ public static final Map metaDataMap;
+
+ static {
+ Map tmpMetaDataMap = new HashMap();
+ tmpMetaDataMap.put(SPACE_ID, new FieldMetaData("space_id", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ tmpMetaDataMap.put(PARTS, new FieldMetaData("parts", TFieldRequirementType.DEFAULT,
+ new MapMetaData(TType.MAP,
+ new FieldValueMetaData(TType.I32),
+ new ListMetaData(TType.LIST,
+ new StructMetaData(TType.STRUCT, DelTags.class)))));
+ tmpMetaDataMap.put(COMMON, new FieldMetaData("common", TFieldRequirementType.OPTIONAL,
+ new StructMetaData(TType.STRUCT, RequestCommon.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
+ }
+
+ static {
+ FieldMetaData.addStructMetaDataMap(DeleteTagsRequest.class, metaDataMap);
+ }
+
+ public DeleteTagsRequest() {
+ }
+
+ public DeleteTagsRequest(
+ int space_id,
+ Map> parts) {
+ this();
+ this.space_id = space_id;
+ setSpace_idIsSet(true);
+ this.parts = parts;
+ }
+
+ public DeleteTagsRequest(
+ int space_id,
+ Map> parts,
+ RequestCommon common) {
+ this();
+ this.space_id = space_id;
+ setSpace_idIsSet(true);
+ this.parts = parts;
+ this.common = common;
+ }
+
+ public static class Builder {
+ private int space_id;
+ private Map> parts;
+ private RequestCommon common;
+
+ BitSet __optional_isset = new BitSet(1);
+
+ public Builder() {
+ }
+
+ public Builder setSpace_id(final int space_id) {
+ this.space_id = space_id;
+ __optional_isset.set(__SPACE_ID_ISSET_ID, true);
+ return this;
+ }
+
+ public Builder setParts(final Map> parts) {
+ this.parts = parts;
+ return this;
+ }
+
+ public Builder setCommon(final RequestCommon common) {
+ this.common = common;
+ return this;
+ }
+
+ public DeleteTagsRequest build() {
+ DeleteTagsRequest result = new DeleteTagsRequest();
+ if (__optional_isset.get(__SPACE_ID_ISSET_ID)) {
+ result.setSpace_id(this.space_id);
+ }
+ result.setParts(this.parts);
+ result.setCommon(this.common);
+ return result;
+ }
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public DeleteTagsRequest(DeleteTagsRequest other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ this.space_id = TBaseHelper.deepCopy(other.space_id);
+ if (other.isSetParts()) {
+ this.parts = TBaseHelper.deepCopy(other.parts);
+ }
+ if (other.isSetCommon()) {
+ this.common = TBaseHelper.deepCopy(other.common);
+ }
+ }
+
+ public DeleteTagsRequest deepCopy() {
+ return new DeleteTagsRequest(this);
+ }
+
+ public int getSpace_id() {
+ return this.space_id;
+ }
+
+ public DeleteTagsRequest setSpace_id(int space_id) {
+ this.space_id = space_id;
+ setSpace_idIsSet(true);
+ return this;
+ }
+
+ public void unsetSpace_id() {
+ __isset_bit_vector.clear(__SPACE_ID_ISSET_ID);
+ }
+
+ // Returns true if field space_id is set (has been assigned a value) and false otherwise
+ public boolean isSetSpace_id() {
+ return __isset_bit_vector.get(__SPACE_ID_ISSET_ID);
+ }
+
+ public void setSpace_idIsSet(boolean __value) {
+ __isset_bit_vector.set(__SPACE_ID_ISSET_ID, __value);
+ }
+
+ public Map> getParts() {
+ return this.parts;
+ }
+
+ public DeleteTagsRequest setParts(Map> parts) {
+ this.parts = parts;
+ return this;
+ }
+
+ public void unsetParts() {
+ this.parts = null;
+ }
+
+ // Returns true if field parts is set (has been assigned a value) and false otherwise
+ public boolean isSetParts() {
+ return this.parts != null;
+ }
+
+ public void setPartsIsSet(boolean __value) {
+ if (!__value) {
+ this.parts = null;
+ }
+ }
+
+ public RequestCommon getCommon() {
+ return this.common;
+ }
+
+ public DeleteTagsRequest setCommon(RequestCommon common) {
+ this.common = common;
+ return this;
+ }
+
+ public void unsetCommon() {
+ this.common = null;
+ }
+
+ // Returns true if field common is set (has been assigned a value) and false otherwise
+ public boolean isSetCommon() {
+ return this.common != null;
+ }
+
+ public void setCommonIsSet(boolean __value) {
+ if (!__value) {
+ this.common = null;
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public void setFieldValue(int fieldID, Object __value) {
+ switch (fieldID) {
+ case SPACE_ID:
+ if (__value == null) {
+ unsetSpace_id();
+ } else {
+ setSpace_id((Integer)__value);
+ }
+ break;
+
+ case PARTS:
+ if (__value == null) {
+ unsetParts();
+ } else {
+ setParts((Map>)__value);
+ }
+ break;
+
+ case COMMON:
+ if (__value == null) {
+ unsetCommon();
+ } else {
+ setCommon((RequestCommon)__value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case SPACE_ID:
+ return new Integer(getSpace_id());
+
+ case PARTS:
+ return getParts();
+
+ case COMMON:
+ return getCommon();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object _that) {
+ if (_that == null)
+ return false;
+ if (this == _that)
+ return true;
+ if (!(_that instanceof DeleteTagsRequest))
+ return false;
+ DeleteTagsRequest that = (DeleteTagsRequest)_that;
+
+ if (!TBaseHelper.equalsNobinary(this.space_id, that.space_id)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.isSetParts(), that.isSetParts(), this.parts, that.parts)) { return false; }
+
+ if (!TBaseHelper.equalsNobinary(this.isSetCommon(), that.isSetCommon(), this.common, that.common)) { return false; }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Arrays.deepHashCode(new Object[] {space_id, parts, common});
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField __field;
+ iprot.readStructBegin(metaDataMap);
+ while (true)
+ {
+ __field = iprot.readFieldBegin();
+ if (__field.type == TType.STOP) {
+ break;
+ }
+ switch (__field.id)
+ {
+ case SPACE_ID:
+ if (__field.type == TType.I32) {
+ this.space_id = iprot.readI32();
+ setSpace_idIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case PARTS:
+ if (__field.type == TType.MAP) {
+ {
+ TMap _map144 = iprot.readMapBegin();
+ this.parts = new HashMap>(Math.max(0, 2*_map144.size));
+ for (int _i145 = 0;
+ (_map144.size < 0) ? iprot.peekMap() : (_i145 < _map144.size);
+ ++_i145)
+ {
+ int _key146;
+ List _val147;
+ _key146 = iprot.readI32();
+ {
+ TList _list148 = iprot.readListBegin();
+ _val147 = new ArrayList(Math.max(0, _list148.size));
+ for (int _i149 = 0;
+ (_list148.size < 0) ? iprot.peekList() : (_i149 < _list148.size);
+ ++_i149)
+ {
+ DelTags _elem150;
+ _elem150 = new DelTags();
+ _elem150.read(iprot);
+ _val147.add(_elem150);
+ }
+ iprot.readListEnd();
+ }
+ this.parts.put(_key146, _val147);
+ }
+ iprot.readMapEnd();
+ }
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ case COMMON:
+ if (__field.type == TType.STRUCT) {
+ this.common = new RequestCommon();
+ this.common.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, __field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(SPACE_ID_FIELD_DESC);
+ oprot.writeI32(this.space_id);
+ oprot.writeFieldEnd();
+ if (this.parts != null) {
+ oprot.writeFieldBegin(PARTS_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new TMap(TType.I32, TType.LIST, this.parts.size()));
+ for (Map.Entry> _iter151 : this.parts.entrySet()) {
+ oprot.writeI32(_iter151.getKey());
+ {
+ oprot.writeListBegin(new TList(TType.STRUCT, _iter151.getValue().size()));
+ for (DelTags _iter152 : _iter151.getValue()) {
+ _iter152.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (this.common != null) {
+ if (isSetCommon()) {
+ oprot.writeFieldBegin(COMMON_FIELD_DESC);
+ this.common.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ return toString(1, true);
+ }
+
+ @Override
+ public String toString(int indent, boolean prettyPrint) {
+ String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
+ String newLine = prettyPrint ? "\n" : "";
+ String space = prettyPrint ? " " : "";
+ StringBuilder sb = new StringBuilder("DeleteTagsRequest");
+ sb.append(space);
+ sb.append("(");
+ sb.append(newLine);
+ boolean first = true;
+
+ sb.append(indentStr);
+ sb.append("space_id");
+ sb.append(space);
+ sb.append(":").append(space);
+ sb.append(TBaseHelper.toString(this.getSpace_id(), indent + 1, prettyPrint));
+ first = false;
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("parts");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getParts() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getParts(), indent + 1, prettyPrint));
+ }
+ first = false;
+ if (isSetCommon())
+ {
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("common");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getCommon() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getCommon(), indent + 1, prettyPrint));
+ }
+ first = false;
+ }
+ sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+}
+
diff --git a/client/src/main/generated/com/vesoft/nebula/storage/DeleteVerticesRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/DeleteVerticesRequest.java
index 883564ebc..cac3ac295 100644
--- a/client/src/main/generated/com/vesoft/nebula/storage/DeleteVerticesRequest.java
+++ b/client/src/main/generated/com/vesoft/nebula/storage/DeleteVerticesRequest.java
@@ -28,11 +28,14 @@ public class DeleteVerticesRequest implements TBase, java.io.Serializable, Clone
private static final TStruct STRUCT_DESC = new TStruct("DeleteVerticesRequest");
private static final TField SPACE_ID_FIELD_DESC = new TField("space_id", TType.I32, (short)1);
private static final TField PARTS_FIELD_DESC = new TField("parts", TType.MAP, (short)2);
+ private static final TField COMMON_FIELD_DESC = new TField("common", TType.STRUCT, (short)3);
public int space_id;
public Map> parts;
+ public RequestCommon common;
public static final int SPACE_ID = 1;
public static final int PARTS = 2;
+ public static final int COMMON = 3;
// isset id assignments
private static final int __SPACE_ID_ISSET_ID = 0;
@@ -49,6 +52,8 @@ public class DeleteVerticesRequest implements TBase, java.io.Serializable, Clone
new FieldValueMetaData(TType.I32),
new ListMetaData(TType.LIST,
new StructMetaData(TType.STRUCT, com.vesoft.nebula.Value.class)))));
+ tmpMetaDataMap.put(COMMON, new FieldMetaData("common", TFieldRequirementType.OPTIONAL,
+ new StructMetaData(TType.STRUCT, RequestCommon.class)));
metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
}
@@ -68,9 +73,21 @@ public DeleteVerticesRequest(
this.parts = parts;
}
+ public DeleteVerticesRequest(
+ int space_id,
+ Map> parts,
+ RequestCommon common) {
+ this();
+ this.space_id = space_id;
+ setSpace_idIsSet(true);
+ this.parts = parts;
+ this.common = common;
+ }
+
public static class Builder {
private int space_id;
private Map> parts;
+ private RequestCommon common;
BitSet __optional_isset = new BitSet(1);
@@ -88,12 +105,18 @@ public Builder setParts(final Map> parts)
return this;
}
+ public Builder setCommon(final RequestCommon common) {
+ this.common = common;
+ return this;
+ }
+
public DeleteVerticesRequest build() {
DeleteVerticesRequest result = new DeleteVerticesRequest();
if (__optional_isset.get(__SPACE_ID_ISSET_ID)) {
result.setSpace_id(this.space_id);
}
result.setParts(this.parts);
+ result.setCommon(this.common);
return result;
}
}
@@ -112,6 +135,9 @@ public DeleteVerticesRequest(DeleteVerticesRequest other) {
if (other.isSetParts()) {
this.parts = TBaseHelper.deepCopy(other.parts);
}
+ if (other.isSetCommon()) {
+ this.common = TBaseHelper.deepCopy(other.common);
+ }
}
public DeleteVerticesRequest deepCopy() {
@@ -165,6 +191,30 @@ public void setPartsIsSet(boolean __value) {
}
}
+ public RequestCommon getCommon() {
+ return this.common;
+ }
+
+ public DeleteVerticesRequest setCommon(RequestCommon common) {
+ this.common = common;
+ return this;
+ }
+
+ public void unsetCommon() {
+ this.common = null;
+ }
+
+ // Returns true if field common is set (has been assigned a value) and false otherwise
+ public boolean isSetCommon() {
+ return this.common != null;
+ }
+
+ public void setCommonIsSet(boolean __value) {
+ if (!__value) {
+ this.common = null;
+ }
+ }
+
@SuppressWarnings("unchecked")
public void setFieldValue(int fieldID, Object __value) {
switch (fieldID) {
@@ -184,6 +234,14 @@ public void setFieldValue(int fieldID, Object __value) {
}
break;
+ case COMMON:
+ if (__value == null) {
+ unsetCommon();
+ } else {
+ setCommon((RequestCommon)__value);
+ }
+ break;
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -197,6 +255,9 @@ public Object getFieldValue(int fieldID) {
case PARTS:
return getParts();
+ case COMMON:
+ return getCommon();
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -216,12 +277,14 @@ public boolean equals(Object _that) {
if (!TBaseHelper.equalsNobinary(this.isSetParts(), that.isSetParts(), this.parts, that.parts)) { return false; }
+ if (!TBaseHelper.equalsNobinary(this.isSetCommon(), that.isSetCommon(), this.common, that.common)) { return false; }
+
return true;
}
@Override
public int hashCode() {
- return Arrays.deepHashCode(new Object[] {space_id, parts});
+ return Arrays.deepHashCode(new Object[] {space_id, parts, common});
}
public void read(TProtocol iprot) throws TException {
@@ -246,30 +309,30 @@ public void read(TProtocol iprot) throws TException {
case PARTS:
if (__field.type == TType.MAP) {
{
- TMap _map117 = iprot.readMapBegin();
- this.parts = new HashMap>(Math.max(0, 2*_map117.size));
- for (int _i118 = 0;
- (_map117.size < 0) ? iprot.peekMap() : (_i118 < _map117.size);
- ++_i118)
+ TMap _map122 = iprot.readMapBegin();
+ this.parts = new HashMap>(Math.max(0, 2*_map122.size));
+ for (int _i123 = 0;
+ (_map122.size < 0) ? iprot.peekMap() : (_i123 < _map122.size);
+ ++_i123)
{
- int _key119;
- List _val120;
- _key119 = iprot.readI32();
+ int _key124;
+ List _val125;
+ _key124 = iprot.readI32();
{
- TList _list121 = iprot.readListBegin();
- _val120 = new ArrayList(Math.max(0, _list121.size));
- for (int _i122 = 0;
- (_list121.size < 0) ? iprot.peekList() : (_i122 < _list121.size);
- ++_i122)
+ TList _list126 = iprot.readListBegin();
+ _val125 = new ArrayList(Math.max(0, _list126.size));
+ for (int _i127 = 0;
+ (_list126.size < 0) ? iprot.peekList() : (_i127 < _list126.size);
+ ++_i127)
{
- com.vesoft.nebula.Value _elem123;
- _elem123 = new com.vesoft.nebula.Value();
- _elem123.read(iprot);
- _val120.add(_elem123);
+ com.vesoft.nebula.Value _elem128;
+ _elem128 = new com.vesoft.nebula.Value();
+ _elem128.read(iprot);
+ _val125.add(_elem128);
}
iprot.readListEnd();
}
- this.parts.put(_key119, _val120);
+ this.parts.put(_key124, _val125);
}
iprot.readMapEnd();
}
@@ -277,6 +340,14 @@ public void read(TProtocol iprot) throws TException {
TProtocolUtil.skip(iprot, __field.type);
}
break;
+ case COMMON:
+ if (__field.type == TType.STRUCT) {
+ this.common = new RequestCommon();
+ this.common.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, __field.type);
+ }
+ break;
default:
TProtocolUtil.skip(iprot, __field.type);
break;
@@ -301,12 +372,12 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(PARTS_FIELD_DESC);
{
oprot.writeMapBegin(new TMap(TType.I32, TType.LIST, this.parts.size()));
- for (Map.Entry> _iter124 : this.parts.entrySet()) {
- oprot.writeI32(_iter124.getKey());
+ for (Map.Entry> _iter129 : this.parts.entrySet()) {
+ oprot.writeI32(_iter129.getKey());
{
- oprot.writeListBegin(new TList(TType.STRUCT, _iter124.getValue().size()));
- for (com.vesoft.nebula.Value _iter125 : _iter124.getValue()) {
- _iter125.write(oprot);
+ oprot.writeListBegin(new TList(TType.STRUCT, _iter129.getValue().size()));
+ for (com.vesoft.nebula.Value _iter130 : _iter129.getValue()) {
+ _iter130.write(oprot);
}
oprot.writeListEnd();
}
@@ -315,6 +386,13 @@ public void write(TProtocol oprot) throws TException {
}
oprot.writeFieldEnd();
}
+ if (this.common != null) {
+ if (isSetCommon()) {
+ oprot.writeFieldBegin(COMMON_FIELD_DESC);
+ this.common.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -352,6 +430,20 @@ public String toString(int indent, boolean prettyPrint) {
sb.append(TBaseHelper.toString(this.getParts(), indent + 1, prettyPrint));
}
first = false;
+ if (isSetCommon())
+ {
+ if (!first) sb.append("," + newLine);
+ sb.append(indentStr);
+ sb.append("common");
+ sb.append(space);
+ sb.append(":").append(space);
+ if (this.getCommon() == null) {
+ sb.append("null");
+ } else {
+ sb.append(TBaseHelper.toString(this.getCommon(), indent + 1, prettyPrint));
+ }
+ first = false;
+ }
sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
sb.append(")");
return sb.toString();
diff --git a/client/src/main/generated/com/vesoft/nebula/storage/EdgeProp.java b/client/src/main/generated/com/vesoft/nebula/storage/EdgeProp.java
index 3e1792055..af07de5f3 100644
--- a/client/src/main/generated/com/vesoft/nebula/storage/EdgeProp.java
+++ b/client/src/main/generated/com/vesoft/nebula/storage/EdgeProp.java
@@ -275,15 +275,15 @@ public void read(TProtocol iprot) throws TException {
case PROPS:
if (__field.type == TType.LIST) {
{
- TList _list4 = iprot.readListBegin();
- this.props = new ArrayList(Math.max(0, _list4.size));
- for (int _i5 = 0;
- (_list4.size < 0) ? iprot.peekList() : (_i5 < _list4.size);
- ++_i5)
+ TList _list9 = iprot.readListBegin();
+ this.props = new ArrayList(Math.max(0, _list9.size));
+ for (int _i10 = 0;
+ (_list9.size < 0) ? iprot.peekList() : (_i10 < _list9.size);
+ ++_i10)
{
- byte[] _elem6;
- _elem6 = iprot.readBinary();
- this.props.add(_elem6);
+ byte[] _elem11;
+ _elem11 = iprot.readBinary();
+ this.props.add(_elem11);
}
iprot.readListEnd();
}
@@ -315,8 +315,8 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(PROPS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.props.size()));
- for (byte[] _iter7 : this.props) {
- oprot.writeBinary(_iter7);
+ for (byte[] _iter12 : this.props) {
+ oprot.writeBinary(_iter12);
}
oprot.writeListEnd();
}
diff --git a/client/src/main/generated/com/vesoft/nebula/storage/GeneralStorageService.java b/client/src/main/generated/com/vesoft/nebula/storage/GeneralStorageService.java
index dd665fcf3..faea62896 100644
--- a/client/src/main/generated/com/vesoft/nebula/storage/GeneralStorageService.java
+++ b/client/src/main/generated/com/vesoft/nebula/storage/GeneralStorageService.java
@@ -231,17 +231,17 @@ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientM
super(protocolFactory, clientManager, transport);
}
- public void get(KVGetRequest req, AsyncMethodCallback resultHandler430) throws TException {
+ public void get(KVGetRequest req, AsyncMethodCallback resultHandler454) throws TException {
checkReady();
- get_call method_call = new get_call(req, resultHandler430, this, ___protocolFactory, ___transport);
+ get_call method_call = new get_call(req, resultHandler454, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class get_call extends TAsyncMethodCall {
private KVGetRequest req;
- public get_call(KVGetRequest req, AsyncMethodCallback resultHandler431, TAsyncClient client427, TProtocolFactory protocolFactory428, TNonblockingTransport transport429) throws TException {
- super(client427, protocolFactory428, transport429, resultHandler431, false);
+ public get_call(KVGetRequest req, AsyncMethodCallback resultHandler455, TAsyncClient client451, TProtocolFactory protocolFactory452, TNonblockingTransport transport453) throws TException {
+ super(client451, protocolFactory452, transport453, resultHandler455, false);
this.req = req;
}
@@ -263,17 +263,17 @@ public KVGetResponse getResult() throws TException {
}
}
- public void put(KVPutRequest req, AsyncMethodCallback resultHandler435) throws TException {
+ public void put(KVPutRequest req, AsyncMethodCallback resultHandler459) throws TException {
checkReady();
- put_call method_call = new put_call(req, resultHandler435, this, ___protocolFactory, ___transport);
+ put_call method_call = new put_call(req, resultHandler459, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class put_call extends TAsyncMethodCall {
private KVPutRequest req;
- public put_call(KVPutRequest req, AsyncMethodCallback resultHandler436, TAsyncClient client432, TProtocolFactory protocolFactory433, TNonblockingTransport transport434) throws TException {
- super(client432, protocolFactory433, transport434, resultHandler436, false);
+ public put_call(KVPutRequest req, AsyncMethodCallback resultHandler460, TAsyncClient client456, TProtocolFactory protocolFactory457, TNonblockingTransport transport458) throws TException {
+ super(client456, protocolFactory457, transport458, resultHandler460, false);
this.req = req;
}
@@ -295,17 +295,17 @@ public ExecResponse getResult() throws TException {
}
}
- public void remove(KVRemoveRequest req, AsyncMethodCallback resultHandler440) throws TException {
+ public void remove(KVRemoveRequest req, AsyncMethodCallback resultHandler464) throws TException {
checkReady();
- remove_call method_call = new remove_call(req, resultHandler440, this, ___protocolFactory, ___transport);
+ remove_call method_call = new remove_call(req, resultHandler464, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class remove_call extends TAsyncMethodCall {
private KVRemoveRequest req;
- public remove_call(KVRemoveRequest req, AsyncMethodCallback resultHandler441, TAsyncClient client437, TProtocolFactory protocolFactory438, TNonblockingTransport transport439) throws TException {
- super(client437, protocolFactory438, transport439, resultHandler441, false);
+ public remove_call(KVRemoveRequest req, AsyncMethodCallback resultHandler465, TAsyncClient client461, TProtocolFactory protocolFactory462, TNonblockingTransport transport463) throws TException {
+ super(client461, protocolFactory462, transport463, resultHandler465, false);
this.req = req;
}
diff --git a/client/src/main/generated/com/vesoft/nebula/storage/GetLeaderPartsResp.java b/client/src/main/generated/com/vesoft/nebula/storage/GetLeaderPartsResp.java
index e8927d2f4..831072bd8 100644
--- a/client/src/main/generated/com/vesoft/nebula/storage/GetLeaderPartsResp.java
+++ b/client/src/main/generated/com/vesoft/nebula/storage/GetLeaderPartsResp.java
@@ -276,29 +276,29 @@ public void read(TProtocol iprot) throws TException {
case LEADER_PARTS:
if (__field.type == TType.MAP) {
{
- TMap _map183 = iprot.readMapBegin();
- this.leader_parts = new HashMap>(Math.max(0, 2*_map183.size));
- for (int _i184 = 0;
- (_map183.size < 0) ? iprot.peekMap() : (_i184 < _map183.size);
- ++_i184)
+ TMap _map201 = iprot.readMapBegin();
+ this.leader_parts = new HashMap>(Math.max(0, 2*_map201.size));
+ for (int _i202 = 0;
+ (_map201.size < 0) ? iprot.peekMap() : (_i202 < _map201.size);
+ ++_i202)
{
- int _key185;
- List _val186;
- _key185 = iprot.readI32();
+ int _key203;
+ List _val204;
+ _key203 = iprot.readI32();
{
- TList _list187 = iprot.readListBegin();
- _val186 = new ArrayList(Math.max(0, _list187.size));
- for (int _i188 = 0;
- (_list187.size < 0) ? iprot.peekList() : (_i188 < _list187.size);
- ++_i188)
+ TList _list205 = iprot.readListBegin();
+ _val204 = new ArrayList(Math.max(0, _list205.size));
+ for (int _i206 = 0;
+ (_list205.size < 0) ? iprot.peekList() : (_i206 < _list205.size);
+ ++_i206)
{
- int _elem189;
- _elem189 = iprot.readI32();
- _val186.add(_elem189);
+ int _elem207;
+ _elem207 = iprot.readI32();
+ _val204.add(_elem207);
}
iprot.readListEnd();
}
- this.leader_parts.put(_key185, _val186);
+ this.leader_parts.put(_key203, _val204);
}
iprot.readMapEnd();
}
@@ -332,12 +332,12 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(LEADER_PARTS_FIELD_DESC);
{
oprot.writeMapBegin(new TMap(TType.I32, TType.LIST, this.leader_parts.size()));
- for (Map.Entry