Exemplo n.º 1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, DeadServer struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new 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);
   }
 }
Exemplo n.º 2
0
  public boolean equals(DeadServer that) {
    if (that == null) return false;

    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)) return false;
      if (!this.server.equals(that.server)) return false;
    }

    boolean this_present_lastStatus = true;
    boolean that_present_lastStatus = true;
    if (this_present_lastStatus || that_present_lastStatus) {
      if (!(this_present_lastStatus && that_present_lastStatus)) return false;
      if (this.lastStatus != that.lastStatus) return false;
    }

    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)) return false;
      if (!this.status.equals(that.status)) return false;
    }

    return true;
  }
Exemplo n.º 3
0
 /** 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;
   }
 }
Exemplo n.º 4
0
  @Override
  public int compareTo(DeadServer other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = 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) {
        return lastComparison;
      }
    }
    lastComparison = 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) {
        return lastComparison;
      }
    }
    lastComparison = 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) {
        return lastComparison;
      }
    }
    return 0;
  }