@Override public int compareTo(SettableBlobMeta other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_acl()).compareTo(other.is_set_acl()); if (lastComparison != 0) { return lastComparison; } if (is_set_acl()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.acl, other.acl); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_replication_factor()).compareTo(other.is_set_replication_factor()); if (lastComparison != 0) { return lastComparison; } if (is_set_replication_factor()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo( this.replication_factor, other.replication_factor); if (lastComparison != 0) { return lastComparison; } } return 0; }
public void write(org.apache.thrift.protocol.TProtocol oprot, SettableBlobMeta struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.acl != null) { oprot.writeFieldBegin(ACL_FIELD_DESC); { oprot.writeListBegin( new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRUCT, struct.acl.size())); for (AccessControl _iter561 : struct.acl) { _iter561.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.is_set_replication_factor()) { oprot.writeFieldBegin(REPLICATION_FACTOR_FIELD_DESC); oprot.writeI32(struct.replication_factor); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, SettableBlobMeta struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; { oprot.writeI32(struct.acl.size()); for (AccessControl _iter562 : struct.acl) { _iter562.write(oprot); } } BitSet optionals = new BitSet(); if (struct.is_set_replication_factor()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.is_set_replication_factor()) { oprot.writeI32(struct.replication_factor); } }
public boolean equals(SettableBlobMeta that) { if (that == null) return false; boolean this_present_acl = true && this.is_set_acl(); boolean that_present_acl = true && that.is_set_acl(); if (this_present_acl || that_present_acl) { if (!(this_present_acl && that_present_acl)) return false; if (!this.acl.equals(that.acl)) return false; } boolean this_present_replication_factor = true && this.is_set_replication_factor(); boolean that_present_replication_factor = true && that.is_set_replication_factor(); if (this_present_replication_factor || that_present_replication_factor) { if (!(this_present_replication_factor && that_present_replication_factor)) return false; if (this.replication_factor != that.replication_factor) return false; } return true; }