@Override public HostAddress deepCopy() { return new HostAddress(this); }
public static HostAddress getHostAddress(final String hostNameAndAddress, final int port) { final int slashIndex = hostNameAndAddress.indexOf('/'); if (slashIndex > 0) { final String hostName = hostNameAndAddress.substring(0, slashIndex); final String ipAddress = hostNameAndAddress.substring(slashIndex + 1); if (ipAddress.length() > 0 && !hostName.equals(ipAddress)) { return new HostAddress(hostName, port).setIpAddress(ipAddress); } else { return new HostAddress(hostName, port); } } else if (slashIndex == 0) { return new HostAddress(hostNameAndAddress.substring(1), port); } else { return new HostAddress(hostNameAndAddress, port); } }
/** * Performs a deep copy on <i>other</i>. */ public getAllServersWithPreferredServer_result(getAllServersWithPreferredServer_result other) { if (other.isSetSuccess()) { List<HostAddress> __this__success = new ArrayList<HostAddress>(other.success.size()); for (HostAddress other_element : other.success) { __this__success.add(new HostAddress(other_element)); } this.success = __this__success; } if (other.isSetError()) { this.error = new GFXDException(other.error); } }
/** * 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; } }
/** * Performs a deep copy on <i>other</i>. */ public getAllServersWithPreferredServer_args(getAllServersWithPreferredServer_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; } }
/** * Performs a deep copy on <i>other</i>. */ public getPreferredServer_result(getPreferredServer_result other) { if (other.isSetSuccess()) { this.success = new HostAddress(other.success); } if (other.isSetError()) { this.error = new GFXDException(other.error); } }
case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new HostAddress(); struct.success.read(iprot); struct.setSuccessIsSet(true);
@Override public void read(org.apache.thrift.protocol.TProtocol prot, getPreferredServer_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new HostAddress(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.error = new GFXDException(); struct.error.read(iprot); struct.setErrorIsSet(true); } } }
_elem398 = new HostAddress(); _elem398.read(iprot); struct.success.add(_elem398);
_elem380 = new HostAddress(); _elem380.read(iprot); struct.failedServers.add(_elem380);
@Override public void read(org.apache.thrift.protocol.TProtocol prot, getAllServersWithPreferredServer_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list401 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<HostAddress>(_list401.size); for (int _i402 = 0; _i402 < _list401.size; ++_i402) { HostAddress _elem403; _elem403 = new HostAddress(); _elem403.read(iprot); struct.success.add(_elem403); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.error = new GFXDException(); struct.error.read(iprot); struct.setErrorIsSet(true); } } }
_elem356 = new HostAddress(); _elem356.read(iprot); struct.failedServers.add(_elem356);
this.source = new HostAddress(other.source);
_elem371 = new HostAddress(); _elem371.read(iprot); struct.failedServers.add(_elem371);
_elem395 = new HostAddress(); _elem395.read(iprot); struct.failedServers.add(_elem395);
case 7: // SOURCE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.source = new HostAddress(); struct.source.read(iprot); struct.setSourceIsSet(true);
struct.source = new HostAddress(); struct.source.read(iprot); struct.setSourceIsSet(true);