public PartitionMetadata deepCopy() { return new PartitionMetadata(this); }
/** * Performs a deep copy on <i>other</i>. */ public DomainVersionMetadata(DomainVersionMetadata other) { __isset_bitfield = other.__isset_bitfield; if (other.is_set_properties()) { this.properties = org.apache.thrift.TBaseHelper.copyBinary(other.properties); ; } if (other.is_set_partitions()) { Map<Integer,PartitionMetadata> __this__partitions = new HashMap<Integer,PartitionMetadata>(); for (Map.Entry<Integer, PartitionMetadata> other_element : other.partitions.entrySet()) { Integer other_element_key = other_element.getKey(); PartitionMetadata other_element_value = other_element.getValue(); Integer __this__partitions_copy_key = other_element_key; PartitionMetadata __this__partitions_copy_value = new PartitionMetadata(other_element_value); __this__partitions.put(__this__partitions_copy_key, __this__partitions_copy_value); } this.partitions = __this__partitions; } this.defunct = other.defunct; this.closed_at = other.closed_at; }
_val11 = new PartitionMetadata(); _val11.read(iprot); struct.partitions.put(_key10, _val11);
@Override public void read(org.apache.thrift.protocol.TProtocol prot, DomainVersionMetadata struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; { org.apache.thrift.protocol.TMap _map14 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.partitions = new HashMap<Integer,PartitionMetadata>(2*_map14.size); for (int _i15 = 0; _i15 < _map14.size; ++_i15) { int _key16; // required PartitionMetadata _val17; // optional _key16 = iprot.readI32(); _val17 = new PartitionMetadata(); _val17.read(iprot); struct.partitions.put(_key16, _val17); } } struct.set_partitions_isSet(true); struct.defunct = iprot.readBool(); struct.set_defunct_isSet(true); struct.closed_at = iprot.readI64(); struct.set_closed_at_isSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.properties = iprot.readBinary(); struct.set_properties_isSet(true); } } }