public DeadServer deepCopy() { return new DeadServer(this); }
@Override public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof DeadServer) return this.equals((DeadServer)that); return false; }
public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SERVER: return getServer(); case LAST_STATUS: return getLastStatus(); case STATUS: return getStatus(); } throw new java.lang.IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public DeadServer(DeadServer other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetServer()) { this.server = other.server; } this.lastStatus = other.lastStatus; if (other.isSetStatus()) { this.status = other.status; } }
/** 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 java.lang.IllegalArgumentException(); } switch (field) { case SERVER: return isSetServer(); case LAST_STATUS: return isSetLastStatus(); case STATUS: return isSetStatus(); } throw new java.lang.IllegalStateException(); }
for (int _i42 = 0; _i42 < _list40.size; ++_i42) _elem41 = new DeadServer(); _elem41.read(iprot); struct.deadTabletServers.add(_elem41);
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 _i74 = 0; _i74 < _list72.size; ++_i74) _elem73 = new DeadServer(); _elem73.read(iprot); struct.deadTabletServers.add(_elem73);
lastComparison = java.lang.Boolean.valueOf(isSetServer()).compareTo(other.isSetServer()); if (lastComparison != 0) { return lastComparison; if (isSetServer()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.server, other.server); if (lastComparison != 0) { lastComparison = java.lang.Boolean.valueOf(isSetLastStatus()).compareTo(other.isSetLastStatus()); if (lastComparison != 0) { return lastComparison; if (isSetLastStatus()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastStatus, other.lastStatus); if (lastComparison != 0) { lastComparison = java.lang.Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; if (isSetStatus()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) {
@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetServer()) ? 131071 : 524287); if (isSetServer()) hashCode = hashCode * 8191 + server.hashCode(); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(lastStatus); hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); if (isSetStatus()) hashCode = hashCode * 8191 + status.hashCode(); return hashCode; }
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 _i42 = 0; _i42 < _list40.size; ++_i42) _elem41 = new DeadServer(); _elem41.read(iprot); struct.deadTabletServers.add(_elem41);
public List<DeadServer> getList() { List<DeadServer> result = new ArrayList<>(); try { List<String> children = zoo.getChildren(path); if (children != null) { for (String child : children) { Stat stat = new Stat(); byte[] data; try { data = zoo.getData(path + "/" + child, stat); } catch (NoNodeException nne) { // Another thread or process can delete child while this loop is running. // We ignore this error since it's harmless if we miss the deleted server // in the dead server list. continue; } DeadServer server = new DeadServer(child, stat.getMtime(), new String(data, UTF_8)); result.add(server); } } } catch (Exception ex) { log.error("{}", ex.getMessage(), ex); } return result; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, DeadServer struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetServer()) { optionals.set(0); } if (struct.isSetLastStatus()) { optionals.set(1); } if (struct.isSetStatus()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetServer()) { oprot.writeString(struct.server); } if (struct.isSetLastStatus()) { oprot.writeI64(struct.lastStatus); } if (struct.isSetStatus()) { oprot.writeString(struct.status); } }
return true; boolean this_present_server = true && this.isSetServer(); boolean that_present_server = true && that.isSetServer(); if (this_present_server || that_present_server) { if (!(this_present_server && that_present_server)) boolean this_present_status = true && this.isSetStatus(); boolean that_present_status = true && that.isSetStatus(); if (this_present_status || that_present_status) { if (!(this_present_status && that_present_status))
public Object getFieldValue(_Fields field) { switch (field) { case SERVER: return getServer(); case LAST_STATUS: return getLastStatus(); case STATUS: return getStatus(); } throw new IllegalStateException(); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof DeadServer) return this.equals((DeadServer)that); return false; }
for (int _i74 = 0; _i74 < _list72.size; ++_i74) _elem73 = new DeadServer(); _elem73.read(iprot); struct.deadTabletServers.add(_elem73);
java.util.List<DeadServer> __this__deadTabletServers = new java.util.ArrayList<DeadServer>(other.deadTabletServers.size()); for (DeadServer other_element : other.deadTabletServers) { __this__deadTabletServers.add(new DeadServer(other_element));
/** 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: return isSetServer(); case LAST_STATUS: return isSetLastStatus(); case STATUS: return isSetStatus(); } throw new IllegalStateException(); }