public Object getFieldValue(_Fields field) { switch (field) { case DOMAIN_ID: return Integer.valueOf(get_domain_id()); case KEYS: return get_keys(); } throw new IllegalStateException(); }
public int compareTo(getBulk_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; getBulk_args typedOther = (getBulk_args)other; lastComparison = Boolean.valueOf(is_set_domain_id()).compareTo(typedOther.is_set_domain_id()); if (lastComparison != 0) { return lastComparison; } if (is_set_domain_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domain_id, typedOther.domain_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_keys()).compareTo(typedOther.is_set_keys()); if (lastComparison != 0) { return lastComparison; } if (is_set_keys()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, typedOther.keys); if (lastComparison != 0) { return lastComparison; } } return 0; }
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); } }
if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.domain_id = iprot.readI32(); struct.set_domain_id_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.set_keys_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
@Override public void write(org.apache.thrift.protocol.TProtocol prot, getBulk_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_domain_id()) { optionals.set(0); } if (struct.is_set_keys()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.is_set_domain_id()) { oprot.writeI32(struct.domain_id); } if (struct.is_set_keys()) { { oprot.writeI32(struct.keys.size()); for (ByteBuffer _iter100 : struct.keys) { oprot.writeBinary(_iter100); } } } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, getBulk_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.domain_id = iprot.readI32(); struct.set_domain_id_isSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list101 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.keys = new ArrayList<ByteBuffer>(_list101.size); for (int _i102 = 0; _i102 < _list101.size; ++_i102) { ByteBuffer _elem103; // required _elem103 = iprot.readBinary(); struct.keys.add(_elem103); } } struct.set_keys_isSet(true); } } }
public boolean equals(getBulk_args that) { if (that == null) return false; boolean this_present_domain_id = true; boolean that_present_domain_id = true; if (this_present_domain_id || that_present_domain_id) { if (!(this_present_domain_id && that_present_domain_id)) return false; if (this.domain_id != that.domain_id) return false; } boolean this_present_keys = true && this.is_set_keys(); boolean that_present_keys = true && that.is_set_keys(); if (this_present_keys || that_present_keys) { if (!(this_present_keys && that_present_keys)) return false; if (!this.keys.equals(that.keys)) return false; } return true; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case DOMAIN_ID: if (value == null) { unset_domain_id(); } else { set_domain_id((Integer)value); } break; case KEYS: if (value == null) { unset_keys(); } else { set_keys((List<ByteBuffer>)value); } break; } }
/** * Performs a deep copy on <i>other</i>. */ public getBulk_args(getBulk_args other) { __isset_bitfield = other.__isset_bitfield; this.domain_id = other.domain_id; if (other.is_set_keys()) { List<ByteBuffer> __this__keys = new ArrayList<ByteBuffer>(); for (ByteBuffer other_element : other.keys) { ByteBuffer temp_binary_element = org.apache.thrift.TBaseHelper.copyBinary(other_element); ; __this__keys.add(temp_binary_element); } this.keys = __this__keys; } }
public getBulk_args deepCopy() { return new getBulk_args(this); }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_domain_id = true; builder.append(present_domain_id); if (present_domain_id) builder.append(domain_id); boolean present_keys = true && (is_set_keys()); builder.append(present_keys); if (present_keys) builder.append(keys); return builder.toHashCode(); }
/** 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 DOMAIN_ID: return is_set_domain_id(); case KEYS: return is_set_keys(); } throw new IllegalStateException(); }
public getBulk_args getEmptyArgsInstance() { return new getBulk_args(); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getBulk_args) return this.equals((getBulk_args)that); return false; }
public getBulk_args set_domain_id(int domain_id) { this.domain_id = domain_id; set_domain_id_isSet(true); return this; }
@Override public void clear() { set_domain_id_isSet(false); this.domain_id = 0; this.keys = null; }
public getBulk_args( int domain_id, List<ByteBuffer> keys) { this(); this.domain_id = domain_id; set_domain_id_isSet(true); this.keys = keys; }
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getBulk", org.apache.thrift.protocol.TMessageType.CALL, 0)); getBulk_args args = new getBulk_args(); args.set_domain_id(domain_id); args.set_keys(keys); args.write(prot); prot.writeMessageEnd(); }
public void send_getBulk(int domain_id, List<ByteBuffer> keys) throws org.apache.thrift.TException { getBulk_args args = new getBulk_args(); args.set_domain_id(domain_id); args.set_keys(keys); sendBase("getBulk", args); }