public HeartbeatTxnRangeRequest deepCopy() { return new HeartbeatTxnRangeRequest(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof HeartbeatTxnRangeRequest) return this.equals((HeartbeatTxnRangeRequest)that); return false; }
public HeartbeatTxnRangeRequest( long min, long max) { this(); this.min = min; setMinIsSet(true); this.max = max; setMaxIsSet(true); }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetMin()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'min' is unset! Struct:" + toString()); } if (!isSetMax()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'max' is unset! Struct:" + toString()); } // check for sub-struct validity }
if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.min = iprot.readI64(); struct.setMinIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.max = iprot.readI64(); struct.setMaxIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
/** 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 MIN: return isSetMin(); case MAX: return isSetMax(); } throw new IllegalStateException(); }
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); } }
public void setMax(long max) { this.max = max; setMaxIsSet(true); }
@Override public void clear() { setMinIsSet(false); this.min = 0; setMaxIsSet(false); this.max = 0; }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetMin()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'min' is unset! Struct:" + toString()); } if (!isSetMax()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'max' is unset! Struct:" + toString()); } // check for sub-struct validity }
if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.min = iprot.readI64(); struct.setMinIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.max = iprot.readI64(); struct.setMaxIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
@Override public int compareTo(HeartbeatTxnRangeRequest other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetMin()).compareTo(other.isSetMin()); if (lastComparison != 0) { return lastComparison; } if (isSetMin()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.min, other.min); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMax()).compareTo(other.isSetMax()); if (lastComparison != 0) { return lastComparison; } if (isSetMax()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max, other.max); 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); } }
public void setMax(long max) { this.max = max; setMaxIsSet(true); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, HeartbeatTxnRangeRequest struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.min = iprot.readI64(); struct.setMinIsSet(true); struct.max = iprot.readI64(); struct.setMaxIsSet(true); } }