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> _iter190 : this.leader_parts.entrySet()) { - oprot.writeI32(_iter190.getKey()); + for (Map.Entry> _iter208 : this.leader_parts.entrySet()) { + oprot.writeI32(_iter208.getKey()); { - oprot.writeListBegin(new TList(TType.I32, _iter190.getValue().size())); - for (int _iter191 : _iter190.getValue()) { - oprot.writeI32(_iter191); + oprot.writeListBegin(new TList(TType.I32, _iter208.getValue().size())); + for (int _iter209 : _iter208.getValue()) { + oprot.writeI32(_iter209); } oprot.writeListEnd(); } diff --git a/client/src/main/generated/com/vesoft/nebula/storage/GetNeighborsRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/GetNeighborsRequest.java index 057d55012..f19285912 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/GetNeighborsRequest.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/GetNeighborsRequest.java @@ -30,15 +30,18 @@ public class GetNeighborsRequest implements TBase, java.io.Serializable, Cloneab private static final TField COLUMN_NAMES_FIELD_DESC = new TField("column_names", TType.LIST, (short)2); private static final TField PARTS_FIELD_DESC = new TField("parts", TType.MAP, (short)3); private static final TField TRAVERSE_SPEC_FIELD_DESC = new TField("traverse_spec", TType.STRUCT, (short)4); + private static final TField COMMON_FIELD_DESC = new TField("common", TType.STRUCT, (short)5); public int space_id; public List column_names; public Map> parts; public TraverseSpec traverse_spec; + public RequestCommon common; public static final int SPACE_ID = 1; public static final int COLUMN_NAMES = 2; public static final int PARTS = 3; public static final int TRAVERSE_SPEC = 4; + public static final int COMMON = 5; // isset id assignments private static final int __SPACE_ID_ISSET_ID = 0; @@ -60,6 +63,8 @@ public class GetNeighborsRequest implements TBase, java.io.Serializable, Cloneab new StructMetaData(TType.STRUCT, com.vesoft.nebula.Row.class))))); tmpMetaDataMap.put(TRAVERSE_SPEC, new FieldMetaData("traverse_spec", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, TraverseSpec.class))); + tmpMetaDataMap.put(COMMON, new FieldMetaData("common", TFieldRequirementType.OPTIONAL, + new StructMetaData(TType.STRUCT, RequestCommon.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -83,11 +88,27 @@ public GetNeighborsRequest( this.traverse_spec = traverse_spec; } + public GetNeighborsRequest( + int space_id, + List column_names, + Map> parts, + TraverseSpec traverse_spec, + RequestCommon common) { + this(); + this.space_id = space_id; + setSpace_idIsSet(true); + this.column_names = column_names; + this.parts = parts; + this.traverse_spec = traverse_spec; + this.common = common; + } + public static class Builder { private int space_id; private List column_names; private Map> parts; private TraverseSpec traverse_spec; + private RequestCommon common; BitSet __optional_isset = new BitSet(1); @@ -115,6 +136,11 @@ public Builder setTraverse_spec(final TraverseSpec traverse_spec) { return this; } + public Builder setCommon(final RequestCommon common) { + this.common = common; + return this; + } + public GetNeighborsRequest build() { GetNeighborsRequest result = new GetNeighborsRequest(); if (__optional_isset.get(__SPACE_ID_ISSET_ID)) { @@ -123,6 +149,7 @@ public GetNeighborsRequest build() { result.setColumn_names(this.column_names); result.setParts(this.parts); result.setTraverse_spec(this.traverse_spec); + result.setCommon(this.common); return result; } } @@ -147,6 +174,9 @@ public GetNeighborsRequest(GetNeighborsRequest other) { if (other.isSetTraverse_spec()) { this.traverse_spec = TBaseHelper.deepCopy(other.traverse_spec); } + if (other.isSetCommon()) { + this.common = TBaseHelper.deepCopy(other.common); + } } public GetNeighborsRequest deepCopy() { @@ -248,6 +278,30 @@ public void setTraverse_specIsSet(boolean __value) { } } + public RequestCommon getCommon() { + return this.common; + } + + public GetNeighborsRequest 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) { @@ -283,6 +337,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!"); } @@ -302,6 +364,9 @@ public Object getFieldValue(int fieldID) { case TRAVERSE_SPEC: return getTraverse_spec(); + case COMMON: + return getCommon(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -325,12 +390,14 @@ public boolean equals(Object _that) { if (!TBaseHelper.equalsNobinary(this.isSetTraverse_spec(), that.isSetTraverse_spec(), this.traverse_spec, that.traverse_spec)) { 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, column_names, parts, traverse_spec}); + return Arrays.deepHashCode(new Object[] {space_id, column_names, parts, traverse_spec, common}); } public void read(TProtocol iprot) throws TException { @@ -355,15 +422,15 @@ public void read(TProtocol iprot) throws TException { case COLUMN_NAMES: if (__field.type == TType.LIST) { { - TList _list36 = iprot.readListBegin(); - this.column_names = new ArrayList(Math.max(0, _list36.size)); - for (int _i37 = 0; - (_list36.size < 0) ? iprot.peekList() : (_i37 < _list36.size); - ++_i37) + TList _list41 = iprot.readListBegin(); + this.column_names = new ArrayList(Math.max(0, _list41.size)); + for (int _i42 = 0; + (_list41.size < 0) ? iprot.peekList() : (_i42 < _list41.size); + ++_i42) { - byte[] _elem38; - _elem38 = iprot.readBinary(); - this.column_names.add(_elem38); + byte[] _elem43; + _elem43 = iprot.readBinary(); + this.column_names.add(_elem43); } iprot.readListEnd(); } @@ -374,30 +441,30 @@ public void read(TProtocol iprot) throws TException { case PARTS: if (__field.type == TType.MAP) { { - TMap _map39 = iprot.readMapBegin(); - this.parts = new HashMap>(Math.max(0, 2*_map39.size)); - for (int _i40 = 0; - (_map39.size < 0) ? iprot.peekMap() : (_i40 < _map39.size); - ++_i40) + TMap _map44 = iprot.readMapBegin(); + this.parts = new HashMap>(Math.max(0, 2*_map44.size)); + for (int _i45 = 0; + (_map44.size < 0) ? iprot.peekMap() : (_i45 < _map44.size); + ++_i45) { - int _key41; - List _val42; - _key41 = iprot.readI32(); + int _key46; + List _val47; + _key46 = iprot.readI32(); { - TList _list43 = iprot.readListBegin(); - _val42 = new ArrayList(Math.max(0, _list43.size)); - for (int _i44 = 0; - (_list43.size < 0) ? iprot.peekList() : (_i44 < _list43.size); - ++_i44) + TList _list48 = iprot.readListBegin(); + _val47 = new ArrayList(Math.max(0, _list48.size)); + for (int _i49 = 0; + (_list48.size < 0) ? iprot.peekList() : (_i49 < _list48.size); + ++_i49) { - com.vesoft.nebula.Row _elem45; - _elem45 = new com.vesoft.nebula.Row(); - _elem45.read(iprot); - _val42.add(_elem45); + com.vesoft.nebula.Row _elem50; + _elem50 = new com.vesoft.nebula.Row(); + _elem50.read(iprot); + _val47.add(_elem50); } iprot.readListEnd(); } - this.parts.put(_key41, _val42); + this.parts.put(_key46, _val47); } iprot.readMapEnd(); } @@ -413,6 +480,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; @@ -437,8 +512,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(COLUMN_NAMES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.column_names.size())); - for (byte[] _iter46 : this.column_names) { - oprot.writeBinary(_iter46); + for (byte[] _iter51 : this.column_names) { + oprot.writeBinary(_iter51); } oprot.writeListEnd(); } @@ -448,12 +523,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> _iter47 : this.parts.entrySet()) { - oprot.writeI32(_iter47.getKey()); + for (Map.Entry> _iter52 : this.parts.entrySet()) { + oprot.writeI32(_iter52.getKey()); { - oprot.writeListBegin(new TList(TType.STRUCT, _iter47.getValue().size())); - for (com.vesoft.nebula.Row _iter48 : _iter47.getValue()) { - _iter48.write(oprot); + oprot.writeListBegin(new TList(TType.STRUCT, _iter52.getValue().size())); + for (com.vesoft.nebula.Row _iter53 : _iter52.getValue()) { + _iter53.write(oprot); } oprot.writeListEnd(); } @@ -467,6 +542,13 @@ public void write(TProtocol oprot) throws TException { this.traverse_spec.write(oprot); oprot.writeFieldEnd(); } + if (this.common != null) { + if (isSetCommon()) { + oprot.writeFieldBegin(COMMON_FIELD_DESC); + this.common.write(oprot); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -526,6 +608,20 @@ public String toString(int indent, boolean prettyPrint) { sb.append(TBaseHelper.toString(this.getTraverse_spec(), 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/GetPropRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/GetPropRequest.java index 42e9c9db8..b4cd88135 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/GetPropRequest.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/GetPropRequest.java @@ -35,6 +35,7 @@ public class GetPropRequest implements TBase, java.io.Serializable, Cloneable { private static final TField ORDER_BY_FIELD_DESC = new TField("order_by", TType.LIST, (short)7); private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)8); private static final TField FILTER_FIELD_DESC = new TField("filter", TType.STRING, (short)9); + private static final TField COMMON_FIELD_DESC = new TField("common", TType.STRUCT, (short)10); public int space_id; public Map> parts; @@ -45,6 +46,7 @@ public class GetPropRequest implements TBase, java.io.Serializable, Cloneable { public List order_by; public long limit; public byte[] filter; + public RequestCommon common; public static final int SPACE_ID = 1; public static final int PARTS = 2; public static final int VERTEX_PROPS = 3; @@ -54,6 +56,7 @@ public class GetPropRequest implements TBase, java.io.Serializable, Cloneable { public static final int ORDER_BY = 7; public static final int LIMIT = 8; public static final int FILTER = 9; + public static final int COMMON = 10; // isset id assignments private static final int __SPACE_ID_ISSET_ID = 0; @@ -90,6 +93,8 @@ public class GetPropRequest implements TBase, java.io.Serializable, Cloneable { new FieldValueMetaData(TType.I64))); tmpMetaDataMap.put(FILTER, new FieldMetaData("filter", TFieldRequirementType.OPTIONAL, new FieldValueMetaData(TType.STRING))); + tmpMetaDataMap.put(COMMON, new FieldMetaData("common", TFieldRequirementType.OPTIONAL, + new StructMetaData(TType.STRUCT, RequestCommon.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -123,7 +128,8 @@ public GetPropRequest( boolean dedup, List order_by, long limit, - byte[] filter) { + byte[] filter, + RequestCommon common) { this(); this.space_id = space_id; setSpace_idIsSet(true); @@ -137,6 +143,7 @@ public GetPropRequest( this.limit = limit; setLimitIsSet(true); this.filter = filter; + this.common = common; } public static class Builder { @@ -149,6 +156,7 @@ public static class Builder { private List order_by; private long limit; private byte[] filter; + private RequestCommon common; BitSet __optional_isset = new BitSet(3); @@ -203,6 +211,11 @@ public Builder setFilter(final byte[] filter) { return this; } + public Builder setCommon(final RequestCommon common) { + this.common = common; + return this; + } + public GetPropRequest build() { GetPropRequest result = new GetPropRequest(); if (__optional_isset.get(__SPACE_ID_ISSET_ID)) { @@ -220,6 +233,7 @@ public GetPropRequest build() { result.setLimit(this.limit); } result.setFilter(this.filter); + result.setCommon(this.common); return result; } } @@ -255,6 +269,9 @@ public GetPropRequest(GetPropRequest other) { if (other.isSetFilter()) { this.filter = TBaseHelper.deepCopy(other.filter); } + if (other.isSetCommon()) { + this.common = TBaseHelper.deepCopy(other.common); + } } public GetPropRequest deepCopy() { @@ -474,6 +491,30 @@ public void setFilterIsSet(boolean __value) { } } + public RequestCommon getCommon() { + return this.common; + } + + public GetPropRequest 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) { @@ -549,6 +590,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!"); } @@ -583,6 +632,9 @@ public Object getFieldValue(int fieldID) { case FILTER: return getFilter(); + case COMMON: + return getCommon(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -616,12 +668,14 @@ public boolean equals(Object _that) { if (!TBaseHelper.equalsSlow(this.isSetFilter(), that.isSetFilter(), this.filter, that.filter)) { 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, vertex_props, edge_props, expressions, dedup, order_by, limit, filter}); + return Arrays.deepHashCode(new Object[] {space_id, parts, vertex_props, edge_props, expressions, dedup, order_by, limit, filter, common}); } public void read(TProtocol iprot) throws TException { @@ -646,30 +700,30 @@ public void read(TProtocol iprot) throws TException { case PARTS: if (__field.type == TType.MAP) { { - TMap _map49 = iprot.readMapBegin(); - this.parts = new HashMap>(Math.max(0, 2*_map49.size)); - for (int _i50 = 0; - (_map49.size < 0) ? iprot.peekMap() : (_i50 < _map49.size); - ++_i50) + TMap _map54 = iprot.readMapBegin(); + this.parts = new HashMap>(Math.max(0, 2*_map54.size)); + for (int _i55 = 0; + (_map54.size < 0) ? iprot.peekMap() : (_i55 < _map54.size); + ++_i55) { - int _key51; - List _val52; - _key51 = iprot.readI32(); + int _key56; + List _val57; + _key56 = iprot.readI32(); { - TList _list53 = iprot.readListBegin(); - _val52 = new ArrayList(Math.max(0, _list53.size)); - for (int _i54 = 0; - (_list53.size < 0) ? iprot.peekList() : (_i54 < _list53.size); - ++_i54) + TList _list58 = iprot.readListBegin(); + _val57 = new ArrayList(Math.max(0, _list58.size)); + for (int _i59 = 0; + (_list58.size < 0) ? iprot.peekList() : (_i59 < _list58.size); + ++_i59) { - com.vesoft.nebula.Row _elem55; - _elem55 = new com.vesoft.nebula.Row(); - _elem55.read(iprot); - _val52.add(_elem55); + com.vesoft.nebula.Row _elem60; + _elem60 = new com.vesoft.nebula.Row(); + _elem60.read(iprot); + _val57.add(_elem60); } iprot.readListEnd(); } - this.parts.put(_key51, _val52); + this.parts.put(_key56, _val57); } iprot.readMapEnd(); } @@ -680,16 +734,16 @@ public void read(TProtocol iprot) throws TException { case VERTEX_PROPS: if (__field.type == TType.LIST) { { - TList _list56 = iprot.readListBegin(); - this.vertex_props = new ArrayList(Math.max(0, _list56.size)); - for (int _i57 = 0; - (_list56.size < 0) ? iprot.peekList() : (_i57 < _list56.size); - ++_i57) + TList _list61 = iprot.readListBegin(); + this.vertex_props = new ArrayList(Math.max(0, _list61.size)); + for (int _i62 = 0; + (_list61.size < 0) ? iprot.peekList() : (_i62 < _list61.size); + ++_i62) { - VertexProp _elem58; - _elem58 = new VertexProp(); - _elem58.read(iprot); - this.vertex_props.add(_elem58); + VertexProp _elem63; + _elem63 = new VertexProp(); + _elem63.read(iprot); + this.vertex_props.add(_elem63); } iprot.readListEnd(); } @@ -700,16 +754,16 @@ public void read(TProtocol iprot) throws TException { case EDGE_PROPS: if (__field.type == TType.LIST) { { - TList _list59 = iprot.readListBegin(); - this.edge_props = new ArrayList(Math.max(0, _list59.size)); - for (int _i60 = 0; - (_list59.size < 0) ? iprot.peekList() : (_i60 < _list59.size); - ++_i60) + TList _list64 = iprot.readListBegin(); + this.edge_props = new ArrayList(Math.max(0, _list64.size)); + for (int _i65 = 0; + (_list64.size < 0) ? iprot.peekList() : (_i65 < _list64.size); + ++_i65) { - EdgeProp _elem61; - _elem61 = new EdgeProp(); - _elem61.read(iprot); - this.edge_props.add(_elem61); + EdgeProp _elem66; + _elem66 = new EdgeProp(); + _elem66.read(iprot); + this.edge_props.add(_elem66); } iprot.readListEnd(); } @@ -720,16 +774,16 @@ public void read(TProtocol iprot) throws TException { case EXPRESSIONS: if (__field.type == TType.LIST) { { - TList _list62 = iprot.readListBegin(); - this.expressions = new ArrayList(Math.max(0, _list62.size)); - for (int _i63 = 0; - (_list62.size < 0) ? iprot.peekList() : (_i63 < _list62.size); - ++_i63) + TList _list67 = iprot.readListBegin(); + this.expressions = new ArrayList(Math.max(0, _list67.size)); + for (int _i68 = 0; + (_list67.size < 0) ? iprot.peekList() : (_i68 < _list67.size); + ++_i68) { - Expr _elem64; - _elem64 = new Expr(); - _elem64.read(iprot); - this.expressions.add(_elem64); + Expr _elem69; + _elem69 = new Expr(); + _elem69.read(iprot); + this.expressions.add(_elem69); } iprot.readListEnd(); } @@ -748,16 +802,16 @@ public void read(TProtocol iprot) throws TException { case ORDER_BY: if (__field.type == TType.LIST) { { - TList _list65 = iprot.readListBegin(); - this.order_by = new ArrayList(Math.max(0, _list65.size)); - for (int _i66 = 0; - (_list65.size < 0) ? iprot.peekList() : (_i66 < _list65.size); - ++_i66) + TList _list70 = iprot.readListBegin(); + this.order_by = new ArrayList(Math.max(0, _list70.size)); + for (int _i71 = 0; + (_list70.size < 0) ? iprot.peekList() : (_i71 < _list70.size); + ++_i71) { - OrderBy _elem67; - _elem67 = new OrderBy(); - _elem67.read(iprot); - this.order_by.add(_elem67); + OrderBy _elem72; + _elem72 = new OrderBy(); + _elem72.read(iprot); + this.order_by.add(_elem72); } iprot.readListEnd(); } @@ -780,6 +834,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; @@ -804,12 +866,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> _iter68 : this.parts.entrySet()) { - oprot.writeI32(_iter68.getKey()); + for (Map.Entry> _iter73 : this.parts.entrySet()) { + oprot.writeI32(_iter73.getKey()); { - oprot.writeListBegin(new TList(TType.STRUCT, _iter68.getValue().size())); - for (com.vesoft.nebula.Row _iter69 : _iter68.getValue()) { - _iter69.write(oprot); + oprot.writeListBegin(new TList(TType.STRUCT, _iter73.getValue().size())); + for (com.vesoft.nebula.Row _iter74 : _iter73.getValue()) { + _iter74.write(oprot); } oprot.writeListEnd(); } @@ -823,8 +885,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(VERTEX_PROPS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.vertex_props.size())); - for (VertexProp _iter70 : this.vertex_props) { - _iter70.write(oprot); + for (VertexProp _iter75 : this.vertex_props) { + _iter75.write(oprot); } oprot.writeListEnd(); } @@ -836,8 +898,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(EDGE_PROPS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.edge_props.size())); - for (EdgeProp _iter71 : this.edge_props) { - _iter71.write(oprot); + for (EdgeProp _iter76 : this.edge_props) { + _iter76.write(oprot); } oprot.writeListEnd(); } @@ -849,8 +911,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(EXPRESSIONS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.expressions.size())); - for (Expr _iter72 : this.expressions) { - _iter72.write(oprot); + for (Expr _iter77 : this.expressions) { + _iter77.write(oprot); } oprot.writeListEnd(); } @@ -865,8 +927,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(ORDER_BY_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.order_by.size())); - for (OrderBy _iter73 : this.order_by) { - _iter73.write(oprot); + for (OrderBy _iter78 : this.order_by) { + _iter78.write(oprot); } oprot.writeListEnd(); } @@ -885,6 +947,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(); } @@ -1014,6 +1083,20 @@ public String toString(int indent, boolean 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/GetUUIDReq.java b/client/src/main/generated/com/vesoft/nebula/storage/GetUUIDReq.java index ab86274a2..133559bc5 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/GetUUIDReq.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/GetUUIDReq.java @@ -29,13 +29,16 @@ public class GetUUIDReq implements TBase, java.io.Serializable, Cloneable, Compa private static final TField SPACE_ID_FIELD_DESC = new TField("space_id", TType.I32, (short)1); private static final TField PART_ID_FIELD_DESC = new TField("part_id", TType.I32, (short)2); private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)3); + private static final TField COMMON_FIELD_DESC = new TField("common", TType.STRUCT, (short)4); public int space_id; public int part_id; public byte[] name; + public RequestCommon common; public static final int SPACE_ID = 1; public static final int PART_ID = 2; public static final int NAME = 3; + public static final int COMMON = 4; // isset id assignments private static final int __SPACE_ID_ISSET_ID = 0; @@ -52,6 +55,8 @@ public class GetUUIDReq implements TBase, java.io.Serializable, Cloneable, Compa new FieldValueMetaData(TType.I32))); tmpMetaDataMap.put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); + tmpMetaDataMap.put(COMMON, new FieldMetaData("common", TFieldRequirementType.OPTIONAL, + new StructMetaData(TType.STRUCT, RequestCommon.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -74,10 +79,25 @@ public GetUUIDReq( this.name = name; } + public GetUUIDReq( + int space_id, + int part_id, + byte[] name, + RequestCommon common) { + this(); + this.space_id = space_id; + setSpace_idIsSet(true); + this.part_id = part_id; + setPart_idIsSet(true); + this.name = name; + this.common = common; + } + public static class Builder { private int space_id; private int part_id; private byte[] name; + private RequestCommon common; BitSet __optional_isset = new BitSet(2); @@ -101,6 +121,11 @@ public Builder setName(final byte[] name) { return this; } + public Builder setCommon(final RequestCommon common) { + this.common = common; + return this; + } + public GetUUIDReq build() { GetUUIDReq result = new GetUUIDReq(); if (__optional_isset.get(__SPACE_ID_ISSET_ID)) { @@ -110,6 +135,7 @@ public GetUUIDReq build() { result.setPart_id(this.part_id); } result.setName(this.name); + result.setCommon(this.common); return result; } } @@ -129,6 +155,9 @@ public GetUUIDReq(GetUUIDReq other) { if (other.isSetName()) { this.name = TBaseHelper.deepCopy(other.name); } + if (other.isSetCommon()) { + this.common = TBaseHelper.deepCopy(other.common); + } } public GetUUIDReq deepCopy() { @@ -205,6 +234,30 @@ public void setNameIsSet(boolean __value) { } } + public RequestCommon getCommon() { + return this.common; + } + + public GetUUIDReq 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; + } + } + public void setFieldValue(int fieldID, Object __value) { switch (fieldID) { case SPACE_ID: @@ -231,6 +284,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!"); } @@ -247,6 +308,9 @@ public Object getFieldValue(int fieldID) { case NAME: return getName(); + case COMMON: + return getCommon(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -268,12 +332,14 @@ public boolean equals(Object _that) { if (!TBaseHelper.equalsSlow(this.isSetName(), that.isSetName(), this.name, that.name)) { 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, part_id, name}); + return Arrays.deepHashCode(new Object[] {space_id, part_id, name, common}); } @Override @@ -312,6 +378,14 @@ public int compareTo(GetUUIDReq other) { if (lastComparison != 0) { return lastComparison; } + lastComparison = Boolean.valueOf(isSetCommon()).compareTo(other.isSetCommon()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(common, other.common); + if (lastComparison != 0) { + return lastComparison; + } return 0; } @@ -349,6 +423,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; @@ -377,6 +459,13 @@ public void write(TProtocol oprot) throws TException { oprot.writeBinary(this.name); oprot.writeFieldEnd(); } + if (this.common != null) { + if (isSetCommon()) { + oprot.writeFieldBegin(COMMON_FIELD_DESC); + this.common.write(oprot); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -426,6 +515,20 @@ public String toString(int indent, boolean prettyPrint) { if (this.getName().length > 128) sb.append(" ..."); } 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/GraphStorageService.java b/client/src/main/generated/com/vesoft/nebula/storage/GraphStorageService.java index ef88d9572..844249043 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/GraphStorageService.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/GraphStorageService.java @@ -43,6 +43,8 @@ public interface Iface { public ExecResponse deleteVertices(DeleteVerticesRequest req) throws TException; + public ExecResponse deleteTags(DeleteTagsRequest req) throws TException; + public UpdateResponse updateVertex(UpdateVertexRequest req) throws TException; public UpdateResponse updateEdge(UpdateEdgeRequest req) throws TException; @@ -75,6 +77,8 @@ public interface AsyncIface { public void deleteVertices(DeleteVerticesRequest req, AsyncMethodCallback resultHandler) throws TException; + public void deleteTags(DeleteTagsRequest req, AsyncMethodCallback resultHandler) throws TException; + public void updateVertex(UpdateVertexRequest req, AsyncMethodCallback resultHandler) throws TException; public void updateEdge(UpdateEdgeRequest req, AsyncMethodCallback resultHandler) throws TException; @@ -392,6 +396,51 @@ public ExecResponse recv_deleteVertices() throws TException throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteVertices failed: unknown result"); } + public ExecResponse deleteTags(DeleteTagsRequest req) throws TException + { + ContextStack ctx = getContextStack("GraphStorageService.deleteTags", null); + this.setContextStack(ctx); + send_deleteTags(req); + return recv_deleteTags(); + } + + public void send_deleteTags(DeleteTagsRequest req) throws TException + { + ContextStack ctx = this.getContextStack(); + super.preWrite(ctx, "GraphStorageService.deleteTags", null); + oprot_.writeMessageBegin(new TMessage("deleteTags", TMessageType.CALL, seqid_)); + deleteTags_args args = new deleteTags_args(); + args.req = req; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + super.postWrite(ctx, "GraphStorageService.deleteTags", args); + return; + } + + public ExecResponse recv_deleteTags() throws TException + { + ContextStack ctx = super.getContextStack(); + long bytes; + TMessageType mtype; + super.preRead(ctx, "GraphStorageService.deleteTags"); + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + deleteTags_result result = new deleteTags_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + super.postRead(ctx, "GraphStorageService.deleteTags", result); + + if (result.isSetSuccess()) { + return result.success; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteTags failed: unknown result"); + } + public UpdateResponse updateVertex(UpdateVertexRequest req) throws TException { ContextStack ctx = getContextStack("GraphStorageService.updateVertex", null); @@ -770,17 +819,17 @@ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientM super(protocolFactory, clientManager, transport); } - public void getNeighbors(GetNeighborsRequest req, AsyncMethodCallback resultHandler261) throws TException { + public void getNeighbors(GetNeighborsRequest req, AsyncMethodCallback resultHandler280) throws TException { checkReady(); - getNeighbors_call method_call = new getNeighbors_call(req, resultHandler261, this, ___protocolFactory, ___transport); + getNeighbors_call method_call = new getNeighbors_call(req, resultHandler280, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getNeighbors_call extends TAsyncMethodCall { private GetNeighborsRequest req; - public getNeighbors_call(GetNeighborsRequest req, AsyncMethodCallback resultHandler262, TAsyncClient client258, TProtocolFactory protocolFactory259, TNonblockingTransport transport260) throws TException { - super(client258, protocolFactory259, transport260, resultHandler262, false); + public getNeighbors_call(GetNeighborsRequest req, AsyncMethodCallback resultHandler281, TAsyncClient client277, TProtocolFactory protocolFactory278, TNonblockingTransport transport279) throws TException { + super(client277, protocolFactory278, transport279, resultHandler281, false); this.req = req; } @@ -802,17 +851,17 @@ public GetNeighborsResponse getResult() throws TException { } } - public void getProps(GetPropRequest req, AsyncMethodCallback resultHandler266) throws TException { + public void getProps(GetPropRequest req, AsyncMethodCallback resultHandler285) throws TException { checkReady(); - getProps_call method_call = new getProps_call(req, resultHandler266, this, ___protocolFactory, ___transport); + getProps_call method_call = new getProps_call(req, resultHandler285, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getProps_call extends TAsyncMethodCall { private GetPropRequest req; - public getProps_call(GetPropRequest req, AsyncMethodCallback resultHandler267, TAsyncClient client263, TProtocolFactory protocolFactory264, TNonblockingTransport transport265) throws TException { - super(client263, protocolFactory264, transport265, resultHandler267, false); + public getProps_call(GetPropRequest req, AsyncMethodCallback resultHandler286, TAsyncClient client282, TProtocolFactory protocolFactory283, TNonblockingTransport transport284) throws TException { + super(client282, protocolFactory283, transport284, resultHandler286, false); this.req = req; } @@ -834,17 +883,17 @@ public GetPropResponse getResult() throws TException { } } - public void addVertices(AddVerticesRequest req, AsyncMethodCallback resultHandler271) throws TException { + public void addVertices(AddVerticesRequest req, AsyncMethodCallback resultHandler290) throws TException { checkReady(); - addVertices_call method_call = new addVertices_call(req, resultHandler271, this, ___protocolFactory, ___transport); + addVertices_call method_call = new addVertices_call(req, resultHandler290, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addVertices_call extends TAsyncMethodCall { private AddVerticesRequest req; - public addVertices_call(AddVerticesRequest req, AsyncMethodCallback resultHandler272, TAsyncClient client268, TProtocolFactory protocolFactory269, TNonblockingTransport transport270) throws TException { - super(client268, protocolFactory269, transport270, resultHandler272, false); + public addVertices_call(AddVerticesRequest req, AsyncMethodCallback resultHandler291, TAsyncClient client287, TProtocolFactory protocolFactory288, TNonblockingTransport transport289) throws TException { + super(client287, protocolFactory288, transport289, resultHandler291, false); this.req = req; } @@ -866,17 +915,17 @@ public ExecResponse getResult() throws TException { } } - public void addEdges(AddEdgesRequest req, AsyncMethodCallback resultHandler276) throws TException { + public void addEdges(AddEdgesRequest req, AsyncMethodCallback resultHandler295) throws TException { checkReady(); - addEdges_call method_call = new addEdges_call(req, resultHandler276, this, ___protocolFactory, ___transport); + addEdges_call method_call = new addEdges_call(req, resultHandler295, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addEdges_call extends TAsyncMethodCall { private AddEdgesRequest req; - public addEdges_call(AddEdgesRequest req, AsyncMethodCallback resultHandler277, TAsyncClient client273, TProtocolFactory protocolFactory274, TNonblockingTransport transport275) throws TException { - super(client273, protocolFactory274, transport275, resultHandler277, false); + public addEdges_call(AddEdgesRequest req, AsyncMethodCallback resultHandler296, TAsyncClient client292, TProtocolFactory protocolFactory293, TNonblockingTransport transport294) throws TException { + super(client292, protocolFactory293, transport294, resultHandler296, false); this.req = req; } @@ -898,17 +947,17 @@ public ExecResponse getResult() throws TException { } } - public void deleteEdges(DeleteEdgesRequest req, AsyncMethodCallback resultHandler281) throws TException { + public void deleteEdges(DeleteEdgesRequest req, AsyncMethodCallback resultHandler300) throws TException { checkReady(); - deleteEdges_call method_call = new deleteEdges_call(req, resultHandler281, this, ___protocolFactory, ___transport); + deleteEdges_call method_call = new deleteEdges_call(req, resultHandler300, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class deleteEdges_call extends TAsyncMethodCall { private DeleteEdgesRequest req; - public deleteEdges_call(DeleteEdgesRequest req, AsyncMethodCallback resultHandler282, TAsyncClient client278, TProtocolFactory protocolFactory279, TNonblockingTransport transport280) throws TException { - super(client278, protocolFactory279, transport280, resultHandler282, false); + public deleteEdges_call(DeleteEdgesRequest req, AsyncMethodCallback resultHandler301, TAsyncClient client297, TProtocolFactory protocolFactory298, TNonblockingTransport transport299) throws TException { + super(client297, protocolFactory298, transport299, resultHandler301, false); this.req = req; } @@ -930,17 +979,17 @@ public ExecResponse getResult() throws TException { } } - public void deleteVertices(DeleteVerticesRequest req, AsyncMethodCallback resultHandler286) throws TException { + public void deleteVertices(DeleteVerticesRequest req, AsyncMethodCallback resultHandler305) throws TException { checkReady(); - deleteVertices_call method_call = new deleteVertices_call(req, resultHandler286, this, ___protocolFactory, ___transport); + deleteVertices_call method_call = new deleteVertices_call(req, resultHandler305, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class deleteVertices_call extends TAsyncMethodCall { private DeleteVerticesRequest req; - public deleteVertices_call(DeleteVerticesRequest req, AsyncMethodCallback resultHandler287, TAsyncClient client283, TProtocolFactory protocolFactory284, TNonblockingTransport transport285) throws TException { - super(client283, protocolFactory284, transport285, resultHandler287, false); + public deleteVertices_call(DeleteVerticesRequest req, AsyncMethodCallback resultHandler306, TAsyncClient client302, TProtocolFactory protocolFactory303, TNonblockingTransport transport304) throws TException { + super(client302, protocolFactory303, transport304, resultHandler306, false); this.req = req; } @@ -962,17 +1011,49 @@ public ExecResponse getResult() throws TException { } } - public void updateVertex(UpdateVertexRequest req, AsyncMethodCallback resultHandler291) throws TException { + public void deleteTags(DeleteTagsRequest req, AsyncMethodCallback resultHandler310) throws TException { + checkReady(); + deleteTags_call method_call = new deleteTags_call(req, resultHandler310, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deleteTags_call extends TAsyncMethodCall { + private DeleteTagsRequest req; + public deleteTags_call(DeleteTagsRequest req, AsyncMethodCallback resultHandler311, TAsyncClient client307, TProtocolFactory protocolFactory308, TNonblockingTransport transport309) throws TException { + super(client307, protocolFactory308, transport309, resultHandler311, false); + this.req = req; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("deleteTags", TMessageType.CALL, 0)); + deleteTags_args args = new deleteTags_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public ExecResponse 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_deleteTags(); + } + } + + public void updateVertex(UpdateVertexRequest req, AsyncMethodCallback resultHandler315) throws TException { checkReady(); - updateVertex_call method_call = new updateVertex_call(req, resultHandler291, this, ___protocolFactory, ___transport); + updateVertex_call method_call = new updateVertex_call(req, resultHandler315, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class updateVertex_call extends TAsyncMethodCall { private UpdateVertexRequest req; - public updateVertex_call(UpdateVertexRequest req, AsyncMethodCallback resultHandler292, TAsyncClient client288, TProtocolFactory protocolFactory289, TNonblockingTransport transport290) throws TException { - super(client288, protocolFactory289, transport290, resultHandler292, false); + public updateVertex_call(UpdateVertexRequest req, AsyncMethodCallback resultHandler316, TAsyncClient client312, TProtocolFactory protocolFactory313, TNonblockingTransport transport314) throws TException { + super(client312, protocolFactory313, transport314, resultHandler316, false); this.req = req; } @@ -994,17 +1075,17 @@ public UpdateResponse getResult() throws TException { } } - public void updateEdge(UpdateEdgeRequest req, AsyncMethodCallback resultHandler296) throws TException { + public void updateEdge(UpdateEdgeRequest req, AsyncMethodCallback resultHandler320) throws TException { checkReady(); - updateEdge_call method_call = new updateEdge_call(req, resultHandler296, this, ___protocolFactory, ___transport); + updateEdge_call method_call = new updateEdge_call(req, resultHandler320, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class updateEdge_call extends TAsyncMethodCall { private UpdateEdgeRequest req; - public updateEdge_call(UpdateEdgeRequest req, AsyncMethodCallback resultHandler297, TAsyncClient client293, TProtocolFactory protocolFactory294, TNonblockingTransport transport295) throws TException { - super(client293, protocolFactory294, transport295, resultHandler297, false); + public updateEdge_call(UpdateEdgeRequest req, AsyncMethodCallback resultHandler321, TAsyncClient client317, TProtocolFactory protocolFactory318, TNonblockingTransport transport319) throws TException { + super(client317, protocolFactory318, transport319, resultHandler321, false); this.req = req; } @@ -1026,17 +1107,17 @@ public UpdateResponse getResult() throws TException { } } - public void scanVertex(ScanVertexRequest req, AsyncMethodCallback resultHandler301) throws TException { + public void scanVertex(ScanVertexRequest req, AsyncMethodCallback resultHandler325) throws TException { checkReady(); - scanVertex_call method_call = new scanVertex_call(req, resultHandler301, this, ___protocolFactory, ___transport); + scanVertex_call method_call = new scanVertex_call(req, resultHandler325, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class scanVertex_call extends TAsyncMethodCall { private ScanVertexRequest req; - public scanVertex_call(ScanVertexRequest req, AsyncMethodCallback resultHandler302, TAsyncClient client298, TProtocolFactory protocolFactory299, TNonblockingTransport transport300) throws TException { - super(client298, protocolFactory299, transport300, resultHandler302, false); + public scanVertex_call(ScanVertexRequest req, AsyncMethodCallback resultHandler326, TAsyncClient client322, TProtocolFactory protocolFactory323, TNonblockingTransport transport324) throws TException { + super(client322, protocolFactory323, transport324, resultHandler326, false); this.req = req; } @@ -1058,17 +1139,17 @@ public ScanVertexResponse getResult() throws TException { } } - public void scanEdge(ScanEdgeRequest req, AsyncMethodCallback resultHandler306) throws TException { + public void scanEdge(ScanEdgeRequest req, AsyncMethodCallback resultHandler330) throws TException { checkReady(); - scanEdge_call method_call = new scanEdge_call(req, resultHandler306, this, ___protocolFactory, ___transport); + scanEdge_call method_call = new scanEdge_call(req, resultHandler330, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class scanEdge_call extends TAsyncMethodCall { private ScanEdgeRequest req; - public scanEdge_call(ScanEdgeRequest req, AsyncMethodCallback resultHandler307, TAsyncClient client303, TProtocolFactory protocolFactory304, TNonblockingTransport transport305) throws TException { - super(client303, protocolFactory304, transport305, resultHandler307, false); + public scanEdge_call(ScanEdgeRequest req, AsyncMethodCallback resultHandler331, TAsyncClient client327, TProtocolFactory protocolFactory328, TNonblockingTransport transport329) throws TException { + super(client327, protocolFactory328, transport329, resultHandler331, false); this.req = req; } @@ -1090,17 +1171,17 @@ public ScanEdgeResponse getResult() throws TException { } } - public void getUUID(GetUUIDReq req, AsyncMethodCallback resultHandler311) throws TException { + public void getUUID(GetUUIDReq req, AsyncMethodCallback resultHandler335) throws TException { checkReady(); - getUUID_call method_call = new getUUID_call(req, resultHandler311, this, ___protocolFactory, ___transport); + getUUID_call method_call = new getUUID_call(req, resultHandler335, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getUUID_call extends TAsyncMethodCall { private GetUUIDReq req; - public getUUID_call(GetUUIDReq req, AsyncMethodCallback resultHandler312, TAsyncClient client308, TProtocolFactory protocolFactory309, TNonblockingTransport transport310) throws TException { - super(client308, protocolFactory309, transport310, resultHandler312, false); + public getUUID_call(GetUUIDReq req, AsyncMethodCallback resultHandler336, TAsyncClient client332, TProtocolFactory protocolFactory333, TNonblockingTransport transport334) throws TException { + super(client332, protocolFactory333, transport334, resultHandler336, false); this.req = req; } @@ -1122,17 +1203,17 @@ public GetUUIDResp getResult() throws TException { } } - public void lookupIndex(LookupIndexRequest req, AsyncMethodCallback resultHandler316) throws TException { + public void lookupIndex(LookupIndexRequest req, AsyncMethodCallback resultHandler340) throws TException { checkReady(); - lookupIndex_call method_call = new lookupIndex_call(req, resultHandler316, this, ___protocolFactory, ___transport); + lookupIndex_call method_call = new lookupIndex_call(req, resultHandler340, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class lookupIndex_call extends TAsyncMethodCall { private LookupIndexRequest req; - public lookupIndex_call(LookupIndexRequest req, AsyncMethodCallback resultHandler317, TAsyncClient client313, TProtocolFactory protocolFactory314, TNonblockingTransport transport315) throws TException { - super(client313, protocolFactory314, transport315, resultHandler317, false); + public lookupIndex_call(LookupIndexRequest req, AsyncMethodCallback resultHandler341, TAsyncClient client337, TProtocolFactory protocolFactory338, TNonblockingTransport transport339) throws TException { + super(client337, protocolFactory338, transport339, resultHandler341, false); this.req = req; } @@ -1154,17 +1235,17 @@ public LookupIndexResp getResult() throws TException { } } - public void lookupAndTraverse(LookupAndTraverseRequest req, AsyncMethodCallback resultHandler321) throws TException { + public void lookupAndTraverse(LookupAndTraverseRequest req, AsyncMethodCallback resultHandler345) throws TException { checkReady(); - lookupAndTraverse_call method_call = new lookupAndTraverse_call(req, resultHandler321, this, ___protocolFactory, ___transport); + lookupAndTraverse_call method_call = new lookupAndTraverse_call(req, resultHandler345, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class lookupAndTraverse_call extends TAsyncMethodCall { private LookupAndTraverseRequest req; - public lookupAndTraverse_call(LookupAndTraverseRequest req, AsyncMethodCallback resultHandler322, TAsyncClient client318, TProtocolFactory protocolFactory319, TNonblockingTransport transport320) throws TException { - super(client318, protocolFactory319, transport320, resultHandler322, false); + public lookupAndTraverse_call(LookupAndTraverseRequest req, AsyncMethodCallback resultHandler346, TAsyncClient client342, TProtocolFactory protocolFactory343, TNonblockingTransport transport344) throws TException { + super(client342, protocolFactory343, transport344, resultHandler346, false); this.req = req; } @@ -1186,17 +1267,17 @@ public GetNeighborsResponse getResult() throws TException { } } - public void addEdgesAtomic(AddEdgesRequest req, AsyncMethodCallback resultHandler326) throws TException { + public void addEdgesAtomic(AddEdgesRequest req, AsyncMethodCallback resultHandler350) throws TException { checkReady(); - addEdgesAtomic_call method_call = new addEdgesAtomic_call(req, resultHandler326, this, ___protocolFactory, ___transport); + addEdgesAtomic_call method_call = new addEdgesAtomic_call(req, resultHandler350, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addEdgesAtomic_call extends TAsyncMethodCall { private AddEdgesRequest req; - public addEdgesAtomic_call(AddEdgesRequest req, AsyncMethodCallback resultHandler327, TAsyncClient client323, TProtocolFactory protocolFactory324, TNonblockingTransport transport325) throws TException { - super(client323, protocolFactory324, transport325, resultHandler327, false); + public addEdgesAtomic_call(AddEdgesRequest req, AsyncMethodCallback resultHandler351, TAsyncClient client347, TProtocolFactory protocolFactory348, TNonblockingTransport transport349) throws TException { + super(client347, protocolFactory348, transport349, resultHandler351, false); this.req = req; } @@ -1232,6 +1313,7 @@ public Processor(Iface iface) processMap_.put("addEdges", new addEdges()); processMap_.put("deleteEdges", new deleteEdges()); processMap_.put("deleteVertices", new deleteVertices()); + processMap_.put("deleteTags", new deleteTags()); processMap_.put("updateVertex", new updateVertex()); processMap_.put("updateEdge", new updateEdge()); processMap_.put("scanVertex", new scanVertex()); @@ -1398,6 +1480,27 @@ public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionCont } + private class deleteTags implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException + { + Object handler_ctx = event_handler_.getContext("GraphStorageService.deleteTags", server_ctx); + deleteTags_args args = new deleteTags_args(); + event_handler_.preRead(handler_ctx, "GraphStorageService.deleteTags"); + args.read(iprot); + iprot.readMessageEnd(); + event_handler_.postRead(handler_ctx, "GraphStorageService.deleteTags", args); + deleteTags_result result = new deleteTags_result(); + result.success = iface_.deleteTags(args.req); + event_handler_.preWrite(handler_ctx, "GraphStorageService.deleteTags", result); + oprot.writeMessageBegin(new TMessage("deleteTags", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + event_handler_.postWrite(handler_ctx, "GraphStorageService.deleteTags", result); + } + + } + private class updateVertex implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException { @@ -3994,6 +4097,418 @@ public void validate() throws TException { } + public static class deleteTags_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("deleteTags_args"); + private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1); + + public DeleteTagsRequest 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, DeleteTagsRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); + } + + static { + FieldMetaData.addStructMetaDataMap(deleteTags_args.class, metaDataMap); + } + + public deleteTags_args() { + } + + public deleteTags_args( + DeleteTagsRequest req) { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public deleteTags_args(deleteTags_args other) { + if (other.isSetReq()) { + this.req = TBaseHelper.deepCopy(other.req); + } + } + + public deleteTags_args deepCopy() { + return new deleteTags_args(this); + } + + public DeleteTagsRequest getReq() { + return this.req; + } + + public deleteTags_args setReq(DeleteTagsRequest 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((DeleteTagsRequest)__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 deleteTags_args)) + return false; + deleteTags_args that = (deleteTags_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}); + } + + 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 DeleteTagsRequest(); + 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("deleteTags_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 deleteTags_result implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("deleteTags_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + + public ExecResponse 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, ExecResponse.class))); + metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); + } + + static { + FieldMetaData.addStructMetaDataMap(deleteTags_result.class, metaDataMap); + } + + public deleteTags_result() { + } + + public deleteTags_result( + ExecResponse success) { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public deleteTags_result(deleteTags_result other) { + if (other.isSetSuccess()) { + this.success = TBaseHelper.deepCopy(other.success); + } + } + + public deleteTags_result deepCopy() { + return new deleteTags_result(this); + } + + public ExecResponse getSuccess() { + return this.success; + } + + public deleteTags_result setSuccess(ExecResponse 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((ExecResponse)__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 deleteTags_result)) + return false; + deleteTags_result that = (deleteTags_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(deleteTags_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 ExecResponse(); + 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("deleteTags_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 updateVertex_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("updateVertex_args"); private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1); diff --git a/client/src/main/generated/com/vesoft/nebula/storage/IndexQueryContext.java b/client/src/main/generated/com/vesoft/nebula/storage/IndexQueryContext.java index 25d29d260..c3b2bab3c 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/IndexQueryContext.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/IndexQueryContext.java @@ -305,16 +305,16 @@ public void read(TProtocol iprot) throws TException { case COLUMN_HINTS: if (__field.type == TType.LIST) { { - TList _list151 = iprot.readListBegin(); - this.column_hints = new ArrayList(Math.max(0, _list151.size)); - for (int _i152 = 0; - (_list151.size < 0) ? iprot.peekList() : (_i152 < _list151.size); - ++_i152) + TList _list169 = iprot.readListBegin(); + this.column_hints = new ArrayList(Math.max(0, _list169.size)); + for (int _i170 = 0; + (_list169.size < 0) ? iprot.peekList() : (_i170 < _list169.size); + ++_i170) { - IndexColumnHint _elem153; - _elem153 = new IndexColumnHint(); - _elem153.read(iprot); - this.column_hints.add(_elem153); + IndexColumnHint _elem171; + _elem171 = new IndexColumnHint(); + _elem171.read(iprot); + this.column_hints.add(_elem171); } iprot.readListEnd(); } @@ -351,8 +351,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(COLUMN_HINTS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.column_hints.size())); - for (IndexColumnHint _iter154 : this.column_hints) { - _iter154.write(oprot); + for (IndexColumnHint _iter172 : this.column_hints) { + _iter172.write(oprot); } oprot.writeListEnd(); } diff --git a/client/src/main/generated/com/vesoft/nebula/storage/IndexSpec.java b/client/src/main/generated/com/vesoft/nebula/storage/IndexSpec.java index 55da31f23..d5af1c80d 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/IndexSpec.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/IndexSpec.java @@ -27,20 +27,14 @@ public class IndexSpec implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("IndexSpec"); private static final TField CONTEXTS_FIELD_DESC = new TField("contexts", TType.LIST, (short)1); - private static final TField IS_EDGE_FIELD_DESC = new TField("is_edge", TType.BOOL, (short)2); - private static final TField TAG_OR_EDGE_ID_FIELD_DESC = new TField("tag_or_edge_id", TType.I32, (short)3); + private static final TField SCHEMA_ID_FIELD_DESC = new TField("schema_id", TType.STRUCT, (short)2); public List contexts; - public boolean is_edge; - public int tag_or_edge_id; + public com.vesoft.nebula.SchemaID schema_id; public static final int CONTEXTS = 1; - public static final int IS_EDGE = 2; - public static final int TAG_OR_EDGE_ID = 3; + public static final int SCHEMA_ID = 2; // isset id assignments - private static final int __IS_EDGE_ISSET_ID = 0; - private static final int __TAG_OR_EDGE_ID_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); public static final Map metaDataMap; @@ -49,10 +43,8 @@ public class IndexSpec implements TBase, java.io.Serializable, Cloneable { tmpMetaDataMap.put(CONTEXTS, new FieldMetaData("contexts", TFieldRequirementType.REQUIRED, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, IndexQueryContext.class)))); - tmpMetaDataMap.put(IS_EDGE, new FieldMetaData("is_edge", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.BOOL))); - tmpMetaDataMap.put(TAG_OR_EDGE_ID, new FieldMetaData("tag_or_edge_id", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.I32))); + tmpMetaDataMap.put(SCHEMA_ID, new FieldMetaData("schema_id", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.vesoft.nebula.SchemaID.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -63,24 +55,23 @@ public class IndexSpec implements TBase, java.io.Serializable, Cloneable { public IndexSpec() { } + public IndexSpec( + List contexts) { + this(); + this.contexts = contexts; + } + public IndexSpec( List contexts, - boolean is_edge, - int tag_or_edge_id) { + com.vesoft.nebula.SchemaID schema_id) { this(); this.contexts = contexts; - this.is_edge = is_edge; - setIs_edgeIsSet(true); - this.tag_or_edge_id = tag_or_edge_id; - setTag_or_edge_idIsSet(true); + this.schema_id = schema_id; } public static class Builder { private List contexts; - private boolean is_edge; - private int tag_or_edge_id; - - BitSet __optional_isset = new BitSet(2); + private com.vesoft.nebula.SchemaID schema_id; public Builder() { } @@ -90,27 +81,15 @@ public Builder setContexts(final List contexts) { return this; } - public Builder setIs_edge(final boolean is_edge) { - this.is_edge = is_edge; - __optional_isset.set(__IS_EDGE_ISSET_ID, true); - return this; - } - - public Builder setTag_or_edge_id(final int tag_or_edge_id) { - this.tag_or_edge_id = tag_or_edge_id; - __optional_isset.set(__TAG_OR_EDGE_ID_ISSET_ID, true); + public Builder setSchema_id(final com.vesoft.nebula.SchemaID schema_id) { + this.schema_id = schema_id; return this; } public IndexSpec build() { IndexSpec result = new IndexSpec(); result.setContexts(this.contexts); - if (__optional_isset.get(__IS_EDGE_ISSET_ID)) { - result.setIs_edge(this.is_edge); - } - if (__optional_isset.get(__TAG_OR_EDGE_ID_ISSET_ID)) { - result.setTag_or_edge_id(this.tag_or_edge_id); - } + result.setSchema_id(this.schema_id); return result; } } @@ -123,13 +102,12 @@ public static Builder builder() { * Performs a deep copy on other. */ public IndexSpec(IndexSpec other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetContexts()) { this.contexts = TBaseHelper.deepCopy(other.contexts); } - this.is_edge = TBaseHelper.deepCopy(other.is_edge); - this.tag_or_edge_id = TBaseHelper.deepCopy(other.tag_or_edge_id); + if (other.isSetSchema_id()) { + this.schema_id = TBaseHelper.deepCopy(other.schema_id); + } } public IndexSpec deepCopy() { @@ -160,50 +138,28 @@ public void setContextsIsSet(boolean __value) { } } - public boolean isIs_edge() { - return this.is_edge; + public com.vesoft.nebula.SchemaID getSchema_id() { + return this.schema_id; } - public IndexSpec setIs_edge(boolean is_edge) { - this.is_edge = is_edge; - setIs_edgeIsSet(true); + public IndexSpec setSchema_id(com.vesoft.nebula.SchemaID schema_id) { + this.schema_id = schema_id; return this; } - public void unsetIs_edge() { - __isset_bit_vector.clear(__IS_EDGE_ISSET_ID); + public void unsetSchema_id() { + this.schema_id = null; } - // Returns true if field is_edge is set (has been assigned a value) and false otherwise - public boolean isSetIs_edge() { - return __isset_bit_vector.get(__IS_EDGE_ISSET_ID); + // Returns true if field schema_id is set (has been assigned a value) and false otherwise + public boolean isSetSchema_id() { + return this.schema_id != null; } - public void setIs_edgeIsSet(boolean __value) { - __isset_bit_vector.set(__IS_EDGE_ISSET_ID, __value); - } - - public int getTag_or_edge_id() { - return this.tag_or_edge_id; - } - - public IndexSpec setTag_or_edge_id(int tag_or_edge_id) { - this.tag_or_edge_id = tag_or_edge_id; - setTag_or_edge_idIsSet(true); - return this; - } - - public void unsetTag_or_edge_id() { - __isset_bit_vector.clear(__TAG_OR_EDGE_ID_ISSET_ID); - } - - // Returns true if field tag_or_edge_id is set (has been assigned a value) and false otherwise - public boolean isSetTag_or_edge_id() { - return __isset_bit_vector.get(__TAG_OR_EDGE_ID_ISSET_ID); - } - - public void setTag_or_edge_idIsSet(boolean __value) { - __isset_bit_vector.set(__TAG_OR_EDGE_ID_ISSET_ID, __value); + public void setSchema_idIsSet(boolean __value) { + if (!__value) { + this.schema_id = null; + } } @SuppressWarnings("unchecked") @@ -217,19 +173,11 @@ public void setFieldValue(int fieldID, Object __value) { } break; - case IS_EDGE: - if (__value == null) { - unsetIs_edge(); - } else { - setIs_edge((Boolean)__value); - } - break; - - case TAG_OR_EDGE_ID: + case SCHEMA_ID: if (__value == null) { - unsetTag_or_edge_id(); + unsetSchema_id(); } else { - setTag_or_edge_id((Integer)__value); + setSchema_id((com.vesoft.nebula.SchemaID)__value); } break; @@ -243,11 +191,8 @@ public Object getFieldValue(int fieldID) { case CONTEXTS: return getContexts(); - case IS_EDGE: - return new Boolean(isIs_edge()); - - case TAG_OR_EDGE_ID: - return new Integer(getTag_or_edge_id()); + case SCHEMA_ID: + return getSchema_id(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -266,16 +211,14 @@ public boolean equals(Object _that) { if (!TBaseHelper.equalsNobinary(this.isSetContexts(), that.isSetContexts(), this.contexts, that.contexts)) { return false; } - if (!TBaseHelper.equalsNobinary(this.is_edge, that.is_edge)) { return false; } - - if (!TBaseHelper.equalsNobinary(this.tag_or_edge_id, that.tag_or_edge_id)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetSchema_id(), that.isSetSchema_id(), this.schema_id, that.schema_id)) { return false; } return true; } @Override public int hashCode() { - return Arrays.deepHashCode(new Object[] {contexts, is_edge, tag_or_edge_id}); + return Arrays.deepHashCode(new Object[] {contexts, schema_id}); } public void read(TProtocol iprot) throws TException { @@ -292,16 +235,16 @@ public void read(TProtocol iprot) throws TException { case CONTEXTS: if (__field.type == TType.LIST) { { - TList _list155 = iprot.readListBegin(); - this.contexts = new ArrayList(Math.max(0, _list155.size)); - for (int _i156 = 0; - (_list155.size < 0) ? iprot.peekList() : (_i156 < _list155.size); - ++_i156) + TList _list173 = iprot.readListBegin(); + this.contexts = new ArrayList(Math.max(0, _list173.size)); + for (int _i174 = 0; + (_list173.size < 0) ? iprot.peekList() : (_i174 < _list173.size); + ++_i174) { - IndexQueryContext _elem157; - _elem157 = new IndexQueryContext(); - _elem157.read(iprot); - this.contexts.add(_elem157); + IndexQueryContext _elem175; + _elem175 = new IndexQueryContext(); + _elem175.read(iprot); + this.contexts.add(_elem175); } iprot.readListEnd(); } @@ -309,18 +252,10 @@ public void read(TProtocol iprot) throws TException { TProtocolUtil.skip(iprot, __field.type); } break; - case IS_EDGE: - if (__field.type == TType.BOOL) { - this.is_edge = iprot.readBool(); - setIs_edgeIsSet(true); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - case TAG_OR_EDGE_ID: - if (__field.type == TType.I32) { - this.tag_or_edge_id = iprot.readI32(); - setTag_or_edge_idIsSet(true); + case SCHEMA_ID: + if (__field.type == TType.STRUCT) { + this.schema_id = new com.vesoft.nebula.SchemaID(); + this.schema_id.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } @@ -335,12 +270,6 @@ public void read(TProtocol iprot) throws TException { // check for required fields of primitive type, which can't be checked in the validate method - if (!isSetIs_edge()) { - throw new TProtocolException("Required field 'is_edge' was not found in serialized data! Struct: " + toString()); - } - if (!isSetTag_or_edge_id()) { - throw new TProtocolException("Required field 'tag_or_edge_id' was not found in serialized data! Struct: " + toString()); - } validate(); } @@ -352,19 +281,18 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(CONTEXTS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.contexts.size())); - for (IndexQueryContext _iter158 : this.contexts) { - _iter158.write(oprot); + for (IndexQueryContext _iter176 : this.contexts) { + _iter176.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } - oprot.writeFieldBegin(IS_EDGE_FIELD_DESC); - oprot.writeBool(this.is_edge); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(TAG_OR_EDGE_ID_FIELD_DESC); - oprot.writeI32(this.tag_or_edge_id); - oprot.writeFieldEnd(); + if (this.schema_id != null) { + oprot.writeFieldBegin(SCHEMA_ID_FIELD_DESC); + this.schema_id.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -397,17 +325,14 @@ public String toString(int indent, boolean prettyPrint) { first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("is_edge"); - sb.append(space); - sb.append(":").append(space); - sb.append(TBaseHelper.toString(this.isIs_edge(), indent + 1, prettyPrint)); - first = false; - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("tag_or_edge_id"); + sb.append("schema_id"); sb.append(space); sb.append(":").append(space); - sb.append(TBaseHelper.toString(this.getTag_or_edge_id(), indent + 1, prettyPrint)); + if (this.getSchema_id() == null) { + sb.append("null"); + } else { + sb.append(TBaseHelper.toString(this.getSchema_id(), indent + 1, prettyPrint)); + } first = false; sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); sb.append(")"); @@ -419,8 +344,6 @@ public void validate() throws TException { if (contexts == null) { throw new TProtocolException(TProtocolException.MISSING_REQUIRED_FIELD, "Required field 'contexts' was not present! Struct: " + toString()); } - // alas, we cannot check 'is_edge' because it's a primitive and you chose the non-beans generator. - // alas, we cannot check 'tag_or_edge_id' because it's a primitive and you chose the non-beans generator. } } diff --git a/client/src/main/generated/com/vesoft/nebula/storage/InternalStorageService.java b/client/src/main/generated/com/vesoft/nebula/storage/InternalStorageService.java index 8b7b7f52e..0b7b04369 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/InternalStorageService.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/InternalStorageService.java @@ -182,17 +182,17 @@ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientM super(protocolFactory, clientManager, transport); } - public void getValue(GetValueRequest req, AsyncMethodCallback resultHandler447) throws TException { + public void getValue(GetValueRequest req, AsyncMethodCallback resultHandler471) throws TException { checkReady(); - getValue_call method_call = new getValue_call(req, resultHandler447, this, ___protocolFactory, ___transport); + getValue_call method_call = new getValue_call(req, resultHandler471, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getValue_call extends TAsyncMethodCall { private GetValueRequest req; - public getValue_call(GetValueRequest req, AsyncMethodCallback resultHandler448, TAsyncClient client444, TProtocolFactory protocolFactory445, TNonblockingTransport transport446) throws TException { - super(client444, protocolFactory445, transport446, resultHandler448, false); + public getValue_call(GetValueRequest req, AsyncMethodCallback resultHandler472, TAsyncClient client468, TProtocolFactory protocolFactory469, TNonblockingTransport transport470) throws TException { + super(client468, protocolFactory469, transport470, resultHandler472, false); this.req = req; } @@ -214,17 +214,17 @@ public GetValueResponse getResult() throws TException { } } - public void forwardTransaction(InternalTxnRequest req, AsyncMethodCallback resultHandler452) throws TException { + public void forwardTransaction(InternalTxnRequest req, AsyncMethodCallback resultHandler476) throws TException { checkReady(); - forwardTransaction_call method_call = new forwardTransaction_call(req, resultHandler452, this, ___protocolFactory, ___transport); + forwardTransaction_call method_call = new forwardTransaction_call(req, resultHandler476, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class forwardTransaction_call extends TAsyncMethodCall { private InternalTxnRequest req; - public forwardTransaction_call(InternalTxnRequest req, AsyncMethodCallback resultHandler453, TAsyncClient client449, TProtocolFactory protocolFactory450, TNonblockingTransport transport451) throws TException { - super(client449, protocolFactory450, transport451, resultHandler453, false); + public forwardTransaction_call(InternalTxnRequest req, AsyncMethodCallback resultHandler477, TAsyncClient client473, TProtocolFactory protocolFactory474, TNonblockingTransport transport475) throws TException { + super(client473, protocolFactory474, transport475, resultHandler477, false); this.req = req; } diff --git a/client/src/main/generated/com/vesoft/nebula/storage/InternalTxnRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/InternalTxnRequest.java index 386e43572..36b4e5cd5 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/InternalTxnRequest.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/InternalTxnRequest.java @@ -492,27 +492,27 @@ public void read(TProtocol iprot) throws TException { case DATA: if (__field.type == TType.LIST) { { - TList _list236 = iprot.readListBegin(); - this.data = new ArrayList>(Math.max(0, _list236.size)); - for (int _i237 = 0; - (_list236.size < 0) ? iprot.peekList() : (_i237 < _list236.size); - ++_i237) + TList _list254 = iprot.readListBegin(); + this.data = new ArrayList>(Math.max(0, _list254.size)); + for (int _i255 = 0; + (_list254.size < 0) ? iprot.peekList() : (_i255 < _list254.size); + ++_i255) { - List _elem238; + List _elem256; { - TList _list239 = iprot.readListBegin(); - _elem238 = new ArrayList(Math.max(0, _list239.size)); - for (int _i240 = 0; - (_list239.size < 0) ? iprot.peekList() : (_i240 < _list239.size); - ++_i240) + TList _list257 = iprot.readListBegin(); + _elem256 = new ArrayList(Math.max(0, _list257.size)); + for (int _i258 = 0; + (_list257.size < 0) ? iprot.peekList() : (_i258 < _list257.size); + ++_i258) { - byte[] _elem241; - _elem241 = iprot.readBinary(); - _elem238.add(_elem241); + byte[] _elem259; + _elem259 = iprot.readBinary(); + _elem256.add(_elem259); } iprot.readListEnd(); } - this.data.add(_elem238); + this.data.add(_elem256); } iprot.readListEnd(); } @@ -553,11 +553,11 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(DATA_FIELD_DESC); { oprot.writeListBegin(new TList(TType.LIST, this.data.size())); - for (List _iter242 : this.data) { + for (List _iter260 : this.data) { { - oprot.writeListBegin(new TList(TType.STRING, _iter242.size())); - for (byte[] _iter243 : _iter242) { - oprot.writeBinary(_iter243); + oprot.writeListBegin(new TList(TType.STRING, _iter260.size())); + for (byte[] _iter261 : _iter260) { + oprot.writeBinary(_iter261); } oprot.writeListEnd(); } diff --git a/client/src/main/generated/com/vesoft/nebula/storage/KVGetRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/KVGetRequest.java index f25c9a279..a02c3ec93 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/KVGetRequest.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/KVGetRequest.java @@ -341,29 +341,29 @@ public void read(TProtocol iprot) throws TException { case PARTS: if (__field.type == TType.MAP) { { - TMap _map204 = iprot.readMapBegin(); - this.parts = new HashMap>(Math.max(0, 2*_map204.size)); - for (int _i205 = 0; - (_map204.size < 0) ? iprot.peekMap() : (_i205 < _map204.size); - ++_i205) + TMap _map222 = iprot.readMapBegin(); + this.parts = new HashMap>(Math.max(0, 2*_map222.size)); + for (int _i223 = 0; + (_map222.size < 0) ? iprot.peekMap() : (_i223 < _map222.size); + ++_i223) { - int _key206; - List _val207; - _key206 = iprot.readI32(); + int _key224; + List _val225; + _key224 = iprot.readI32(); { - TList _list208 = iprot.readListBegin(); - _val207 = new ArrayList(Math.max(0, _list208.size)); - for (int _i209 = 0; - (_list208.size < 0) ? iprot.peekList() : (_i209 < _list208.size); - ++_i209) + TList _list226 = iprot.readListBegin(); + _val225 = new ArrayList(Math.max(0, _list226.size)); + for (int _i227 = 0; + (_list226.size < 0) ? iprot.peekList() : (_i227 < _list226.size); + ++_i227) { - byte[] _elem210; - _elem210 = iprot.readBinary(); - _val207.add(_elem210); + byte[] _elem228; + _elem228 = iprot.readBinary(); + _val225.add(_elem228); } iprot.readListEnd(); } - this.parts.put(_key206, _val207); + this.parts.put(_key224, _val225); } iprot.readMapEnd(); } @@ -403,12 +403,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> _iter211 : this.parts.entrySet()) { - oprot.writeI32(_iter211.getKey()); + for (Map.Entry> _iter229 : this.parts.entrySet()) { + oprot.writeI32(_iter229.getKey()); { - oprot.writeListBegin(new TList(TType.STRING, _iter211.getValue().size())); - for (byte[] _iter212 : _iter211.getValue()) { - oprot.writeBinary(_iter212); + oprot.writeListBegin(new TList(TType.STRING, _iter229.getValue().size())); + for (byte[] _iter230 : _iter229.getValue()) { + oprot.writeBinary(_iter230); } oprot.writeListEnd(); } diff --git a/client/src/main/generated/com/vesoft/nebula/storage/KVGetResponse.java b/client/src/main/generated/com/vesoft/nebula/storage/KVGetResponse.java index 407eb2d97..0a5f6ede2 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/KVGetResponse.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/KVGetResponse.java @@ -275,17 +275,17 @@ public void read(TProtocol iprot) throws TException { case KEY_VALUES: if (__field.type == TType.MAP) { { - TMap _map213 = iprot.readMapBegin(); - this.key_values = new HashMap(Math.max(0, 2*_map213.size)); - for (int _i214 = 0; - (_map213.size < 0) ? iprot.peekMap() : (_i214 < _map213.size); - ++_i214) + TMap _map231 = iprot.readMapBegin(); + this.key_values = new HashMap(Math.max(0, 2*_map231.size)); + for (int _i232 = 0; + (_map231.size < 0) ? iprot.peekMap() : (_i232 < _map231.size); + ++_i232) { - byte[] _key215; - byte[] _val216; - _key215 = iprot.readBinary(); - _val216 = iprot.readBinary(); - this.key_values.put(_key215, _val216); + byte[] _key233; + byte[] _val234; + _key233 = iprot.readBinary(); + _val234 = iprot.readBinary(); + this.key_values.put(_key233, _val234); } iprot.readMapEnd(); } @@ -319,9 +319,9 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(KEY_VALUES_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.key_values.size())); - for (Map.Entry _iter217 : this.key_values.entrySet()) { - oprot.writeBinary(_iter217.getKey()); - oprot.writeBinary(_iter217.getValue()); + for (Map.Entry _iter235 : this.key_values.entrySet()) { + oprot.writeBinary(_iter235.getKey()); + oprot.writeBinary(_iter235.getValue()); } oprot.writeMapEnd(); } diff --git a/client/src/main/generated/com/vesoft/nebula/storage/KVPutRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/KVPutRequest.java index d61e6088e..74f10c522 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/KVPutRequest.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/KVPutRequest.java @@ -277,30 +277,30 @@ public void read(TProtocol iprot) throws TException { case PARTS: if (__field.type == TType.MAP) { { - TMap _map218 = iprot.readMapBegin(); - this.parts = new HashMap>(Math.max(0, 2*_map218.size)); - for (int _i219 = 0; - (_map218.size < 0) ? iprot.peekMap() : (_i219 < _map218.size); - ++_i219) + TMap _map236 = iprot.readMapBegin(); + this.parts = new HashMap>(Math.max(0, 2*_map236.size)); + for (int _i237 = 0; + (_map236.size < 0) ? iprot.peekMap() : (_i237 < _map236.size); + ++_i237) { - int _key220; - List _val221; - _key220 = iprot.readI32(); + int _key238; + List _val239; + _key238 = iprot.readI32(); { - TList _list222 = iprot.readListBegin(); - _val221 = new ArrayList(Math.max(0, _list222.size)); - for (int _i223 = 0; - (_list222.size < 0) ? iprot.peekList() : (_i223 < _list222.size); - ++_i223) + TList _list240 = iprot.readListBegin(); + _val239 = new ArrayList(Math.max(0, _list240.size)); + for (int _i241 = 0; + (_list240.size < 0) ? iprot.peekList() : (_i241 < _list240.size); + ++_i241) { - com.vesoft.nebula.KeyValue _elem224; - _elem224 = new com.vesoft.nebula.KeyValue(); - _elem224.read(iprot); - _val221.add(_elem224); + com.vesoft.nebula.KeyValue _elem242; + _elem242 = new com.vesoft.nebula.KeyValue(); + _elem242.read(iprot); + _val239.add(_elem242); } iprot.readListEnd(); } - this.parts.put(_key220, _val221); + this.parts.put(_key238, _val239); } iprot.readMapEnd(); } @@ -332,12 +332,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> _iter225 : this.parts.entrySet()) { - oprot.writeI32(_iter225.getKey()); + for (Map.Entry> _iter243 : this.parts.entrySet()) { + oprot.writeI32(_iter243.getKey()); { - oprot.writeListBegin(new TList(TType.STRUCT, _iter225.getValue().size())); - for (com.vesoft.nebula.KeyValue _iter226 : _iter225.getValue()) { - _iter226.write(oprot); + oprot.writeListBegin(new TList(TType.STRUCT, _iter243.getValue().size())); + for (com.vesoft.nebula.KeyValue _iter244 : _iter243.getValue()) { + _iter244.write(oprot); } oprot.writeListEnd(); } diff --git a/client/src/main/generated/com/vesoft/nebula/storage/KVRemoveRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/KVRemoveRequest.java index 1d7522a99..7e8a38843 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/KVRemoveRequest.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/KVRemoveRequest.java @@ -277,29 +277,29 @@ public void read(TProtocol iprot) throws TException { case PARTS: if (__field.type == TType.MAP) { { - TMap _map227 = iprot.readMapBegin(); - this.parts = new HashMap>(Math.max(0, 2*_map227.size)); - for (int _i228 = 0; - (_map227.size < 0) ? iprot.peekMap() : (_i228 < _map227.size); - ++_i228) + TMap _map245 = iprot.readMapBegin(); + this.parts = new HashMap>(Math.max(0, 2*_map245.size)); + for (int _i246 = 0; + (_map245.size < 0) ? iprot.peekMap() : (_i246 < _map245.size); + ++_i246) { - int _key229; - List _val230; - _key229 = iprot.readI32(); + int _key247; + List _val248; + _key247 = iprot.readI32(); { - TList _list231 = iprot.readListBegin(); - _val230 = new ArrayList(Math.max(0, _list231.size)); - for (int _i232 = 0; - (_list231.size < 0) ? iprot.peekList() : (_i232 < _list231.size); - ++_i232) + TList _list249 = iprot.readListBegin(); + _val248 = new ArrayList(Math.max(0, _list249.size)); + for (int _i250 = 0; + (_list249.size < 0) ? iprot.peekList() : (_i250 < _list249.size); + ++_i250) { - byte[] _elem233; - _elem233 = iprot.readBinary(); - _val230.add(_elem233); + byte[] _elem251; + _elem251 = iprot.readBinary(); + _val248.add(_elem251); } iprot.readListEnd(); } - this.parts.put(_key229, _val230); + this.parts.put(_key247, _val248); } iprot.readMapEnd(); } @@ -331,12 +331,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> _iter234 : this.parts.entrySet()) { - oprot.writeI32(_iter234.getKey()); + for (Map.Entry> _iter252 : this.parts.entrySet()) { + oprot.writeI32(_iter252.getKey()); { - oprot.writeListBegin(new TList(TType.STRING, _iter234.getValue().size())); - for (byte[] _iter235 : _iter234.getValue()) { - oprot.writeBinary(_iter235); + oprot.writeListBegin(new TList(TType.STRING, _iter252.getValue().size())); + for (byte[] _iter253 : _iter252.getValue()) { + oprot.writeBinary(_iter253); } oprot.writeListEnd(); } diff --git a/client/src/main/generated/com/vesoft/nebula/storage/LookupAndTraverseRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/LookupAndTraverseRequest.java index a3b05ac81..cf0e23274 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/LookupAndTraverseRequest.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/LookupAndTraverseRequest.java @@ -30,15 +30,18 @@ public class LookupAndTraverseRequest implements TBase, java.io.Serializable, Cl private static final TField PARTS_FIELD_DESC = new TField("parts", TType.LIST, (short)2); private static final TField INDICES_FIELD_DESC = new TField("indices", TType.STRUCT, (short)3); private static final TField TRAVERSE_SPEC_FIELD_DESC = new TField("traverse_spec", TType.STRUCT, (short)4); + private static final TField COMMON_FIELD_DESC = new TField("common", TType.STRUCT, (short)5); public int space_id; public List parts; public IndexSpec indices; public TraverseSpec traverse_spec; + public RequestCommon common; public static final int SPACE_ID = 1; public static final int PARTS = 2; public static final int INDICES = 3; public static final int TRAVERSE_SPEC = 4; + public static final int COMMON = 5; // isset id assignments private static final int __SPACE_ID_ISSET_ID = 0; @@ -57,6 +60,8 @@ public class LookupAndTraverseRequest implements TBase, java.io.Serializable, Cl new StructMetaData(TType.STRUCT, IndexSpec.class))); tmpMetaDataMap.put(TRAVERSE_SPEC, new FieldMetaData("traverse_spec", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, TraverseSpec.class))); + tmpMetaDataMap.put(COMMON, new FieldMetaData("common", TFieldRequirementType.OPTIONAL, + new StructMetaData(TType.STRUCT, RequestCommon.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -89,11 +94,27 @@ public LookupAndTraverseRequest( this.traverse_spec = traverse_spec; } + public LookupAndTraverseRequest( + int space_id, + List parts, + IndexSpec indices, + TraverseSpec traverse_spec, + RequestCommon common) { + this(); + this.space_id = space_id; + setSpace_idIsSet(true); + this.parts = parts; + this.indices = indices; + this.traverse_spec = traverse_spec; + this.common = common; + } + public static class Builder { private int space_id; private List parts; private IndexSpec indices; private TraverseSpec traverse_spec; + private RequestCommon common; BitSet __optional_isset = new BitSet(1); @@ -121,6 +142,11 @@ public Builder setTraverse_spec(final TraverseSpec traverse_spec) { return this; } + public Builder setCommon(final RequestCommon common) { + this.common = common; + return this; + } + public LookupAndTraverseRequest build() { LookupAndTraverseRequest result = new LookupAndTraverseRequest(); if (__optional_isset.get(__SPACE_ID_ISSET_ID)) { @@ -129,6 +155,7 @@ public LookupAndTraverseRequest build() { result.setParts(this.parts); result.setIndices(this.indices); result.setTraverse_spec(this.traverse_spec); + result.setCommon(this.common); return result; } } @@ -153,6 +180,9 @@ public LookupAndTraverseRequest(LookupAndTraverseRequest other) { if (other.isSetTraverse_spec()) { this.traverse_spec = TBaseHelper.deepCopy(other.traverse_spec); } + if (other.isSetCommon()) { + this.common = TBaseHelper.deepCopy(other.common); + } } public LookupAndTraverseRequest deepCopy() { @@ -254,6 +284,30 @@ public void setTraverse_specIsSet(boolean __value) { } } + public RequestCommon getCommon() { + return this.common; + } + + public LookupAndTraverseRequest 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) { @@ -289,6 +343,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!"); } @@ -308,6 +370,9 @@ public Object getFieldValue(int fieldID) { case TRAVERSE_SPEC: return getTraverse_spec(); + case COMMON: + return getCommon(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -331,12 +396,14 @@ public boolean equals(Object _that) { if (!TBaseHelper.equalsNobinary(this.isSetTraverse_spec(), that.isSetTraverse_spec(), this.traverse_spec, that.traverse_spec)) { 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, indices, traverse_spec}); + return Arrays.deepHashCode(new Object[] {space_id, parts, indices, traverse_spec, common}); } public void read(TProtocol iprot) throws TException { @@ -361,15 +428,15 @@ public void read(TProtocol iprot) throws TException { case PARTS: if (__field.type == TType.LIST) { { - TList _list167 = iprot.readListBegin(); - this.parts = new ArrayList(Math.max(0, _list167.size)); - for (int _i168 = 0; - (_list167.size < 0) ? iprot.peekList() : (_i168 < _list167.size); - ++_i168) + TList _list185 = iprot.readListBegin(); + this.parts = new ArrayList(Math.max(0, _list185.size)); + for (int _i186 = 0; + (_list185.size < 0) ? iprot.peekList() : (_i186 < _list185.size); + ++_i186) { - int _elem169; - _elem169 = iprot.readI32(); - this.parts.add(_elem169); + int _elem187; + _elem187 = iprot.readI32(); + this.parts.add(_elem187); } iprot.readListEnd(); } @@ -393,6 +460,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; @@ -420,8 +495,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(PARTS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.I32, this.parts.size())); - for (int _iter170 : this.parts) { - oprot.writeI32(_iter170); + for (int _iter188 : this.parts) { + oprot.writeI32(_iter188); } oprot.writeListEnd(); } @@ -437,6 +512,13 @@ public void write(TProtocol oprot) throws TException { this.traverse_spec.write(oprot); oprot.writeFieldEnd(); } + if (this.common != null) { + if (isSetCommon()) { + oprot.writeFieldBegin(COMMON_FIELD_DESC); + this.common.write(oprot); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -496,6 +578,20 @@ public String toString(int indent, boolean prettyPrint) { sb.append(TBaseHelper.toString(this.getTraverse_spec(), 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/LookupIndexRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/LookupIndexRequest.java index ceeca7794..1fb0f9367 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/LookupIndexRequest.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/LookupIndexRequest.java @@ -30,19 +30,26 @@ public class LookupIndexRequest implements TBase, java.io.Serializable, Cloneabl private static final TField PARTS_FIELD_DESC = new TField("parts", TType.LIST, (short)2); private static final TField INDICES_FIELD_DESC = new TField("indices", TType.STRUCT, (short)3); private static final TField RETURN_COLUMNS_FIELD_DESC = new TField("return_columns", TType.LIST, (short)4); + private static final TField COMMON_FIELD_DESC = new TField("common", TType.STRUCT, (short)5); + private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)6); public int space_id; public List parts; public IndexSpec indices; public List return_columns; + public RequestCommon common; + public long limit; public static final int SPACE_ID = 1; public static final int PARTS = 2; public static final int INDICES = 3; public static final int RETURN_COLUMNS = 4; + public static final int COMMON = 5; + public static final int LIMIT = 6; // isset id assignments private static final int __SPACE_ID_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); + private static final int __LIMIT_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); public static final Map metaDataMap; @@ -58,6 +65,10 @@ public class LookupIndexRequest implements TBase, java.io.Serializable, Cloneabl tmpMetaDataMap.put(RETURN_COLUMNS, new FieldMetaData("return_columns", TFieldRequirementType.OPTIONAL, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); + tmpMetaDataMap.put(COMMON, new FieldMetaData("common", TFieldRequirementType.OPTIONAL, + new StructMetaData(TType.STRUCT, RequestCommon.class))); + tmpMetaDataMap.put(LIMIT, new FieldMetaData("limit", TFieldRequirementType.OPTIONAL, + new FieldValueMetaData(TType.I64))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -92,13 +103,18 @@ public LookupIndexRequest( int space_id, List parts, IndexSpec indices, - List return_columns) { + List return_columns, + RequestCommon common, + long limit) { this(); this.space_id = space_id; setSpace_idIsSet(true); this.parts = parts; this.indices = indices; this.return_columns = return_columns; + this.common = common; + this.limit = limit; + setLimitIsSet(true); } public static class Builder { @@ -106,8 +122,10 @@ public static class Builder { private List parts; private IndexSpec indices; private List return_columns; + private RequestCommon common; + private long limit; - BitSet __optional_isset = new BitSet(1); + BitSet __optional_isset = new BitSet(2); public Builder() { } @@ -133,6 +151,17 @@ public Builder setReturn_columns(final List return_columns) { return this; } + public Builder setCommon(final RequestCommon common) { + this.common = common; + return this; + } + + public Builder setLimit(final long limit) { + this.limit = limit; + __optional_isset.set(__LIMIT_ISSET_ID, true); + return this; + } + public LookupIndexRequest build() { LookupIndexRequest result = new LookupIndexRequest(); if (__optional_isset.get(__SPACE_ID_ISSET_ID)) { @@ -141,6 +170,10 @@ public LookupIndexRequest build() { result.setParts(this.parts); result.setIndices(this.indices); result.setReturn_columns(this.return_columns); + result.setCommon(this.common); + if (__optional_isset.get(__LIMIT_ISSET_ID)) { + result.setLimit(this.limit); + } return result; } } @@ -165,6 +198,10 @@ public LookupIndexRequest(LookupIndexRequest other) { if (other.isSetReturn_columns()) { this.return_columns = TBaseHelper.deepCopy(other.return_columns); } + if (other.isSetCommon()) { + this.common = TBaseHelper.deepCopy(other.common); + } + this.limit = TBaseHelper.deepCopy(other.limit); } public LookupIndexRequest deepCopy() { @@ -266,6 +303,53 @@ public void setReturn_columnsIsSet(boolean __value) { } } + public RequestCommon getCommon() { + return this.common; + } + + public LookupIndexRequest 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; + } + } + + public long getLimit() { + return this.limit; + } + + public LookupIndexRequest setLimit(long limit) { + this.limit = limit; + setLimitIsSet(true); + return this; + } + + public void unsetLimit() { + __isset_bit_vector.clear(__LIMIT_ISSET_ID); + } + + // Returns true if field limit is set (has been assigned a value) and false otherwise + public boolean isSetLimit() { + return __isset_bit_vector.get(__LIMIT_ISSET_ID); + } + + public void setLimitIsSet(boolean __value) { + __isset_bit_vector.set(__LIMIT_ISSET_ID, __value); + } + @SuppressWarnings("unchecked") public void setFieldValue(int fieldID, Object __value) { switch (fieldID) { @@ -301,6 +385,22 @@ public void setFieldValue(int fieldID, Object __value) { } break; + case COMMON: + if (__value == null) { + unsetCommon(); + } else { + setCommon((RequestCommon)__value); + } + break; + + case LIMIT: + if (__value == null) { + unsetLimit(); + } else { + setLimit((Long)__value); + } + break; + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -320,6 +420,12 @@ public Object getFieldValue(int fieldID) { case RETURN_COLUMNS: return getReturn_columns(); + case COMMON: + return getCommon(); + + case LIMIT: + return new Long(getLimit()); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -343,12 +449,16 @@ public boolean equals(Object _that) { if (!TBaseHelper.equalsSlow(this.isSetReturn_columns(), that.isSetReturn_columns(), this.return_columns, that.return_columns)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetCommon(), that.isSetCommon(), this.common, that.common)) { return false; } + + if (!TBaseHelper.equalsNobinary(this.isSetLimit(), that.isSetLimit(), this.limit, that.limit)) { return false; } + return true; } @Override public int hashCode() { - return Arrays.deepHashCode(new Object[] {space_id, parts, indices, return_columns}); + return Arrays.deepHashCode(new Object[] {space_id, parts, indices, return_columns, common, limit}); } public void read(TProtocol iprot) throws TException { @@ -373,15 +483,15 @@ public void read(TProtocol iprot) throws TException { case PARTS: if (__field.type == TType.LIST) { { - TList _list159 = iprot.readListBegin(); - this.parts = new ArrayList(Math.max(0, _list159.size)); - for (int _i160 = 0; - (_list159.size < 0) ? iprot.peekList() : (_i160 < _list159.size); - ++_i160) + TList _list177 = iprot.readListBegin(); + this.parts = new ArrayList(Math.max(0, _list177.size)); + for (int _i178 = 0; + (_list177.size < 0) ? iprot.peekList() : (_i178 < _list177.size); + ++_i178) { - int _elem161; - _elem161 = iprot.readI32(); - this.parts.add(_elem161); + int _elem179; + _elem179 = iprot.readI32(); + this.parts.add(_elem179); } iprot.readListEnd(); } @@ -400,15 +510,15 @@ public void read(TProtocol iprot) throws TException { case RETURN_COLUMNS: if (__field.type == TType.LIST) { { - TList _list162 = iprot.readListBegin(); - this.return_columns = new ArrayList(Math.max(0, _list162.size)); - for (int _i163 = 0; - (_list162.size < 0) ? iprot.peekList() : (_i163 < _list162.size); - ++_i163) + TList _list180 = iprot.readListBegin(); + this.return_columns = new ArrayList(Math.max(0, _list180.size)); + for (int _i181 = 0; + (_list180.size < 0) ? iprot.peekList() : (_i181 < _list180.size); + ++_i181) { - byte[] _elem164; - _elem164 = iprot.readBinary(); - this.return_columns.add(_elem164); + byte[] _elem182; + _elem182 = iprot.readBinary(); + this.return_columns.add(_elem182); } iprot.readListEnd(); } @@ -416,6 +526,22 @@ 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; + case LIMIT: + if (__field.type == TType.I64) { + this.limit = iprot.readI64(); + setLimitIsSet(true); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; default: TProtocolUtil.skip(iprot, __field.type); break; @@ -443,8 +569,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(PARTS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.I32, this.parts.size())); - for (int _iter165 : this.parts) { - oprot.writeI32(_iter165); + for (int _iter183 : this.parts) { + oprot.writeI32(_iter183); } oprot.writeListEnd(); } @@ -460,14 +586,26 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(RETURN_COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.return_columns.size())); - for (byte[] _iter166 : this.return_columns) { - oprot.writeBinary(_iter166); + for (byte[] _iter184 : this.return_columns) { + oprot.writeBinary(_iter184); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } } + if (this.common != null) { + if (isSetCommon()) { + oprot.writeFieldBegin(COMMON_FIELD_DESC); + this.common.write(oprot); + oprot.writeFieldEnd(); + } + } + if (isSetLimit()) { + oprot.writeFieldBegin(LIMIT_FIELD_DESC); + oprot.writeI64(this.limit); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -530,6 +668,30 @@ public String toString(int indent, boolean 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; + } + if (isSetLimit()) + { + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("limit"); + sb.append(space); + sb.append(":").append(space); + sb.append(TBaseHelper.toString(this.getLimit(), 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/NewEdge.java b/client/src/main/generated/com/vesoft/nebula/storage/NewEdge.java index ee045936f..6c9c63f88 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/NewEdge.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/NewEdge.java @@ -237,16 +237,16 @@ public void read(TProtocol iprot) throws TException { case PROPS: if (__field.type == TType.LIST) { { - TList _list82 = iprot.readListBegin(); - this.props = new ArrayList(Math.max(0, _list82.size)); - for (int _i83 = 0; - (_list82.size < 0) ? iprot.peekList() : (_i83 < _list82.size); - ++_i83) + TList _list87 = iprot.readListBegin(); + this.props = new ArrayList(Math.max(0, _list87.size)); + for (int _i88 = 0; + (_list87.size < 0) ? iprot.peekList() : (_i88 < _list87.size); + ++_i88) { - com.vesoft.nebula.Value _elem84; - _elem84 = new com.vesoft.nebula.Value(); - _elem84.read(iprot); - this.props.add(_elem84); + com.vesoft.nebula.Value _elem89; + _elem89 = new com.vesoft.nebula.Value(); + _elem89.read(iprot); + this.props.add(_elem89); } iprot.readListEnd(); } @@ -280,8 +280,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(PROPS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.props.size())); - for (com.vesoft.nebula.Value _iter85 : this.props) { - _iter85.write(oprot); + for (com.vesoft.nebula.Value _iter90 : this.props) { + _iter90.write(oprot); } oprot.writeListEnd(); } diff --git a/client/src/main/generated/com/vesoft/nebula/storage/NewTag.java b/client/src/main/generated/com/vesoft/nebula/storage/NewTag.java index c0a2f7179..c9bba4b8e 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/NewTag.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/NewTag.java @@ -244,16 +244,16 @@ public void read(TProtocol iprot) throws TException { case PROPS: if (__field.type == TType.LIST) { { - TList _list74 = iprot.readListBegin(); - this.props = new ArrayList(Math.max(0, _list74.size)); - for (int _i75 = 0; - (_list74.size < 0) ? iprot.peekList() : (_i75 < _list74.size); - ++_i75) + TList _list79 = iprot.readListBegin(); + this.props = new ArrayList(Math.max(0, _list79.size)); + for (int _i80 = 0; + (_list79.size < 0) ? iprot.peekList() : (_i80 < _list79.size); + ++_i80) { - com.vesoft.nebula.Value _elem76; - _elem76 = new com.vesoft.nebula.Value(); - _elem76.read(iprot); - this.props.add(_elem76); + com.vesoft.nebula.Value _elem81; + _elem81 = new com.vesoft.nebula.Value(); + _elem81.read(iprot); + this.props.add(_elem81); } iprot.readListEnd(); } @@ -285,8 +285,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(PROPS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.props.size())); - for (com.vesoft.nebula.Value _iter77 : this.props) { - _iter77.write(oprot); + for (com.vesoft.nebula.Value _iter82 : this.props) { + _iter82.write(oprot); } oprot.writeListEnd(); } diff --git a/client/src/main/generated/com/vesoft/nebula/storage/NewVertex.java b/client/src/main/generated/com/vesoft/nebula/storage/NewVertex.java index 28de8e462..620e70486 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/NewVertex.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/NewVertex.java @@ -237,16 +237,16 @@ public void read(TProtocol iprot) throws TException { case TAGS: if (__field.type == TType.LIST) { { - TList _list78 = iprot.readListBegin(); - this.tags = new ArrayList(Math.max(0, _list78.size)); - for (int _i79 = 0; - (_list78.size < 0) ? iprot.peekList() : (_i79 < _list78.size); - ++_i79) + TList _list83 = iprot.readListBegin(); + this.tags = new ArrayList(Math.max(0, _list83.size)); + for (int _i84 = 0; + (_list83.size < 0) ? iprot.peekList() : (_i84 < _list83.size); + ++_i84) { - NewTag _elem80; - _elem80 = new NewTag(); - _elem80.read(iprot); - this.tags.add(_elem80); + NewTag _elem85; + _elem85 = new NewTag(); + _elem85.read(iprot); + this.tags.add(_elem85); } iprot.readListEnd(); } @@ -280,8 +280,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(TAGS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.tags.size())); - for (NewTag _iter81 : this.tags) { - _iter81.write(oprot); + for (NewTag _iter86 : this.tags) { + _iter86.write(oprot); } oprot.writeListEnd(); } diff --git a/client/src/main/generated/com/vesoft/nebula/storage/RebuildIndexRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/RebuildIndexRequest.java index cf75aaf5f..905ce8be5 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/RebuildIndexRequest.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/RebuildIndexRequest.java @@ -339,15 +339,15 @@ public void read(TProtocol iprot) throws TException { case PARTS: if (__field.type == TType.LIST) { { - TList _list196 = iprot.readListBegin(); - this.parts = new ArrayList(Math.max(0, _list196.size)); - for (int _i197 = 0; - (_list196.size < 0) ? iprot.peekList() : (_i197 < _list196.size); - ++_i197) + TList _list214 = iprot.readListBegin(); + this.parts = new ArrayList(Math.max(0, _list214.size)); + for (int _i215 = 0; + (_list214.size < 0) ? iprot.peekList() : (_i215 < _list214.size); + ++_i215) { - int _elem198; - _elem198 = iprot.readI32(); - this.parts.add(_elem198); + int _elem216; + _elem216 = iprot.readI32(); + this.parts.add(_elem216); } iprot.readListEnd(); } @@ -387,8 +387,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(PARTS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.I32, this.parts.size())); - for (int _iter199 : this.parts) { - oprot.writeI32(_iter199); + for (int _iter217 : this.parts) { + oprot.writeI32(_iter217); } oprot.writeListEnd(); } diff --git a/client/src/main/generated/com/vesoft/nebula/storage/RequestCommon.java b/client/src/main/generated/com/vesoft/nebula/storage/RequestCommon.java new file mode 100644 index 000000000..96a5a568e --- /dev/null +++ b/client/src/main/generated/com/vesoft/nebula/storage/RequestCommon.java @@ -0,0 +1,359 @@ +/** + * 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 RequestCommon implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("RequestCommon"); + private static final TField SESSION_ID_FIELD_DESC = new TField("session_id", TType.I64, (short)1); + private static final TField PLAN_ID_FIELD_DESC = new TField("plan_id", TType.I64, (short)2); + + public long session_id; + public long plan_id; + public static final int SESSION_ID = 1; + public static final int PLAN_ID = 2; + + // isset id assignments + private static final int __SESSION_ID_ISSET_ID = 0; + private static final int __PLAN_ID_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + + public static final Map metaDataMap; + + static { + Map tmpMetaDataMap = new HashMap(); + tmpMetaDataMap.put(SESSION_ID, new FieldMetaData("session_id", TFieldRequirementType.OPTIONAL, + new FieldValueMetaData(TType.I64))); + tmpMetaDataMap.put(PLAN_ID, new FieldMetaData("plan_id", TFieldRequirementType.OPTIONAL, + new FieldValueMetaData(TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); + } + + static { + FieldMetaData.addStructMetaDataMap(RequestCommon.class, metaDataMap); + } + + public RequestCommon() { + } + + public RequestCommon( + long session_id, + long plan_id) { + this(); + this.session_id = session_id; + setSession_idIsSet(true); + this.plan_id = plan_id; + setPlan_idIsSet(true); + } + + public static class Builder { + private long session_id; + private long plan_id; + + BitSet __optional_isset = new BitSet(2); + + public Builder() { + } + + public Builder setSession_id(final long session_id) { + this.session_id = session_id; + __optional_isset.set(__SESSION_ID_ISSET_ID, true); + return this; + } + + public Builder setPlan_id(final long plan_id) { + this.plan_id = plan_id; + __optional_isset.set(__PLAN_ID_ISSET_ID, true); + return this; + } + + public RequestCommon build() { + RequestCommon result = new RequestCommon(); + if (__optional_isset.get(__SESSION_ID_ISSET_ID)) { + result.setSession_id(this.session_id); + } + if (__optional_isset.get(__PLAN_ID_ISSET_ID)) { + result.setPlan_id(this.plan_id); + } + return result; + } + } + + public static Builder builder() { + return new Builder(); + } + + /** + * Performs a deep copy on other. + */ + public RequestCommon(RequestCommon other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.session_id = TBaseHelper.deepCopy(other.session_id); + this.plan_id = TBaseHelper.deepCopy(other.plan_id); + } + + public RequestCommon deepCopy() { + return new RequestCommon(this); + } + + public long getSession_id() { + return this.session_id; + } + + public RequestCommon setSession_id(long session_id) { + this.session_id = session_id; + setSession_idIsSet(true); + return this; + } + + public void unsetSession_id() { + __isset_bit_vector.clear(__SESSION_ID_ISSET_ID); + } + + // Returns true if field session_id is set (has been assigned a value) and false otherwise + public boolean isSetSession_id() { + return __isset_bit_vector.get(__SESSION_ID_ISSET_ID); + } + + public void setSession_idIsSet(boolean __value) { + __isset_bit_vector.set(__SESSION_ID_ISSET_ID, __value); + } + + public long getPlan_id() { + return this.plan_id; + } + + public RequestCommon setPlan_id(long plan_id) { + this.plan_id = plan_id; + setPlan_idIsSet(true); + return this; + } + + public void unsetPlan_id() { + __isset_bit_vector.clear(__PLAN_ID_ISSET_ID); + } + + // Returns true if field plan_id is set (has been assigned a value) and false otherwise + public boolean isSetPlan_id() { + return __isset_bit_vector.get(__PLAN_ID_ISSET_ID); + } + + public void setPlan_idIsSet(boolean __value) { + __isset_bit_vector.set(__PLAN_ID_ISSET_ID, __value); + } + + public void setFieldValue(int fieldID, Object __value) { + switch (fieldID) { + case SESSION_ID: + if (__value == null) { + unsetSession_id(); + } else { + setSession_id((Long)__value); + } + break; + + case PLAN_ID: + if (__value == null) { + unsetPlan_id(); + } else { + setPlan_id((Long)__value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SESSION_ID: + return new Long(getSession_id()); + + case PLAN_ID: + return new Long(getPlan_id()); + + 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 RequestCommon)) + return false; + RequestCommon that = (RequestCommon)_that; + + if (!TBaseHelper.equalsNobinary(this.isSetSession_id(), that.isSetSession_id(), this.session_id, that.session_id)) { return false; } + + if (!TBaseHelper.equalsNobinary(this.isSetPlan_id(), that.isSetPlan_id(), this.plan_id, that.plan_id)) { return false; } + + return true; + } + + @Override + public int hashCode() { + return Arrays.deepHashCode(new Object[] {session_id, plan_id}); + } + + @Override + public int compareTo(RequestCommon other) { + if (other == null) { + // See java.lang.Comparable docs + throw new NullPointerException(); + } + + if (other == this) { + return 0; + } + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSession_id()).compareTo(other.isSetSession_id()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(session_id, other.session_id); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = Boolean.valueOf(isSetPlan_id()).compareTo(other.isSetPlan_id()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(plan_id, other.plan_id); + 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 SESSION_ID: + if (__field.type == TType.I64) { + this.session_id = iprot.readI64(); + setSession_idIsSet(true); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + case PLAN_ID: + if (__field.type == TType.I64) { + this.plan_id = iprot.readI64(); + setPlan_idIsSet(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 (isSetSession_id()) { + oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); + oprot.writeI64(this.session_id); + oprot.writeFieldEnd(); + } + if (isSetPlan_id()) { + oprot.writeFieldBegin(PLAN_ID_FIELD_DESC); + oprot.writeI64(this.plan_id); + 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("RequestCommon"); + sb.append(space); + sb.append("("); + sb.append(newLine); + boolean first = true; + + if (isSetSession_id()) + { + sb.append(indentStr); + sb.append("session_id"); + sb.append(space); + sb.append(":").append(space); + sb.append(TBaseHelper.toString(this.getSession_id(), indent + 1, prettyPrint)); + first = false; + } + if (isSetPlan_id()) + { + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("plan_id"); + sb.append(space); + sb.append(":").append(space); + sb.append(TBaseHelper.toString(this.getPlan_id(), 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/ResponseCommon.java b/client/src/main/generated/com/vesoft/nebula/storage/ResponseCommon.java index 0776d7c33..45f84e544 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/ResponseCommon.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/ResponseCommon.java @@ -28,11 +28,14 @@ public class ResponseCommon implements TBase, java.io.Serializable, Cloneable, C private static final TStruct STRUCT_DESC = new TStruct("ResponseCommon"); private static final TField FAILED_PARTS_FIELD_DESC = new TField("failed_parts", TType.LIST, (short)1); private static final TField LATENCY_IN_US_FIELD_DESC = new TField("latency_in_us", TType.I32, (short)2); + private static final TField LATENCY_DETAIL_US_FIELD_DESC = new TField("latency_detail_us", TType.MAP, (short)3); public List failed_parts; public int latency_in_us; + public Map latency_detail_us; public static final int FAILED_PARTS = 1; public static final int LATENCY_IN_US = 2; + public static final int LATENCY_DETAIL_US = 3; // isset id assignments private static final int __LATENCY_IN_US_ISSET_ID = 0; @@ -47,6 +50,10 @@ public class ResponseCommon implements TBase, java.io.Serializable, Cloneable, C new StructMetaData(TType.STRUCT, PartitionResult.class)))); tmpMetaDataMap.put(LATENCY_IN_US, new FieldMetaData("latency_in_us", TFieldRequirementType.REQUIRED, new FieldValueMetaData(TType.I32))); + tmpMetaDataMap.put(LATENCY_DETAIL_US, new FieldMetaData("latency_detail_us", TFieldRequirementType.OPTIONAL, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.I32)))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -66,9 +73,21 @@ public ResponseCommon( setLatency_in_usIsSet(true); } + public ResponseCommon( + List failed_parts, + int latency_in_us, + Map latency_detail_us) { + this(); + this.failed_parts = failed_parts; + this.latency_in_us = latency_in_us; + setLatency_in_usIsSet(true); + this.latency_detail_us = latency_detail_us; + } + public static class Builder { private List failed_parts; private int latency_in_us; + private Map latency_detail_us; BitSet __optional_isset = new BitSet(1); @@ -86,12 +105,18 @@ public Builder setLatency_in_us(final int latency_in_us) { return this; } + public Builder setLatency_detail_us(final Map latency_detail_us) { + this.latency_detail_us = latency_detail_us; + return this; + } + public ResponseCommon build() { ResponseCommon result = new ResponseCommon(); result.setFailed_parts(this.failed_parts); if (__optional_isset.get(__LATENCY_IN_US_ISSET_ID)) { result.setLatency_in_us(this.latency_in_us); } + result.setLatency_detail_us(this.latency_detail_us); return result; } } @@ -110,6 +135,9 @@ public ResponseCommon(ResponseCommon other) { this.failed_parts = TBaseHelper.deepCopy(other.failed_parts); } this.latency_in_us = TBaseHelper.deepCopy(other.latency_in_us); + if (other.isSetLatency_detail_us()) { + this.latency_detail_us = TBaseHelper.deepCopy(other.latency_detail_us); + } } public ResponseCommon deepCopy() { @@ -163,6 +191,30 @@ public void setLatency_in_usIsSet(boolean __value) { __isset_bit_vector.set(__LATENCY_IN_US_ISSET_ID, __value); } + public Map getLatency_detail_us() { + return this.latency_detail_us; + } + + public ResponseCommon setLatency_detail_us(Map latency_detail_us) { + this.latency_detail_us = latency_detail_us; + return this; + } + + public void unsetLatency_detail_us() { + this.latency_detail_us = null; + } + + // Returns true if field latency_detail_us is set (has been assigned a value) and false otherwise + public boolean isSetLatency_detail_us() { + return this.latency_detail_us != null; + } + + public void setLatency_detail_usIsSet(boolean __value) { + if (!__value) { + this.latency_detail_us = null; + } + } + @SuppressWarnings("unchecked") public void setFieldValue(int fieldID, Object __value) { switch (fieldID) { @@ -182,6 +234,14 @@ public void setFieldValue(int fieldID, Object __value) { } break; + case LATENCY_DETAIL_US: + if (__value == null) { + unsetLatency_detail_us(); + } else { + setLatency_detail_us((Map)__value); + } + break; + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -195,6 +255,9 @@ public Object getFieldValue(int fieldID) { case LATENCY_IN_US: return new Integer(getLatency_in_us()); + case LATENCY_DETAIL_US: + return getLatency_detail_us(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -214,12 +277,14 @@ public boolean equals(Object _that) { if (!TBaseHelper.equalsNobinary(this.latency_in_us, that.latency_in_us)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetLatency_detail_us(), that.isSetLatency_detail_us(), this.latency_detail_us, that.latency_detail_us)) { return false; } + return true; } @Override public int hashCode() { - return Arrays.deepHashCode(new Object[] {failed_parts, latency_in_us}); + return Arrays.deepHashCode(new Object[] {failed_parts, latency_in_us, latency_detail_us}); } @Override @@ -250,6 +315,14 @@ public int compareTo(ResponseCommon other) { if (lastComparison != 0) { return lastComparison; } + lastComparison = Boolean.valueOf(isSetLatency_detail_us()).compareTo(other.isSetLatency_detail_us()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(latency_detail_us, other.latency_detail_us); + if (lastComparison != 0) { + return lastComparison; + } return 0; } @@ -292,6 +365,27 @@ public void read(TProtocol iprot) throws TException { TProtocolUtil.skip(iprot, __field.type); } break; + case LATENCY_DETAIL_US: + if (__field.type == TType.MAP) { + { + TMap _map3 = iprot.readMapBegin(); + this.latency_detail_us = new HashMap(Math.max(0, 2*_map3.size)); + for (int _i4 = 0; + (_map3.size < 0) ? iprot.peekMap() : (_i4 < _map3.size); + ++_i4) + { + String _key5; + int _val6; + _key5 = iprot.readString(); + _val6 = iprot.readI32(); + this.latency_detail_us.put(_key5, _val6); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; default: TProtocolUtil.skip(iprot, __field.type); break; @@ -316,8 +410,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(FAILED_PARTS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.failed_parts.size())); - for (PartitionResult _iter3 : this.failed_parts) { - _iter3.write(oprot); + for (PartitionResult _iter7 : this.failed_parts) { + _iter7.write(oprot); } oprot.writeListEnd(); } @@ -326,6 +420,20 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(LATENCY_IN_US_FIELD_DESC); oprot.writeI32(this.latency_in_us); oprot.writeFieldEnd(); + if (this.latency_detail_us != null) { + if (isSetLatency_detail_us()) { + oprot.writeFieldBegin(LATENCY_DETAIL_US_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.I32, this.latency_detail_us.size())); + for (Map.Entry _iter8 : this.latency_detail_us.entrySet()) { + oprot.writeString(_iter8.getKey()); + oprot.writeI32(_iter8.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -363,6 +471,20 @@ public String toString(int indent, boolean prettyPrint) { sb.append(":").append(space); sb.append(TBaseHelper.toString(this.getLatency_in_us(), indent + 1, prettyPrint)); first = false; + if (isSetLatency_detail_us()) + { + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("latency_detail_us"); + sb.append(space); + sb.append(":").append(space); + if (this.getLatency_detail_us() == null) { + sb.append("null"); + } else { + sb.append(TBaseHelper.toString(this.getLatency_detail_us(), 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/ScanEdgeRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/ScanEdgeRequest.java index 1379124c9..39bb5df67 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/ScanEdgeRequest.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/ScanEdgeRequest.java @@ -36,6 +36,7 @@ public class ScanEdgeRequest implements TBase, java.io.Serializable, Cloneable, private static final TField FILTER_FIELD_DESC = new TField("filter", TType.STRING, (short)8); private static final TField ONLY_LATEST_VERSION_FIELD_DESC = new TField("only_latest_version", TType.BOOL, (short)9); private static final TField ENABLE_READ_FROM_FOLLOWER_FIELD_DESC = new TField("enable_read_from_follower", TType.BOOL, (short)10); + private static final TField COMMON_FIELD_DESC = new TField("common", TType.STRUCT, (short)11); public int space_id; public int part_id; @@ -47,6 +48,7 @@ public class ScanEdgeRequest implements TBase, java.io.Serializable, Cloneable, public byte[] filter; public boolean only_latest_version; public boolean enable_read_from_follower; + public RequestCommon common; public static final int SPACE_ID = 1; public static final int PART_ID = 2; public static final int CURSOR = 3; @@ -57,6 +59,7 @@ public class ScanEdgeRequest implements TBase, java.io.Serializable, Cloneable, public static final int FILTER = 8; public static final int ONLY_LATEST_VERSION = 9; public static final int ENABLE_READ_FROM_FOLLOWER = 10; + public static final int COMMON = 11; // isset id assignments private static final int __SPACE_ID_ISSET_ID = 0; @@ -92,6 +95,8 @@ public class ScanEdgeRequest implements TBase, java.io.Serializable, Cloneable, new FieldValueMetaData(TType.BOOL))); tmpMetaDataMap.put(ENABLE_READ_FROM_FOLLOWER, new FieldMetaData("enable_read_from_follower", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); + tmpMetaDataMap.put(COMMON, new FieldMetaData("common", TFieldRequirementType.OPTIONAL, + new StructMetaData(TType.STRUCT, RequestCommon.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -137,7 +142,8 @@ public ScanEdgeRequest( long end_time, byte[] filter, boolean only_latest_version, - boolean enable_read_from_follower) { + boolean enable_read_from_follower, + RequestCommon common) { this(); this.space_id = space_id; setSpace_idIsSet(true); @@ -156,6 +162,7 @@ public ScanEdgeRequest( setOnly_latest_versionIsSet(true); this.enable_read_from_follower = enable_read_from_follower; setEnable_read_from_followerIsSet(true); + this.common = common; } public static class Builder { @@ -169,6 +176,7 @@ public static class Builder { private byte[] filter; private boolean only_latest_version; private boolean enable_read_from_follower; + private RequestCommon common; BitSet __optional_isset = new BitSet(7); @@ -232,6 +240,11 @@ public Builder setEnable_read_from_follower(final boolean enable_read_from_follo return this; } + public Builder setCommon(final RequestCommon common) { + this.common = common; + return this; + } + public ScanEdgeRequest build() { ScanEdgeRequest result = new ScanEdgeRequest(); if (__optional_isset.get(__SPACE_ID_ISSET_ID)) { @@ -258,6 +271,7 @@ public ScanEdgeRequest build() { if (__optional_isset.get(__ENABLE_READ_FROM_FOLLOWER_ISSET_ID)) { result.setEnable_read_from_follower(this.enable_read_from_follower); } + result.setCommon(this.common); return result; } } @@ -288,6 +302,9 @@ public ScanEdgeRequest(ScanEdgeRequest other) { } this.only_latest_version = TBaseHelper.deepCopy(other.only_latest_version); this.enable_read_from_follower = TBaseHelper.deepCopy(other.enable_read_from_follower); + if (other.isSetCommon()) { + this.common = TBaseHelper.deepCopy(other.common); + } } public ScanEdgeRequest deepCopy() { @@ -527,6 +544,30 @@ public void setEnable_read_from_followerIsSet(boolean __value) { __isset_bit_vector.set(__ENABLE_READ_FROM_FOLLOWER_ISSET_ID, __value); } + public RequestCommon getCommon() { + return this.common; + } + + public ScanEdgeRequest 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; + } + } + public void setFieldValue(int fieldID, Object __value) { switch (fieldID) { case SPACE_ID: @@ -609,6 +650,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!"); } @@ -646,6 +695,9 @@ public Object getFieldValue(int fieldID) { case ENABLE_READ_FROM_FOLLOWER: return new Boolean(isEnable_read_from_follower()); + case COMMON: + return getCommon(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -681,12 +733,14 @@ public boolean equals(Object _that) { if (!TBaseHelper.equalsNobinary(this.enable_read_from_follower, that.enable_read_from_follower)) { 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, part_id, cursor, return_columns, limit, start_time, end_time, filter, only_latest_version, enable_read_from_follower}); + return Arrays.deepHashCode(new Object[] {space_id, part_id, cursor, return_columns, limit, start_time, end_time, filter, only_latest_version, enable_read_from_follower, common}); } @Override @@ -781,6 +835,14 @@ public int compareTo(ScanEdgeRequest other) { if (lastComparison != 0) { return lastComparison; } + lastComparison = Boolean.valueOf(isSetCommon()).compareTo(other.isSetCommon()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(common, other.common); + if (lastComparison != 0) { + return lastComparison; + } return 0; } @@ -873,6 +935,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; @@ -934,6 +1004,13 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(ENABLE_READ_FROM_FOLLOWER_FIELD_DESC); oprot.writeBool(this.enable_read_from_follower); oprot.writeFieldEnd(); + if (this.common != null) { + if (isSetCommon()) { + oprot.writeFieldBegin(COMMON_FIELD_DESC); + this.common.write(oprot); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -1057,6 +1134,20 @@ public String toString(int indent, boolean prettyPrint) { sb.append(":").append(space); sb.append(TBaseHelper.toString(this.isEnable_read_from_follower(), 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/ScanVertexRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/ScanVertexRequest.java index de737a949..73fb4532b 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/ScanVertexRequest.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/ScanVertexRequest.java @@ -36,6 +36,7 @@ public class ScanVertexRequest implements TBase, java.io.Serializable, Cloneable private static final TField FILTER_FIELD_DESC = new TField("filter", TType.STRING, (short)8); private static final TField ONLY_LATEST_VERSION_FIELD_DESC = new TField("only_latest_version", TType.BOOL, (short)9); private static final TField ENABLE_READ_FROM_FOLLOWER_FIELD_DESC = new TField("enable_read_from_follower", TType.BOOL, (short)10); + private static final TField COMMON_FIELD_DESC = new TField("common", TType.STRUCT, (short)11); public int space_id; public int part_id; @@ -47,6 +48,7 @@ public class ScanVertexRequest implements TBase, java.io.Serializable, Cloneable public byte[] filter; public boolean only_latest_version; public boolean enable_read_from_follower; + public RequestCommon common; public static final int SPACE_ID = 1; public static final int PART_ID = 2; public static final int CURSOR = 3; @@ -57,6 +59,7 @@ public class ScanVertexRequest implements TBase, java.io.Serializable, Cloneable public static final int FILTER = 8; public static final int ONLY_LATEST_VERSION = 9; public static final int ENABLE_READ_FROM_FOLLOWER = 10; + public static final int COMMON = 11; // isset id assignments private static final int __SPACE_ID_ISSET_ID = 0; @@ -92,6 +95,8 @@ public class ScanVertexRequest implements TBase, java.io.Serializable, Cloneable new FieldValueMetaData(TType.BOOL))); tmpMetaDataMap.put(ENABLE_READ_FROM_FOLLOWER, new FieldMetaData("enable_read_from_follower", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); + tmpMetaDataMap.put(COMMON, new FieldMetaData("common", TFieldRequirementType.OPTIONAL, + new StructMetaData(TType.STRUCT, RequestCommon.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -137,7 +142,8 @@ public ScanVertexRequest( long end_time, byte[] filter, boolean only_latest_version, - boolean enable_read_from_follower) { + boolean enable_read_from_follower, + RequestCommon common) { this(); this.space_id = space_id; setSpace_idIsSet(true); @@ -156,6 +162,7 @@ public ScanVertexRequest( setOnly_latest_versionIsSet(true); this.enable_read_from_follower = enable_read_from_follower; setEnable_read_from_followerIsSet(true); + this.common = common; } public static class Builder { @@ -169,6 +176,7 @@ public static class Builder { private byte[] filter; private boolean only_latest_version; private boolean enable_read_from_follower; + private RequestCommon common; BitSet __optional_isset = new BitSet(7); @@ -232,6 +240,11 @@ public Builder setEnable_read_from_follower(final boolean enable_read_from_follo return this; } + public Builder setCommon(final RequestCommon common) { + this.common = common; + return this; + } + public ScanVertexRequest build() { ScanVertexRequest result = new ScanVertexRequest(); if (__optional_isset.get(__SPACE_ID_ISSET_ID)) { @@ -258,6 +271,7 @@ public ScanVertexRequest build() { if (__optional_isset.get(__ENABLE_READ_FROM_FOLLOWER_ISSET_ID)) { result.setEnable_read_from_follower(this.enable_read_from_follower); } + result.setCommon(this.common); return result; } } @@ -288,6 +302,9 @@ public ScanVertexRequest(ScanVertexRequest other) { } this.only_latest_version = TBaseHelper.deepCopy(other.only_latest_version); this.enable_read_from_follower = TBaseHelper.deepCopy(other.enable_read_from_follower); + if (other.isSetCommon()) { + this.common = TBaseHelper.deepCopy(other.common); + } } public ScanVertexRequest deepCopy() { @@ -527,6 +544,30 @@ public void setEnable_read_from_followerIsSet(boolean __value) { __isset_bit_vector.set(__ENABLE_READ_FROM_FOLLOWER_ISSET_ID, __value); } + public RequestCommon getCommon() { + return this.common; + } + + public ScanVertexRequest 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; + } + } + public void setFieldValue(int fieldID, Object __value) { switch (fieldID) { case SPACE_ID: @@ -609,6 +650,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!"); } @@ -646,6 +695,9 @@ public Object getFieldValue(int fieldID) { case ENABLE_READ_FROM_FOLLOWER: return new Boolean(isEnable_read_from_follower()); + case COMMON: + return getCommon(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -681,12 +733,14 @@ public boolean equals(Object _that) { if (!TBaseHelper.equalsNobinary(this.enable_read_from_follower, that.enable_read_from_follower)) { 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, part_id, cursor, return_columns, limit, start_time, end_time, filter, only_latest_version, enable_read_from_follower}); + return Arrays.deepHashCode(new Object[] {space_id, part_id, cursor, return_columns, limit, start_time, end_time, filter, only_latest_version, enable_read_from_follower, common}); } @Override @@ -781,6 +835,14 @@ public int compareTo(ScanVertexRequest other) { if (lastComparison != 0) { return lastComparison; } + lastComparison = Boolean.valueOf(isSetCommon()).compareTo(other.isSetCommon()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(common, other.common); + if (lastComparison != 0) { + return lastComparison; + } return 0; } @@ -873,6 +935,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; @@ -934,6 +1004,13 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(ENABLE_READ_FROM_FOLLOWER_FIELD_DESC); oprot.writeBool(this.enable_read_from_follower); oprot.writeFieldEnd(); + if (this.common != null) { + if (isSetCommon()) { + oprot.writeFieldBegin(COMMON_FIELD_DESC); + this.common.write(oprot); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -1057,6 +1134,20 @@ public String toString(int indent, boolean prettyPrint) { sb.append(":").append(space); sb.append(TBaseHelper.toString(this.isEnable_read_from_follower(), 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/StorageAdminService.java b/client/src/main/generated/com/vesoft/nebula/storage/StorageAdminService.java index 8c3b68ed7..8b6e3019c 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/StorageAdminService.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/StorageAdminService.java @@ -868,17 +868,17 @@ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientM super(protocolFactory, clientManager, transport); } - public void transLeader(TransLeaderReq req, AsyncMethodCallback resultHandler347) throws TException { + public void transLeader(TransLeaderReq req, AsyncMethodCallback resultHandler371) throws TException { checkReady(); - transLeader_call method_call = new transLeader_call(req, resultHandler347, this, ___protocolFactory, ___transport); + transLeader_call method_call = new transLeader_call(req, resultHandler371, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class transLeader_call extends TAsyncMethodCall { private TransLeaderReq req; - public transLeader_call(TransLeaderReq req, AsyncMethodCallback resultHandler348, TAsyncClient client344, TProtocolFactory protocolFactory345, TNonblockingTransport transport346) throws TException { - super(client344, protocolFactory345, transport346, resultHandler348, false); + public transLeader_call(TransLeaderReq req, AsyncMethodCallback resultHandler372, TAsyncClient client368, TProtocolFactory protocolFactory369, TNonblockingTransport transport370) throws TException { + super(client368, protocolFactory369, transport370, resultHandler372, false); this.req = req; } @@ -900,17 +900,17 @@ public AdminExecResp getResult() throws TException { } } - public void addPart(AddPartReq req, AsyncMethodCallback resultHandler352) throws TException { + public void addPart(AddPartReq req, AsyncMethodCallback resultHandler376) throws TException { checkReady(); - addPart_call method_call = new addPart_call(req, resultHandler352, this, ___protocolFactory, ___transport); + addPart_call method_call = new addPart_call(req, resultHandler376, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addPart_call extends TAsyncMethodCall { private AddPartReq req; - public addPart_call(AddPartReq req, AsyncMethodCallback resultHandler353, TAsyncClient client349, TProtocolFactory protocolFactory350, TNonblockingTransport transport351) throws TException { - super(client349, protocolFactory350, transport351, resultHandler353, false); + public addPart_call(AddPartReq req, AsyncMethodCallback resultHandler377, TAsyncClient client373, TProtocolFactory protocolFactory374, TNonblockingTransport transport375) throws TException { + super(client373, protocolFactory374, transport375, resultHandler377, false); this.req = req; } @@ -932,17 +932,17 @@ public AdminExecResp getResult() throws TException { } } - public void addLearner(AddLearnerReq req, AsyncMethodCallback resultHandler357) throws TException { + public void addLearner(AddLearnerReq req, AsyncMethodCallback resultHandler381) throws TException { checkReady(); - addLearner_call method_call = new addLearner_call(req, resultHandler357, this, ___protocolFactory, ___transport); + addLearner_call method_call = new addLearner_call(req, resultHandler381, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addLearner_call extends TAsyncMethodCall { private AddLearnerReq req; - public addLearner_call(AddLearnerReq req, AsyncMethodCallback resultHandler358, TAsyncClient client354, TProtocolFactory protocolFactory355, TNonblockingTransport transport356) throws TException { - super(client354, protocolFactory355, transport356, resultHandler358, false); + public addLearner_call(AddLearnerReq req, AsyncMethodCallback resultHandler382, TAsyncClient client378, TProtocolFactory protocolFactory379, TNonblockingTransport transport380) throws TException { + super(client378, protocolFactory379, transport380, resultHandler382, false); this.req = req; } @@ -964,17 +964,17 @@ public AdminExecResp getResult() throws TException { } } - public void removePart(RemovePartReq req, AsyncMethodCallback resultHandler362) throws TException { + public void removePart(RemovePartReq req, AsyncMethodCallback resultHandler386) throws TException { checkReady(); - removePart_call method_call = new removePart_call(req, resultHandler362, this, ___protocolFactory, ___transport); + removePart_call method_call = new removePart_call(req, resultHandler386, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class removePart_call extends TAsyncMethodCall { private RemovePartReq req; - public removePart_call(RemovePartReq req, AsyncMethodCallback resultHandler363, TAsyncClient client359, TProtocolFactory protocolFactory360, TNonblockingTransport transport361) throws TException { - super(client359, protocolFactory360, transport361, resultHandler363, false); + public removePart_call(RemovePartReq req, AsyncMethodCallback resultHandler387, TAsyncClient client383, TProtocolFactory protocolFactory384, TNonblockingTransport transport385) throws TException { + super(client383, protocolFactory384, transport385, resultHandler387, false); this.req = req; } @@ -996,17 +996,17 @@ public AdminExecResp getResult() throws TException { } } - public void memberChange(MemberChangeReq req, AsyncMethodCallback resultHandler367) throws TException { + public void memberChange(MemberChangeReq req, AsyncMethodCallback resultHandler391) throws TException { checkReady(); - memberChange_call method_call = new memberChange_call(req, resultHandler367, this, ___protocolFactory, ___transport); + memberChange_call method_call = new memberChange_call(req, resultHandler391, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class memberChange_call extends TAsyncMethodCall { private MemberChangeReq req; - public memberChange_call(MemberChangeReq req, AsyncMethodCallback resultHandler368, TAsyncClient client364, TProtocolFactory protocolFactory365, TNonblockingTransport transport366) throws TException { - super(client364, protocolFactory365, transport366, resultHandler368, false); + public memberChange_call(MemberChangeReq req, AsyncMethodCallback resultHandler392, TAsyncClient client388, TProtocolFactory protocolFactory389, TNonblockingTransport transport390) throws TException { + super(client388, protocolFactory389, transport390, resultHandler392, false); this.req = req; } @@ -1028,17 +1028,17 @@ public AdminExecResp getResult() throws TException { } } - public void waitingForCatchUpData(CatchUpDataReq req, AsyncMethodCallback resultHandler372) throws TException { + public void waitingForCatchUpData(CatchUpDataReq req, AsyncMethodCallback resultHandler396) throws TException { checkReady(); - waitingForCatchUpData_call method_call = new waitingForCatchUpData_call(req, resultHandler372, this, ___protocolFactory, ___transport); + waitingForCatchUpData_call method_call = new waitingForCatchUpData_call(req, resultHandler396, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class waitingForCatchUpData_call extends TAsyncMethodCall { private CatchUpDataReq req; - public waitingForCatchUpData_call(CatchUpDataReq req, AsyncMethodCallback resultHandler373, TAsyncClient client369, TProtocolFactory protocolFactory370, TNonblockingTransport transport371) throws TException { - super(client369, protocolFactory370, transport371, resultHandler373, false); + public waitingForCatchUpData_call(CatchUpDataReq req, AsyncMethodCallback resultHandler397, TAsyncClient client393, TProtocolFactory protocolFactory394, TNonblockingTransport transport395) throws TException { + super(client393, protocolFactory394, transport395, resultHandler397, false); this.req = req; } @@ -1060,17 +1060,17 @@ public AdminExecResp getResult() throws TException { } } - public void createCheckpoint(CreateCPRequest req, AsyncMethodCallback resultHandler377) throws TException { + public void createCheckpoint(CreateCPRequest req, AsyncMethodCallback resultHandler401) throws TException { checkReady(); - createCheckpoint_call method_call = new createCheckpoint_call(req, resultHandler377, this, ___protocolFactory, ___transport); + createCheckpoint_call method_call = new createCheckpoint_call(req, resultHandler401, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createCheckpoint_call extends TAsyncMethodCall { private CreateCPRequest req; - public createCheckpoint_call(CreateCPRequest req, AsyncMethodCallback resultHandler378, TAsyncClient client374, TProtocolFactory protocolFactory375, TNonblockingTransport transport376) throws TException { - super(client374, protocolFactory375, transport376, resultHandler378, false); + public createCheckpoint_call(CreateCPRequest req, AsyncMethodCallback resultHandler402, TAsyncClient client398, TProtocolFactory protocolFactory399, TNonblockingTransport transport400) throws TException { + super(client398, protocolFactory399, transport400, resultHandler402, false); this.req = req; } @@ -1092,17 +1092,17 @@ public CreateCPResp getResult() throws TException { } } - public void dropCheckpoint(DropCPRequest req, AsyncMethodCallback resultHandler382) throws TException { + public void dropCheckpoint(DropCPRequest req, AsyncMethodCallback resultHandler406) throws TException { checkReady(); - dropCheckpoint_call method_call = new dropCheckpoint_call(req, resultHandler382, this, ___protocolFactory, ___transport); + dropCheckpoint_call method_call = new dropCheckpoint_call(req, resultHandler406, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropCheckpoint_call extends TAsyncMethodCall { private DropCPRequest req; - public dropCheckpoint_call(DropCPRequest req, AsyncMethodCallback resultHandler383, TAsyncClient client379, TProtocolFactory protocolFactory380, TNonblockingTransport transport381) throws TException { - super(client379, protocolFactory380, transport381, resultHandler383, false); + public dropCheckpoint_call(DropCPRequest req, AsyncMethodCallback resultHandler407, TAsyncClient client403, TProtocolFactory protocolFactory404, TNonblockingTransport transport405) throws TException { + super(client403, protocolFactory404, transport405, resultHandler407, false); this.req = req; } @@ -1124,17 +1124,17 @@ public AdminExecResp getResult() throws TException { } } - public void blockingWrites(BlockingSignRequest req, AsyncMethodCallback resultHandler387) throws TException { + public void blockingWrites(BlockingSignRequest req, AsyncMethodCallback resultHandler411) throws TException { checkReady(); - blockingWrites_call method_call = new blockingWrites_call(req, resultHandler387, this, ___protocolFactory, ___transport); + blockingWrites_call method_call = new blockingWrites_call(req, resultHandler411, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class blockingWrites_call extends TAsyncMethodCall { private BlockingSignRequest req; - public blockingWrites_call(BlockingSignRequest req, AsyncMethodCallback resultHandler388, TAsyncClient client384, TProtocolFactory protocolFactory385, TNonblockingTransport transport386) throws TException { - super(client384, protocolFactory385, transport386, resultHandler388, false); + public blockingWrites_call(BlockingSignRequest req, AsyncMethodCallback resultHandler412, TAsyncClient client408, TProtocolFactory protocolFactory409, TNonblockingTransport transport410) throws TException { + super(client408, protocolFactory409, transport410, resultHandler412, false); this.req = req; } @@ -1156,17 +1156,17 @@ public AdminExecResp getResult() throws TException { } } - public void rebuildTagIndex(RebuildIndexRequest req, AsyncMethodCallback resultHandler392) throws TException { + public void rebuildTagIndex(RebuildIndexRequest req, AsyncMethodCallback resultHandler416) throws TException { checkReady(); - rebuildTagIndex_call method_call = new rebuildTagIndex_call(req, resultHandler392, this, ___protocolFactory, ___transport); + rebuildTagIndex_call method_call = new rebuildTagIndex_call(req, resultHandler416, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class rebuildTagIndex_call extends TAsyncMethodCall { private RebuildIndexRequest req; - public rebuildTagIndex_call(RebuildIndexRequest req, AsyncMethodCallback resultHandler393, TAsyncClient client389, TProtocolFactory protocolFactory390, TNonblockingTransport transport391) throws TException { - super(client389, protocolFactory390, transport391, resultHandler393, false); + public rebuildTagIndex_call(RebuildIndexRequest req, AsyncMethodCallback resultHandler417, TAsyncClient client413, TProtocolFactory protocolFactory414, TNonblockingTransport transport415) throws TException { + super(client413, protocolFactory414, transport415, resultHandler417, false); this.req = req; } @@ -1188,17 +1188,17 @@ public AdminExecResp getResult() throws TException { } } - public void rebuildEdgeIndex(RebuildIndexRequest req, AsyncMethodCallback resultHandler397) throws TException { + public void rebuildEdgeIndex(RebuildIndexRequest req, AsyncMethodCallback resultHandler421) throws TException { checkReady(); - rebuildEdgeIndex_call method_call = new rebuildEdgeIndex_call(req, resultHandler397, this, ___protocolFactory, ___transport); + rebuildEdgeIndex_call method_call = new rebuildEdgeIndex_call(req, resultHandler421, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class rebuildEdgeIndex_call extends TAsyncMethodCall { private RebuildIndexRequest req; - public rebuildEdgeIndex_call(RebuildIndexRequest req, AsyncMethodCallback resultHandler398, TAsyncClient client394, TProtocolFactory protocolFactory395, TNonblockingTransport transport396) throws TException { - super(client394, protocolFactory395, transport396, resultHandler398, false); + public rebuildEdgeIndex_call(RebuildIndexRequest req, AsyncMethodCallback resultHandler422, TAsyncClient client418, TProtocolFactory protocolFactory419, TNonblockingTransport transport420) throws TException { + super(client418, protocolFactory419, transport420, resultHandler422, false); this.req = req; } @@ -1220,17 +1220,17 @@ public AdminExecResp getResult() throws TException { } } - public void getLeaderParts(GetLeaderReq req, AsyncMethodCallback resultHandler402) throws TException { + public void getLeaderParts(GetLeaderReq req, AsyncMethodCallback resultHandler426) throws TException { checkReady(); - getLeaderParts_call method_call = new getLeaderParts_call(req, resultHandler402, this, ___protocolFactory, ___transport); + getLeaderParts_call method_call = new getLeaderParts_call(req, resultHandler426, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getLeaderParts_call extends TAsyncMethodCall { private GetLeaderReq req; - public getLeaderParts_call(GetLeaderReq req, AsyncMethodCallback resultHandler403, TAsyncClient client399, TProtocolFactory protocolFactory400, TNonblockingTransport transport401) throws TException { - super(client399, protocolFactory400, transport401, resultHandler403, false); + public getLeaderParts_call(GetLeaderReq req, AsyncMethodCallback resultHandler427, TAsyncClient client423, TProtocolFactory protocolFactory424, TNonblockingTransport transport425) throws TException { + super(client423, protocolFactory424, transport425, resultHandler427, false); this.req = req; } @@ -1252,17 +1252,17 @@ public GetLeaderPartsResp getResult() throws TException { } } - public void checkPeers(CheckPeersReq req, AsyncMethodCallback resultHandler407) throws TException { + public void checkPeers(CheckPeersReq req, AsyncMethodCallback resultHandler431) throws TException { checkReady(); - checkPeers_call method_call = new checkPeers_call(req, resultHandler407, this, ___protocolFactory, ___transport); + checkPeers_call method_call = new checkPeers_call(req, resultHandler431, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class checkPeers_call extends TAsyncMethodCall { private CheckPeersReq req; - public checkPeers_call(CheckPeersReq req, AsyncMethodCallback resultHandler408, TAsyncClient client404, TProtocolFactory protocolFactory405, TNonblockingTransport transport406) throws TException { - super(client404, protocolFactory405, transport406, resultHandler408, false); + public checkPeers_call(CheckPeersReq req, AsyncMethodCallback resultHandler432, TAsyncClient client428, TProtocolFactory protocolFactory429, TNonblockingTransport transport430) throws TException { + super(client428, protocolFactory429, transport430, resultHandler432, false); this.req = req; } @@ -1284,17 +1284,17 @@ public AdminExecResp getResult() throws TException { } } - public void addAdminTask(AddAdminTaskRequest req, AsyncMethodCallback resultHandler412) throws TException { + public void addAdminTask(AddAdminTaskRequest req, AsyncMethodCallback resultHandler436) throws TException { checkReady(); - addAdminTask_call method_call = new addAdminTask_call(req, resultHandler412, this, ___protocolFactory, ___transport); + addAdminTask_call method_call = new addAdminTask_call(req, resultHandler436, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addAdminTask_call extends TAsyncMethodCall { private AddAdminTaskRequest req; - public addAdminTask_call(AddAdminTaskRequest req, AsyncMethodCallback resultHandler413, TAsyncClient client409, TProtocolFactory protocolFactory410, TNonblockingTransport transport411) throws TException { - super(client409, protocolFactory410, transport411, resultHandler413, false); + public addAdminTask_call(AddAdminTaskRequest req, AsyncMethodCallback resultHandler437, TAsyncClient client433, TProtocolFactory protocolFactory434, TNonblockingTransport transport435) throws TException { + super(client433, protocolFactory434, transport435, resultHandler437, false); this.req = req; } @@ -1316,17 +1316,17 @@ public AdminExecResp getResult() throws TException { } } - public void stopAdminTask(StopAdminTaskRequest req, AsyncMethodCallback resultHandler417) throws TException { + public void stopAdminTask(StopAdminTaskRequest req, AsyncMethodCallback resultHandler441) throws TException { checkReady(); - stopAdminTask_call method_call = new stopAdminTask_call(req, resultHandler417, this, ___protocolFactory, ___transport); + stopAdminTask_call method_call = new stopAdminTask_call(req, resultHandler441, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class stopAdminTask_call extends TAsyncMethodCall { private StopAdminTaskRequest req; - public stopAdminTask_call(StopAdminTaskRequest req, AsyncMethodCallback resultHandler418, TAsyncClient client414, TProtocolFactory protocolFactory415, TNonblockingTransport transport416) throws TException { - super(client414, protocolFactory415, transport416, resultHandler418, false); + public stopAdminTask_call(StopAdminTaskRequest req, AsyncMethodCallback resultHandler442, TAsyncClient client438, TProtocolFactory protocolFactory439, TNonblockingTransport transport440) throws TException { + super(client438, protocolFactory439, transport440, resultHandler442, false); this.req = req; } @@ -1348,17 +1348,17 @@ public AdminExecResp getResult() throws TException { } } - public void listClusterInfo(ListClusterInfoReq req, AsyncMethodCallback resultHandler422) throws TException { + public void listClusterInfo(ListClusterInfoReq req, AsyncMethodCallback resultHandler446) throws TException { checkReady(); - listClusterInfo_call method_call = new listClusterInfo_call(req, resultHandler422, this, ___protocolFactory, ___transport); + listClusterInfo_call method_call = new listClusterInfo_call(req, resultHandler446, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listClusterInfo_call extends TAsyncMethodCall { private ListClusterInfoReq req; - public listClusterInfo_call(ListClusterInfoReq req, AsyncMethodCallback resultHandler423, TAsyncClient client419, TProtocolFactory protocolFactory420, TNonblockingTransport transport421) throws TException { - super(client419, protocolFactory420, transport421, resultHandler423, false); + public listClusterInfo_call(ListClusterInfoReq req, AsyncMethodCallback resultHandler447, TAsyncClient client443, TProtocolFactory protocolFactory444, TNonblockingTransport transport445) throws TException { + super(client443, protocolFactory444, transport445, resultHandler447, false); this.req = req; } diff --git a/client/src/main/generated/com/vesoft/nebula/storage/TaskPara.java b/client/src/main/generated/com/vesoft/nebula/storage/TaskPara.java index 99515f5c7..e7366d6bd 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/TaskPara.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/TaskPara.java @@ -345,15 +345,15 @@ public void read(TProtocol iprot) throws TException { case PARTS: if (__field.type == TType.LIST) { { - TList _list171 = iprot.readListBegin(); - this.parts = new ArrayList(Math.max(0, _list171.size)); - for (int _i172 = 0; - (_list171.size < 0) ? iprot.peekList() : (_i172 < _list171.size); - ++_i172) + TList _list189 = iprot.readListBegin(); + this.parts = new ArrayList(Math.max(0, _list189.size)); + for (int _i190 = 0; + (_list189.size < 0) ? iprot.peekList() : (_i190 < _list189.size); + ++_i190) { - int _elem173; - _elem173 = iprot.readI32(); - this.parts.add(_elem173); + int _elem191; + _elem191 = iprot.readI32(); + this.parts.add(_elem191); } iprot.readListEnd(); } @@ -364,15 +364,15 @@ public void read(TProtocol iprot) throws TException { case TASK_SPECFIC_PARAS: if (__field.type == TType.LIST) { { - TList _list174 = iprot.readListBegin(); - this.task_specfic_paras = new ArrayList(Math.max(0, _list174.size)); - for (int _i175 = 0; - (_list174.size < 0) ? iprot.peekList() : (_i175 < _list174.size); - ++_i175) + TList _list192 = iprot.readListBegin(); + this.task_specfic_paras = new ArrayList(Math.max(0, _list192.size)); + for (int _i193 = 0; + (_list192.size < 0) ? iprot.peekList() : (_i193 < _list192.size); + ++_i193) { - byte[] _elem176; - _elem176 = iprot.readBinary(); - this.task_specfic_paras.add(_elem176); + byte[] _elem194; + _elem194 = iprot.readBinary(); + this.task_specfic_paras.add(_elem194); } iprot.readListEnd(); } @@ -405,8 +405,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(PARTS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.I32, this.parts.size())); - for (int _iter177 : this.parts) { - oprot.writeI32(_iter177); + for (int _iter195 : this.parts) { + oprot.writeI32(_iter195); } oprot.writeListEnd(); } @@ -418,8 +418,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(TASK_SPECFIC_PARAS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.task_specfic_paras.size())); - for (byte[] _iter178 : this.task_specfic_paras) { - oprot.writeBinary(_iter178); + for (byte[] _iter196 : this.task_specfic_paras) { + oprot.writeBinary(_iter196); } oprot.writeListEnd(); } diff --git a/client/src/main/generated/com/vesoft/nebula/storage/TraverseSpec.java b/client/src/main/generated/com/vesoft/nebula/storage/TraverseSpec.java index 8ff427ed1..be79d3797 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/TraverseSpec.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/TraverseSpec.java @@ -861,15 +861,15 @@ public void read(TProtocol iprot) throws TException { case EDGE_TYPES: if (__field.type == TType.LIST) { { - TList _list12 = iprot.readListBegin(); - this.edge_types = new ArrayList(Math.max(0, _list12.size)); - for (int _i13 = 0; - (_list12.size < 0) ? iprot.peekList() : (_i13 < _list12.size); - ++_i13) + TList _list17 = iprot.readListBegin(); + this.edge_types = new ArrayList(Math.max(0, _list17.size)); + for (int _i18 = 0; + (_list17.size < 0) ? iprot.peekList() : (_i18 < _list17.size); + ++_i18) { - int _elem14; - _elem14 = iprot.readI32(); - this.edge_types.add(_elem14); + int _elem19; + _elem19 = iprot.readI32(); + this.edge_types.add(_elem19); } iprot.readListEnd(); } @@ -895,16 +895,16 @@ public void read(TProtocol iprot) throws TException { case STAT_PROPS: if (__field.type == TType.LIST) { { - TList _list15 = iprot.readListBegin(); - this.stat_props = new ArrayList(Math.max(0, _list15.size)); - for (int _i16 = 0; - (_list15.size < 0) ? iprot.peekList() : (_i16 < _list15.size); - ++_i16) + TList _list20 = iprot.readListBegin(); + this.stat_props = new ArrayList(Math.max(0, _list20.size)); + for (int _i21 = 0; + (_list20.size < 0) ? iprot.peekList() : (_i21 < _list20.size); + ++_i21) { - StatProp _elem17; - _elem17 = new StatProp(); - _elem17.read(iprot); - this.stat_props.add(_elem17); + StatProp _elem22; + _elem22 = new StatProp(); + _elem22.read(iprot); + this.stat_props.add(_elem22); } iprot.readListEnd(); } @@ -915,16 +915,16 @@ public void read(TProtocol iprot) throws TException { case VERTEX_PROPS: if (__field.type == TType.LIST) { { - TList _list18 = iprot.readListBegin(); - this.vertex_props = new ArrayList(Math.max(0, _list18.size)); - for (int _i19 = 0; - (_list18.size < 0) ? iprot.peekList() : (_i19 < _list18.size); - ++_i19) + TList _list23 = iprot.readListBegin(); + this.vertex_props = new ArrayList(Math.max(0, _list23.size)); + for (int _i24 = 0; + (_list23.size < 0) ? iprot.peekList() : (_i24 < _list23.size); + ++_i24) { - VertexProp _elem20; - _elem20 = new VertexProp(); - _elem20.read(iprot); - this.vertex_props.add(_elem20); + VertexProp _elem25; + _elem25 = new VertexProp(); + _elem25.read(iprot); + this.vertex_props.add(_elem25); } iprot.readListEnd(); } @@ -935,16 +935,16 @@ public void read(TProtocol iprot) throws TException { case EDGE_PROPS: if (__field.type == TType.LIST) { { - TList _list21 = iprot.readListBegin(); - this.edge_props = new ArrayList(Math.max(0, _list21.size)); - for (int _i22 = 0; - (_list21.size < 0) ? iprot.peekList() : (_i22 < _list21.size); - ++_i22) + TList _list26 = iprot.readListBegin(); + this.edge_props = new ArrayList(Math.max(0, _list26.size)); + for (int _i27 = 0; + (_list26.size < 0) ? iprot.peekList() : (_i27 < _list26.size); + ++_i27) { - EdgeProp _elem23; - _elem23 = new EdgeProp(); - _elem23.read(iprot); - this.edge_props.add(_elem23); + EdgeProp _elem28; + _elem28 = new EdgeProp(); + _elem28.read(iprot); + this.edge_props.add(_elem28); } iprot.readListEnd(); } @@ -955,16 +955,16 @@ public void read(TProtocol iprot) throws TException { case EXPRESSIONS: if (__field.type == TType.LIST) { { - TList _list24 = iprot.readListBegin(); - this.expressions = new ArrayList(Math.max(0, _list24.size)); - for (int _i25 = 0; - (_list24.size < 0) ? iprot.peekList() : (_i25 < _list24.size); - ++_i25) + TList _list29 = iprot.readListBegin(); + this.expressions = new ArrayList(Math.max(0, _list29.size)); + for (int _i30 = 0; + (_list29.size < 0) ? iprot.peekList() : (_i30 < _list29.size); + ++_i30) { - Expr _elem26; - _elem26 = new Expr(); - _elem26.read(iprot); - this.expressions.add(_elem26); + Expr _elem31; + _elem31 = new Expr(); + _elem31.read(iprot); + this.expressions.add(_elem31); } iprot.readListEnd(); } @@ -975,16 +975,16 @@ public void read(TProtocol iprot) throws TException { case ORDER_BY: if (__field.type == TType.LIST) { { - TList _list27 = iprot.readListBegin(); - this.order_by = new ArrayList(Math.max(0, _list27.size)); - for (int _i28 = 0; - (_list27.size < 0) ? iprot.peekList() : (_i28 < _list27.size); - ++_i28) + TList _list32 = iprot.readListBegin(); + this.order_by = new ArrayList(Math.max(0, _list32.size)); + for (int _i33 = 0; + (_list32.size < 0) ? iprot.peekList() : (_i33 < _list32.size); + ++_i33) { - OrderBy _elem29; - _elem29 = new OrderBy(); - _elem29.read(iprot); - this.order_by.add(_elem29); + OrderBy _elem34; + _elem34 = new OrderBy(); + _elem34.read(iprot); + this.order_by.add(_elem34); } iprot.readListEnd(); } @@ -1036,8 +1036,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(EDGE_TYPES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.I32, this.edge_types.size())); - for (int _iter30 : this.edge_types) { - oprot.writeI32(_iter30); + for (int _iter35 : this.edge_types) { + oprot.writeI32(_iter35); } oprot.writeListEnd(); } @@ -1056,8 +1056,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(STAT_PROPS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.stat_props.size())); - for (StatProp _iter31 : this.stat_props) { - _iter31.write(oprot); + for (StatProp _iter36 : this.stat_props) { + _iter36.write(oprot); } oprot.writeListEnd(); } @@ -1069,8 +1069,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(VERTEX_PROPS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.vertex_props.size())); - for (VertexProp _iter32 : this.vertex_props) { - _iter32.write(oprot); + for (VertexProp _iter37 : this.vertex_props) { + _iter37.write(oprot); } oprot.writeListEnd(); } @@ -1082,8 +1082,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(EDGE_PROPS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.edge_props.size())); - for (EdgeProp _iter33 : this.edge_props) { - _iter33.write(oprot); + for (EdgeProp _iter38 : this.edge_props) { + _iter38.write(oprot); } oprot.writeListEnd(); } @@ -1095,8 +1095,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(EXPRESSIONS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.expressions.size())); - for (Expr _iter34 : this.expressions) { - _iter34.write(oprot); + for (Expr _iter39 : this.expressions) { + _iter39.write(oprot); } oprot.writeListEnd(); } @@ -1108,8 +1108,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(ORDER_BY_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.order_by.size())); - for (OrderBy _iter35 : this.order_by) { - _iter35.write(oprot); + for (OrderBy _iter40 : this.order_by) { + _iter40.write(oprot); } oprot.writeListEnd(); } diff --git a/client/src/main/generated/com/vesoft/nebula/storage/UpdateEdgeRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/UpdateEdgeRequest.java index 193bca455..2e3a4345e 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/UpdateEdgeRequest.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/UpdateEdgeRequest.java @@ -33,6 +33,7 @@ public class UpdateEdgeRequest implements TBase, java.io.Serializable, Cloneable private static final TField INSERTABLE_FIELD_DESC = new TField("insertable", TType.BOOL, (short)5); private static final TField RETURN_PROPS_FIELD_DESC = new TField("return_props", TType.LIST, (short)6); private static final TField CONDITION_FIELD_DESC = new TField("condition", TType.STRING, (short)7); + private static final TField COMMON_FIELD_DESC = new TField("common", TType.STRUCT, (short)8); public int space_id; public int part_id; @@ -41,6 +42,7 @@ public class UpdateEdgeRequest implements TBase, java.io.Serializable, Cloneable public boolean insertable; public List return_props; public byte[] condition; + public RequestCommon common; public static final int SPACE_ID = 1; public static final int PART_ID = 2; public static final int EDGE_KEY = 3; @@ -48,6 +50,7 @@ public class UpdateEdgeRequest implements TBase, java.io.Serializable, Cloneable public static final int INSERTABLE = 5; public static final int RETURN_PROPS = 6; public static final int CONDITION = 7; + public static final int COMMON = 8; // isset id assignments private static final int __SPACE_ID_ISSET_ID = 0; @@ -75,6 +78,8 @@ public class UpdateEdgeRequest implements TBase, java.io.Serializable, Cloneable new FieldValueMetaData(TType.STRING)))); tmpMetaDataMap.put(CONDITION, new FieldMetaData("condition", TFieldRequirementType.OPTIONAL, new FieldValueMetaData(TType.STRING))); + tmpMetaDataMap.put(COMMON, new FieldMetaData("common", TFieldRequirementType.OPTIONAL, + new StructMetaData(TType.STRUCT, RequestCommon.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -108,7 +113,8 @@ public UpdateEdgeRequest( List updated_props, boolean insertable, List return_props, - byte[] condition) { + byte[] condition, + RequestCommon common) { this(); this.space_id = space_id; setSpace_idIsSet(true); @@ -120,6 +126,7 @@ public UpdateEdgeRequest( setInsertableIsSet(true); this.return_props = return_props; this.condition = condition; + this.common = common; } public static class Builder { @@ -130,6 +137,7 @@ public static class Builder { private boolean insertable; private List return_props; private byte[] condition; + private RequestCommon common; BitSet __optional_isset = new BitSet(3); @@ -174,6 +182,11 @@ public Builder setCondition(final byte[] condition) { return this; } + public Builder setCommon(final RequestCommon common) { + this.common = common; + return this; + } + public UpdateEdgeRequest build() { UpdateEdgeRequest result = new UpdateEdgeRequest(); if (__optional_isset.get(__SPACE_ID_ISSET_ID)) { @@ -189,6 +202,7 @@ public UpdateEdgeRequest build() { } result.setReturn_props(this.return_props); result.setCondition(this.condition); + result.setCommon(this.common); return result; } } @@ -218,6 +232,9 @@ public UpdateEdgeRequest(UpdateEdgeRequest other) { if (other.isSetCondition()) { this.condition = TBaseHelper.deepCopy(other.condition); } + if (other.isSetCommon()) { + this.common = TBaseHelper.deepCopy(other.common); + } } public UpdateEdgeRequest deepCopy() { @@ -389,6 +406,30 @@ public void setConditionIsSet(boolean __value) { } } + public RequestCommon getCommon() { + return this.common; + } + + public UpdateEdgeRequest 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) { @@ -448,6 +489,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!"); } @@ -476,6 +525,9 @@ public Object getFieldValue(int fieldID) { case CONDITION: return getCondition(); + case COMMON: + return getCommon(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -505,12 +557,14 @@ public boolean equals(Object _that) { if (!TBaseHelper.equalsSlow(this.isSetCondition(), that.isSetCondition(), this.condition, that.condition)) { 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, part_id, edge_key, updated_props, insertable, return_props, condition}); + return Arrays.deepHashCode(new Object[] {space_id, part_id, edge_key, updated_props, insertable, return_props, condition, common}); } public void read(TProtocol iprot) throws TException { @@ -551,16 +605,16 @@ public void read(TProtocol iprot) throws TException { case UPDATED_PROPS: if (__field.type == TType.LIST) { { - TList _list143 = iprot.readListBegin(); - this.updated_props = new ArrayList(Math.max(0, _list143.size)); - for (int _i144 = 0; - (_list143.size < 0) ? iprot.peekList() : (_i144 < _list143.size); - ++_i144) + TList _list161 = iprot.readListBegin(); + this.updated_props = new ArrayList(Math.max(0, _list161.size)); + for (int _i162 = 0; + (_list161.size < 0) ? iprot.peekList() : (_i162 < _list161.size); + ++_i162) { - UpdatedProp _elem145; - _elem145 = new UpdatedProp(); - _elem145.read(iprot); - this.updated_props.add(_elem145); + UpdatedProp _elem163; + _elem163 = new UpdatedProp(); + _elem163.read(iprot); + this.updated_props.add(_elem163); } iprot.readListEnd(); } @@ -579,15 +633,15 @@ public void read(TProtocol iprot) throws TException { case RETURN_PROPS: if (__field.type == TType.LIST) { { - TList _list146 = iprot.readListBegin(); - this.return_props = new ArrayList(Math.max(0, _list146.size)); - for (int _i147 = 0; - (_list146.size < 0) ? iprot.peekList() : (_i147 < _list146.size); - ++_i147) + TList _list164 = iprot.readListBegin(); + this.return_props = new ArrayList(Math.max(0, _list164.size)); + for (int _i165 = 0; + (_list164.size < 0) ? iprot.peekList() : (_i165 < _list164.size); + ++_i165) { - byte[] _elem148; - _elem148 = iprot.readBinary(); - this.return_props.add(_elem148); + byte[] _elem166; + _elem166 = iprot.readBinary(); + this.return_props.add(_elem166); } iprot.readListEnd(); } @@ -602,6 +656,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; @@ -634,8 +696,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(UPDATED_PROPS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.updated_props.size())); - for (UpdatedProp _iter149 : this.updated_props) { - _iter149.write(oprot); + for (UpdatedProp _iter167 : this.updated_props) { + _iter167.write(oprot); } oprot.writeListEnd(); } @@ -651,8 +713,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(RETURN_PROPS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.return_props.size())); - for (byte[] _iter150 : this.return_props) { - oprot.writeBinary(_iter150); + for (byte[] _iter168 : this.return_props) { + oprot.writeBinary(_iter168); } oprot.writeListEnd(); } @@ -666,6 +728,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(); } @@ -764,6 +833,20 @@ public String toString(int indent, boolean 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/UpdateVertexRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/UpdateVertexRequest.java index a756d3f6c..f763de60f 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/UpdateVertexRequest.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/UpdateVertexRequest.java @@ -34,6 +34,7 @@ public class UpdateVertexRequest implements TBase, java.io.Serializable, Cloneab private static final TField INSERTABLE_FIELD_DESC = new TField("insertable", TType.BOOL, (short)6); private static final TField RETURN_PROPS_FIELD_DESC = new TField("return_props", TType.LIST, (short)7); private static final TField CONDITION_FIELD_DESC = new TField("condition", TType.STRING, (short)8); + private static final TField COMMON_FIELD_DESC = new TField("common", TType.STRUCT, (short)9); public int space_id; public int part_id; @@ -43,6 +44,7 @@ public class UpdateVertexRequest implements TBase, java.io.Serializable, Cloneab public boolean insertable; public List return_props; public byte[] condition; + public RequestCommon common; public static final int SPACE_ID = 1; public static final int PART_ID = 2; public static final int VERTEX_ID = 3; @@ -51,6 +53,7 @@ public class UpdateVertexRequest implements TBase, java.io.Serializable, Cloneab public static final int INSERTABLE = 6; public static final int RETURN_PROPS = 7; public static final int CONDITION = 8; + public static final int COMMON = 9; // isset id assignments private static final int __SPACE_ID_ISSET_ID = 0; @@ -81,6 +84,8 @@ public class UpdateVertexRequest implements TBase, java.io.Serializable, Cloneab new FieldValueMetaData(TType.STRING)))); tmpMetaDataMap.put(CONDITION, new FieldMetaData("condition", TFieldRequirementType.OPTIONAL, new FieldValueMetaData(TType.STRING))); + tmpMetaDataMap.put(COMMON, new FieldMetaData("common", TFieldRequirementType.OPTIONAL, + new StructMetaData(TType.STRUCT, RequestCommon.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -125,7 +130,8 @@ public UpdateVertexRequest( List updated_props, boolean insertable, List return_props, - byte[] condition) { + byte[] condition, + RequestCommon common) { this(); this.space_id = space_id; setSpace_idIsSet(true); @@ -139,6 +145,7 @@ public UpdateVertexRequest( setInsertableIsSet(true); this.return_props = return_props; this.condition = condition; + this.common = common; } public static class Builder { @@ -150,6 +157,7 @@ public static class Builder { private boolean insertable; private List return_props; private byte[] condition; + private RequestCommon common; BitSet __optional_isset = new BitSet(4); @@ -200,6 +208,11 @@ public Builder setCondition(final byte[] condition) { return this; } + public Builder setCommon(final RequestCommon common) { + this.common = common; + return this; + } + public UpdateVertexRequest build() { UpdateVertexRequest result = new UpdateVertexRequest(); if (__optional_isset.get(__SPACE_ID_ISSET_ID)) { @@ -218,6 +231,7 @@ public UpdateVertexRequest build() { } result.setReturn_props(this.return_props); result.setCondition(this.condition); + result.setCommon(this.common); return result; } } @@ -248,6 +262,9 @@ public UpdateVertexRequest(UpdateVertexRequest other) { if (other.isSetCondition()) { this.condition = TBaseHelper.deepCopy(other.condition); } + if (other.isSetCommon()) { + this.common = TBaseHelper.deepCopy(other.common); + } } public UpdateVertexRequest deepCopy() { @@ -442,6 +459,30 @@ public void setConditionIsSet(boolean __value) { } } + public RequestCommon getCommon() { + return this.common; + } + + public UpdateVertexRequest 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) { @@ -509,6 +550,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!"); } @@ -540,6 +589,9 @@ public Object getFieldValue(int fieldID) { case CONDITION: return getCondition(); + case COMMON: + return getCommon(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -571,12 +623,14 @@ public boolean equals(Object _that) { if (!TBaseHelper.equalsSlow(this.isSetCondition(), that.isSetCondition(), this.condition, that.condition)) { 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, part_id, vertex_id, tag_id, updated_props, insertable, return_props, condition}); + return Arrays.deepHashCode(new Object[] {space_id, part_id, vertex_id, tag_id, updated_props, insertable, return_props, condition, common}); } public void read(TProtocol iprot) throws TException { @@ -625,16 +679,16 @@ public void read(TProtocol iprot) throws TException { case UPDATED_PROPS: if (__field.type == TType.LIST) { { - TList _list135 = iprot.readListBegin(); - this.updated_props = new ArrayList(Math.max(0, _list135.size)); - for (int _i136 = 0; - (_list135.size < 0) ? iprot.peekList() : (_i136 < _list135.size); - ++_i136) + TList _list153 = iprot.readListBegin(); + this.updated_props = new ArrayList(Math.max(0, _list153.size)); + for (int _i154 = 0; + (_list153.size < 0) ? iprot.peekList() : (_i154 < _list153.size); + ++_i154) { - UpdatedProp _elem137; - _elem137 = new UpdatedProp(); - _elem137.read(iprot); - this.updated_props.add(_elem137); + UpdatedProp _elem155; + _elem155 = new UpdatedProp(); + _elem155.read(iprot); + this.updated_props.add(_elem155); } iprot.readListEnd(); } @@ -653,15 +707,15 @@ public void read(TProtocol iprot) throws TException { case RETURN_PROPS: if (__field.type == TType.LIST) { { - TList _list138 = iprot.readListBegin(); - this.return_props = new ArrayList(Math.max(0, _list138.size)); - for (int _i139 = 0; - (_list138.size < 0) ? iprot.peekList() : (_i139 < _list138.size); - ++_i139) + TList _list156 = iprot.readListBegin(); + this.return_props = new ArrayList(Math.max(0, _list156.size)); + for (int _i157 = 0; + (_list156.size < 0) ? iprot.peekList() : (_i157 < _list156.size); + ++_i157) { - byte[] _elem140; - _elem140 = iprot.readBinary(); - this.return_props.add(_elem140); + byte[] _elem158; + _elem158 = iprot.readBinary(); + this.return_props.add(_elem158); } iprot.readListEnd(); } @@ -676,6 +730,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; @@ -714,8 +776,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(UPDATED_PROPS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.updated_props.size())); - for (UpdatedProp _iter141 : this.updated_props) { - _iter141.write(oprot); + for (UpdatedProp _iter159 : this.updated_props) { + _iter159.write(oprot); } oprot.writeListEnd(); } @@ -731,8 +793,8 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(RETURN_PROPS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.return_props.size())); - for (byte[] _iter142 : this.return_props) { - oprot.writeBinary(_iter142); + for (byte[] _iter160 : this.return_props) { + oprot.writeBinary(_iter160); } oprot.writeListEnd(); } @@ -746,6 +808,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(); } @@ -851,6 +920,20 @@ public String toString(int indent, boolean 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/VertexProp.java b/client/src/main/generated/com/vesoft/nebula/storage/VertexProp.java index 1dfbf844d..07fcea8ef 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/VertexProp.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/VertexProp.java @@ -275,15 +275,15 @@ public void read(TProtocol iprot) throws TException { case PROPS: if (__field.type == TType.LIST) { { - TList _list8 = iprot.readListBegin(); - this.props = new ArrayList(Math.max(0, _list8.size)); - for (int _i9 = 0; - (_list8.size < 0) ? iprot.peekList() : (_i9 < _list8.size); - ++_i9) + TList _list13 = iprot.readListBegin(); + this.props = new ArrayList(Math.max(0, _list13.size)); + for (int _i14 = 0; + (_list13.size < 0) ? iprot.peekList() : (_i14 < _list13.size); + ++_i14) { - byte[] _elem10; - _elem10 = iprot.readBinary(); - this.props.add(_elem10); + byte[] _elem15; + _elem15 = iprot.readBinary(); + this.props.add(_elem15); } 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[] _iter11 : this.props) { - oprot.writeBinary(_iter11); + for (byte[] _iter16 : this.props) { + oprot.writeBinary(_iter16); } oprot.writeListEnd(); } diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/net/Session.java b/client/src/main/java/com/vesoft/nebula/client/graph/net/Session.java index 35709d558..76d5dd83b 100644 --- a/client/src/main/java/com/vesoft/nebula/client/graph/net/Session.java +++ b/client/src/main/java/com/vesoft/nebula/client/graph/net/Session.java @@ -100,6 +100,101 @@ public synchronized ResultSet execute(String stmt) throws IOErrorException { } } + /** + * Execute the nGql sentence. + * Date and Datetime will be returned in UTC + * JSON struct: + * { + * "results":[ + * { + * "columns":[], + * "data":[ + * { + * "row":row-data, + * "meta":metadata + * } + * ], + * "latencyInUs":0, + * "spaceName":"", + * "planDesc ":{ + * "planNodeDescs":[ + * { + * "name":"", + * "id":0, + * "outputVar":"", + * "description":{ + * "key":"" + * }, + * "profiles":[ + * { + * "rows":1, + * "execDurationInUs":0, + * "totalDurationInUs":0, + * "otherStats":{} + * } + * ], + * "branchInfo":{ + * "isDoBranch":false, + * "conditionNodeId":-1 + * }, + * "dependencies":[] + * } + * ], + * "nodeIndexMap":{}, + * "format":"", + * "optimize_time_in_us":0 + * }, + * "comment ":"", + * } + * ], + * "errors":[ + * { + * "code": 0, + * "message": "" + * } + * ] + * } + * @param stmt The nGql sentence. + * such as insert ngql `INSERT VERTEX person(name) VALUES "Tom":("Tom");` + * @return The JSON string + */ + public synchronized String executeJson(String stmt) throws IOErrorException { + if (connection == null) { + throw new IOErrorException(IOErrorException.E_CONNECT_BROKEN, + "The session was released, couldn't use again."); + } + + if (connectionIsBroken.get() && retryConnect) { + if (retryConnect()) { + return connection.executeJson(sessionID, stmt); + } else { + throw new IOErrorException(IOErrorException.E_ALL_BROKEN, + "All servers are broken."); + } + } + + try { + return connection.executeJson(sessionID, stmt); + } catch (IOErrorException ie) { + if (ie.getType() == IOErrorException.E_CONNECT_BROKEN) { + connectionIsBroken.set(true); + pool.updateServerStatus(); + + if (retryConnect) { + if (retryConnect()) { + connectionIsBroken.set(false); + return connection.executeJson(sessionID, stmt); + } else { + connectionIsBroken.set(true); + throw new IOErrorException(IOErrorException.E_ALL_BROKEN, + "All servers are broken."); + } + } + } + throw ie; + } + } + /** * Check current connection is ok * diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/net/SyncConnection.java b/client/src/main/java/com/vesoft/nebula/client/graph/net/SyncConnection.java index e1ccdebcd..08a5e0a3b 100644 --- a/client/src/main/java/com/vesoft/nebula/client/graph/net/SyncConnection.java +++ b/client/src/main/java/com/vesoft/nebula/client/graph/net/SyncConnection.java @@ -13,6 +13,7 @@ import com.facebook.thrift.transport.TSocket; import com.facebook.thrift.transport.TTransport; import com.facebook.thrift.transport.TTransportException; +import com.facebook.thrift.utils.StandardCharsets; import com.vesoft.nebula.ErrorCode; import com.vesoft.nebula.client.graph.data.HostAddress; import com.vesoft.nebula.client.graph.exception.AuthFailedException; @@ -110,6 +111,28 @@ public ExecutionResponse execute(long sessionID, String stmt) } } + public String executeJson(long sessionID, String stmt) + throws IOErrorException { + try { + byte[] result = client.executeJson(sessionID, stmt.getBytes()); + return new String(result, StandardCharsets.UTF_8); + } catch (TException e) { + if (e instanceof TTransportException) { + TTransportException te = (TTransportException) e; + if (te.getType() == TTransportException.END_OF_FILE) { + throw new IOErrorException(IOErrorException.E_CONNECT_BROKEN, te.getMessage()); + } else if (te.getType() == TTransportException.NOT_OPEN) { + throw new IOErrorException(IOErrorException.E_NO_OPEN, te.getMessage()); + } else if (te.getType() == TTransportException.TIMED_OUT + || te.getMessage().contains("Read timed out")) { + reopen(); + throw new IOErrorException(IOErrorException.E_TIME_OUT, te.getMessage()); + } + } + throw new IOErrorException(IOErrorException.E_UNKNOWN, e.getMessage()); + } + } + public void signout(long sessionId) { client.signout(sessionId); } diff --git a/client/src/test/java/com/vesoft/nebula/client/graph/data/TestDataFromServer.java b/client/src/test/java/com/vesoft/nebula/client/graph/data/TestDataFromServer.java index ce66fc5ee..aebb7ef88 100644 --- a/client/src/test/java/com/vesoft/nebula/client/graph/data/TestDataFromServer.java +++ b/client/src/test/java/com/vesoft/nebula/client/graph/data/TestDataFromServer.java @@ -6,6 +6,8 @@ package com.vesoft.nebula.client.graph.data; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import com.vesoft.nebula.Date; import com.vesoft.nebula.DateTime; import com.vesoft.nebula.ErrorCode; @@ -141,24 +143,24 @@ public void testAllSchemaType() { DateTimeWrapper dateTimeWrapper = (DateTimeWrapper) new DateTimeWrapper( new DateTime((short) 2010, (byte) 9, (byte) 10, (byte) 02, (byte) 8, (byte) 2, 0)).setTimezoneOffset(28800); - DateTimeWrapper resultDateTime = properties.get("birthday").asDateTime(); + DateTimeWrapper resultDateTime = properties.get("birthday").asDateTime(); Assert.assertEquals(dateTimeWrapper, resultDateTime); Assert.assertEquals("utc datetime: 2010-09-10T02:08:02.000000, timezoneOffset: 28800", - resultDateTime.toString()); + resultDateTime.toString()); Assert.assertEquals("2010-09-10T10:08:02.000000", - resultDateTime.getLocalDateTimeStr()); + resultDateTime.getLocalDateTimeStr()); Assert.assertEquals("2010-09-10T02:08:02.000000", - resultDateTime.getUTCDateTimeStr()); + resultDateTime.getUTCDateTimeStr()); DateWrapper dateWrapper = new DateWrapper(new Date((short) 2017, (byte) 9, (byte) 10)); Assert.assertEquals(dateWrapper, properties.get("start_school").asDate()); TimeWrapper timeWrapper = (TimeWrapper) new TimeWrapper( - new Time((byte) 23, (byte) 10, (byte) 0, 0)).setTimezoneOffset(28800); + new Time((byte) 23, (byte) 10, (byte) 0, 0)).setTimezoneOffset(28800); TimeWrapper resultTime = properties.get("morning").asTime(); Assert.assertEquals(timeWrapper, resultTime); Assert.assertEquals("utc time: 23:10:00.000000, timezoneOffset: 28800", - resultTime.toString()); + resultTime.toString()); Assert.assertEquals("07:10:00.000000", resultTime.getLocalTimeStr()); Assert.assertEquals("23:10:00.000000", resultTime.getUTCTimeStr()); @@ -344,35 +346,35 @@ public void testPath() { public void tesDataset() { try { ResultSet result = session.execute( - "CREATE TAG IF NOT EXISTS player(name string, age int);" - + "CREATE EDGE IF NOT EXISTS like(likeness int);"); + "CREATE TAG IF NOT EXISTS player(name string, age int);" + + "CREATE EDGE IF NOT EXISTS like(likeness int);"); Assert.assertTrue(result.getErrorMessage(), result.isSucceeded()); TimeUnit.SECONDS.sleep(6); result = session.execute( - "INSERT VERTEX player(name, age) values \"a\":(\"a\", 1); " - + "INSERT VERTEX player(name, age) values \"b\":(\"b\", 2); " - + "INSERT VERTEX player(name, age) values \"c\":(\"c\", 3); " - + "INSERT VERTEX player(name, age) values \"d\":(\"d\", 4);" - + "INSERT VERTEX player(name, age) values \"f\":(\"f\", 5);" - + "INSERT VERTEX player(name, age) values \"g\":(\"g\", 6);" - + "INSERT EDGE like(likeness) values \"d\" -> \"a\":(10); " - + "INSERT EDGE like(likeness) values \"d\" -> \"c\":(10);" - + "INSERT EDGE like(likeness) values \"b\" -> \"a\":(10); " - + "INSERT EDGE like(likeness) values \"c\" -> \"b\":(10);" - + "INSERT EDGE like(likeness) values \"a\" -> \"f\":(10); " - + "INSERT EDGE like(likeness) values \"c\" -> \"f\":(10);" - + "INSERT EDGE like(likeness) values \"a\" -> \"g\":(10); " - + "INSERT EDGE like(likeness) values \"g\" -> \"c\":(10);"); + "INSERT VERTEX player(name, age) values \"a\":(\"a\", 1); " + + "INSERT VERTEX player(name, age) values \"b\":(\"b\", 2); " + + "INSERT VERTEX player(name, age) values \"c\":(\"c\", 3); " + + "INSERT VERTEX player(name, age) values \"d\":(\"d\", 4);" + + "INSERT VERTEX player(name, age) values \"f\":(\"f\", 5);" + + "INSERT VERTEX player(name, age) values \"g\":(\"g\", 6);" + + "INSERT EDGE like(likeness) values \"d\" -> \"a\":(10); " + + "INSERT EDGE like(likeness) values \"d\" -> \"c\":(10);" + + "INSERT EDGE like(likeness) values \"b\" -> \"a\":(10); " + + "INSERT EDGE like(likeness) values \"c\" -> \"b\":(10);" + + "INSERT EDGE like(likeness) values \"a\" -> \"f\":(10); " + + "INSERT EDGE like(likeness) values \"c\" -> \"f\":(10);" + + "INSERT EDGE like(likeness) values \"a\" -> \"g\":(10); " + + "INSERT EDGE like(likeness) values \"g\" -> \"c\":(10);"); Assert.assertTrue(result.getErrorMessage(), result.isSucceeded()); result = session.execute( - "FIND NOLOOP PATH FROM \"a\" TO \"c\" OVER like BIDIRECT UPTO 5 STEPS"); + "FIND NOLOOP PATH FROM \"a\" TO \"c\" OVER like BIDIRECT UPTO 5 STEPS"); Assert.assertTrue(result.getErrorMessage(), result.isSucceeded()); Assert.assertEquals(4, result.rowsSize()); String expectString = "ColumnName: [path], " - + "Rows: [(\"a\" )-[:like@0{}]->(\"g\" )-[:like@0{}]->(\"c\" ), " - + "(\"a\" )<-[:like@0{}]-(\"d\" )-[:like@0{}]->(\"c\" ), " - + "(\"a\" )<-[:like@0{}]-(\"b\" )<-[:like@0{}]-(\"c\" ), " - + "(\"a\" )-[:like@0{}]->(\"f\" )<-[:like@0{}]-(\"c\" )]"; + + "Rows: [(\"a\" )-[:like@0{}]->(\"g\" )-[:like@0{}]->(\"c\" ), " + + "(\"a\" )<-[:like@0{}]-(\"d\" )-[:like@0{}]->(\"c\" ), " + + "(\"a\" )<-[:like@0{}]-(\"b\" )<-[:like@0{}]-(\"c\" ), " + + "(\"a\" )-[:like@0{}]->(\"f\" )<-[:like@0{}]-(\"c\" )]"; Assert.assertEquals(expectString, result.toString()); } catch (IOErrorException | InterruptedException e) { e.printStackTrace(); @@ -390,4 +392,63 @@ public void testErrorResult() { assert false; } } + + @Test + public void testBasicTypeForJson() { + try { + String ngql = "YIELD 1, 2.2, \"hello\", [1,2,\"abc\"], {key: \"value\"}, \"汉字\""; + JSONObject resp = JSON.parseObject(session.executeJson(ngql)); + String rowData = resp.getJSONArray("results").getJSONObject(0).getJSONArray("data") + .getJSONObject(0).getJSONArray("row").toJSONString(); + String exp = "[1,2.2,\"hello\",[1,2,\"abc\"],{\"key\":\"value\"},\"汉字\"]"; + + // check row data + Assert.assertEquals(rowData, exp); + // check space name + String spaceName = resp.getJSONArray("results").getJSONObject(0).getString("spaceName"); + Assert.assertEquals(spaceName, "test_data"); + } catch (IOErrorException e) { + e.printStackTrace(); + assert false; + } + } + + @Test + public void testComplexTypeForJson() { + try { + JSONObject resp = JSON.parseObject(session.executeJson("MATCH (v:person {name: " + + "\"Bob\"}) RETURN v")); + String rowData = resp.getJSONArray("results").getJSONObject(0).getJSONArray("data") + .getJSONObject(0).getJSONArray("row").toJSONString(); + Assert.assertEquals(rowData, "[{\"person.first_out_city\":1111,\"person" + + ".book_num\":100,\"person.age\":10,\"person.expend\":100,\"person.is_girl\":" + + "false,\"person.name\":\"Bob\",\"person.grade\":3,\"person.birthday\":\"2010" + + "-09-10T02:08:02.0Z\",\"student.name\":\"Bob\",\"person.child_name\":\"Hello" + + " Worl\",\"person.property\":1000,\"person.morning\":\"23:10:00.000000Z\",\"" + + "person.start_school\":\"2017-09-10\",\"person.friends\":10}]"); + } catch (IOErrorException e) { + e.printStackTrace(); + assert false; + } + } + + + @Test + public void testErrorForJson() { + try { + String ngql = "MATCH (v:invalidTag {name: \"Bob\"}) RETURN v"; + JSONObject resp = JSON.parseObject(session.executeJson(ngql)); + int code = resp.getJSONArray("errors").getJSONObject(0).getInteger("code"); + String message = resp.getJSONArray("errors").getJSONObject(0).getString("message"); + + // check error code + Assert.assertEquals(code, ErrorCode.E_SEMANTIC_ERROR.getValue()); + + // check error message + Assert.assertEquals(message, "SemanticError: `invalidTag': Unknown tag"); + } catch (IOErrorException e) { + e.printStackTrace(); + assert false; + } + } } diff --git a/examples/src/main/java/com/vesoft/nebula/examples/GraphClientExample.java b/examples/src/main/java/com/vesoft/nebula/examples/GraphClientExample.java index 08b5d2e30..6b78cbb80 100644 --- a/examples/src/main/java/com/vesoft/nebula/examples/GraphClientExample.java +++ b/examples/src/main/java/com/vesoft/nebula/examples/GraphClientExample.java @@ -6,6 +6,8 @@ package com.vesoft.nebula.examples; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import com.vesoft.nebula.client.graph.NebulaPoolConfig; import com.vesoft.nebula.client.graph.data.HostAddress; import com.vesoft.nebula.client.graph.data.ResultSet; @@ -140,6 +142,19 @@ public static void main(String[] args) { } printResult(resp); } + + { + String queryForJson = "YIELD 1"; + String resp = session.executeJson(queryForJson); + JSONObject errors = JSON.parseObject(resp).getJSONArray("result").getJSONObject(0) + .getJSONObject("errors"); + if (!errors.getString("errorCode").equals("0")) { + log.error(String.format("Execute: `%s', failed: %s", + queryForJson, errors.getString("errorMsg"))); + System.exit(1); + } + System.out.println(resp); + } } catch (Exception e) { e.printStackTrace(); } finally {