public Object getFieldValue(_Fields field) { switch (field) { case SERVER_TYPES: return getServerTypes(); case SERVER_GROUPS: return getServerGroups(); case FAILED_SERVERS: return getFailedServers(); } throw new IllegalStateException(); }
lastComparison = Boolean.valueOf(isSetServerTypes()).compareTo(other.isSetServerTypes()); if (lastComparison != 0) { return lastComparison; if (isSetServerTypes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverTypes, other.serverTypes); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetServerGroups()).compareTo(other.isSetServerGroups()); if (lastComparison != 0) { return lastComparison; if (isSetServerGroups()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverGroups, other.serverGroups); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetFailedServers()).compareTo(other.isSetFailedServers()); if (lastComparison != 0) { return lastComparison; if (isSetFailedServers()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failedServers, other.failedServers); if (lastComparison != 0) {
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetServerTypes()) { optionals.set(0); if (struct.isSetServerGroups()) { optionals.set(1); if (struct.isSetFailedServers()) { optionals.set(2); if (struct.isSetServerTypes()) { if (struct.isSetServerGroups()) { if (struct.isSetFailedServers()) {
public boolean equals(getPreferredServer_args that) { if (that == null) return false; boolean this_present_serverTypes = true && this.isSetServerTypes(); boolean that_present_serverTypes = true && that.isSetServerTypes(); if (this_present_serverTypes || that_present_serverTypes) { if (!(this_present_serverTypes && that_present_serverTypes)) return false; if (!this.serverTypes.equals(that.serverTypes)) return false; } boolean this_present_serverGroups = true && this.isSetServerGroups(); boolean that_present_serverGroups = true && that.isSetServerGroups(); if (this_present_serverGroups || that_present_serverGroups) { if (!(this_present_serverGroups && that_present_serverGroups)) return false; if (!this.serverGroups.equals(that.serverGroups)) return false; } boolean this_present_failedServers = true && this.isSetFailedServers(); boolean that_present_failedServers = true && that.isSetFailedServers(); if (this_present_failedServers || that_present_failedServers) { if (!(this_present_failedServers && that_present_failedServers)) return false; if (!this.failedServers.equals(that.failedServers)) return false; } return true; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case SERVER_TYPES: if (value == null) { unsetServerTypes(); } else { setServerTypes((Set<ServerType>)value); } break; case SERVER_GROUPS: if (value == null) { unsetServerGroups(); } else { setServerGroups((Set<String>)value); } break; case FAILED_SERVERS: if (value == null) { unsetFailedServers(); } else { setFailedServers((Set<HostAddress>)value); } break; } }
/** * Performs a deep copy on <i>other</i>. */ public getPreferredServer_args(getPreferredServer_args other) { if (other.isSetServerTypes()) { Set<ServerType> __this__serverTypes = new HashSet<ServerType>(other.serverTypes.size()); for (ServerType other_element : other.serverTypes) { __this__serverTypes.add(other_element); } this.serverTypes = __this__serverTypes; } if (other.isSetServerGroups()) { Set<String> __this__serverGroups = new HashSet<String>(other.serverGroups); this.serverGroups = __this__serverGroups; } if (other.isSetFailedServers()) { Set<HostAddress> __this__failedServers = new HashSet<HostAddress>(other.failedServers.size()); for (HostAddress other_element : other.failedServers) { __this__failedServers.add(new HostAddress(other_element)); } this.failedServers = __this__failedServers; } }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SERVER_TYPES: return isSetServerTypes(); case SERVER_GROUPS: return isSetServerGroups(); case FAILED_SERVERS: return isSetFailedServers(); } throw new IllegalStateException(); }
public getPreferredServer_args deepCopy() { return new getPreferredServer_args(this); }
public getPreferredServer_args getEmptyArgsInstance() { return new getPreferredServer_args(); }
public void send_getPreferredServer(Set<ServerType> serverTypes, Set<String> serverGroups, Set<HostAddress> failedServers) throws org.apache.thrift.TException { getPreferredServer_args args = new getPreferredServer_args(); args.setServerTypes(serverTypes); args.setServerGroups(serverGroups); args.setFailedServers(failedServers); sendBase("getPreferredServer", args); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getPreferredServer_args) return this.equals((getPreferredServer_args)that); return false; }