public ThriftOperationsServer deepCopy() { return new ThriftOperationsServer(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof ThriftOperationsServer) return this.equals((ThriftOperationsServer)that); return false; }
public Object getFieldValue(_Fields field) { switch (field) { case ID: return getId(); case PRIORITY: return getPriority(); } throw new IllegalStateException(); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case ID: if (value == null) { unsetId(); } else { setId((String)value); } break; case PRIORITY: if (value == null) { unsetPriority(); } else { setPriority((Integer)value); } break; } }
/** 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 ID: return isSetId(); case PRIORITY: return isSetPriority(); } throw new IllegalStateException(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, onOperationsServerListUpdate_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.operationsServersList = new ArrayList<ThriftOperationsServer>(_list5.size); ThriftOperationsServer _elem6; for (int _i7 = 0; _i7 < _list5.size; ++_i7) { _elem6 = new ThriftOperationsServer(); _elem6.read(iprot); struct.operationsServersList.add(_elem6); } } struct.setOperationsServersListIsSet(true); } } }
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.id = iprot.readString(); struct.setIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.priority = iprot.readI32(); struct.setPriorityIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
@Override public void read(org.apache.thrift.protocol.TProtocol prot, ThriftOperationsServer struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.id = iprot.readString(); struct.setIdIsSet(true); } if (incoming.get(1)) { struct.priority = iprot.readI32(); struct.setPriorityIsSet(true); } } }
/** * Performs a deep copy on <i>other</i>. */ public ThriftOperationsServer(ThriftOperationsServer other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetId()) { this.id = other.id; } this.priority = other.priority; }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; 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); } }
for (int _i2 = 0; _i2 < _list0.size; ++_i2) _elem1 = new ThriftOperationsServer(); _elem1.read(iprot); struct.operationsServersList.add(_elem1);
@Override public int compareTo(ThriftOperationsServer other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); if (lastComparison != 0) { return lastComparison; } if (isSetId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPriority()).compareTo(other.isSetPriority()); if (lastComparison != 0) { return lastComparison; } if (isSetPriority()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.priority, other.priority); if (lastComparison != 0) { return lastComparison; } } return 0; }
public boolean equals(ThriftOperationsServer that) { if (that == null) return false; boolean this_present_id = true && this.isSetId(); boolean that_present_id = true && that.isSetId(); if (this_present_id || that_present_id) { if (!(this_present_id && that_present_id)) return false; if (!this.id.equals(that.id)) return false; } boolean this_present_priority = true; boolean that_present_priority = true; if (this_present_priority || that_present_priority) { if (!(this_present_priority && that_present_priority)) return false; if (this.priority != that.priority) return false; } return true; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, ThriftOperationsServer struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetId()) { optionals.set(0); } if (struct.isSetPriority()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetId()) { oprot.writeString(struct.id); } if (struct.isSetPriority()) { oprot.writeI32(struct.priority); } }
private void addNewOperationsServer(int accessPointId, String dnsName, OperationsNodeInfo nodeInfo) { OperationsServerMeta meta = new OperationsServerMeta(null, nodeInfo); meta.opsServer = new ThriftOperationsServer(dnsName, DEFAULT_PRIORITY); opsServersMap.put(accessPointId, meta); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_id = true && (isSetId()); list.add(present_id); if (present_id) list.add(id); boolean present_priority = true; list.add(present_priority); if (present_priority) list.add(priority); return list.hashCode(); }