public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return get_success(); case AZE: return get_aze(); } throw new java.lang.IllegalStateException(); }
@Override public int compareTo(fetchRequest_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.valueOf(is_set_success()).compareTo(other.is_set_success()); if (lastComparison != 0) { return lastComparison; } if (is_set_success()) { lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze()); if (lastComparison != 0) { return lastComparison; } if (is_set_aze()) { lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.aze, other.aze); if (lastComparison != 0) { return lastComparison; } } return 0; }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.storm.thrift.protocol.TCompactProtocol(new org.apache.storm.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.storm.thrift.TException te) { throw new java.io.IOException(te); } }
struct.success = new DRPCRequest(); struct.success.read(iprot); struct.set_success_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.aze = new AuthorizationException(); struct.aze.read(iprot); struct.set_aze_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
@Override public int compareTo(fetchRequest_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success()); if (lastComparison != 0) { return lastComparison; } if (is_set_success()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze()); if (lastComparison != 0) { return lastComparison; } if (is_set_aze()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aze, other.aze); if (lastComparison != 0) { return lastComparison; } } return 0; }
public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; fetchRequest_result result = new fetchRequest_result(); if (e instanceof AuthorizationException) { result.aze = (AuthorizationException) e; result.set_aze_isSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } };
@Override public void write(org.apache.thrift.protocol.TProtocol prot, fetchRequest_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_success()) { optionals.set(0); } if (struct.is_set_aze()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.is_set_success()) { struct.success.write(oprot); } if (struct.is_set_aze()) { struct.aze.write(oprot); } }
public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unset_success(); } else { set_success((DRPCRequest)value); } break; case AZE: if (value == null) { unset_aze(); } else { set_aze((AuthorizationException)value); } break; } }
public boolean equals(fetchRequest_result that) { if (that == null) return false; boolean this_present_success = true && this.is_set_success(); boolean that_present_success = true && that.is_set_success(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_aze = true && this.is_set_aze(); boolean that_present_aze = true && that.is_set_aze(); if (this_present_aze || that_present_aze) { if (!(this_present_aze && that_present_aze)) return false; if (!this.aze.equals(that.aze)) return false; } return true; }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, fetchRequest_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new DRPCRequest(); struct.success.read(iprot); struct.set_success_isSet(true); } if (incoming.get(1)) { struct.aze = new AuthorizationException(); struct.aze.read(iprot); struct.set_aze_isSet(true); } } }
public fetchRequest_result deepCopy() { return new fetchRequest_result(this); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (is_set_success()); list.add(present_success); if (present_success) list.add(success); boolean present_aze = true && (is_set_aze()); list.add(present_aze); if (present_aze) list.add(aze); return list.hashCode(); }
/** 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 SUCCESS: return is_set_success(); case AZE: return is_set_aze(); } throw new IllegalStateException(); }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { 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); } }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof fetchRequest_result) return this.equals((fetchRequest_result)that); return false; }
public void onComplete(DRPCRequest o) { fetchRequest_result result = new fetchRequest_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) {
public fetchRequest_result getResult(I iface, fetchRequest_args args) throws org.apache.thrift.TException { fetchRequest_result result = new fetchRequest_result(); try { result.success = iface.fetchRequest(args.functionName); } catch (AuthorizationException aze) { result.aze = aze; } return result; } }
public DRPCRequest recv_fetchRequest() throws AuthorizationException, org.apache.thrift.TException { fetchRequest_result result = new fetchRequest_result(); receiveBase(result, "fetchRequest"); if (result.is_set_success()) { return result.success; } if (result.aze != null) { throw result.aze; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchRequest failed: unknown result"); }
/** * Performs a deep copy on <i>other</i>. */ public fetchRequest_result(fetchRequest_result other) { if (other.is_set_success()) { this.success = new DRPCRequest(other.success); } if (other.is_set_aze()) { this.aze = new AuthorizationException(other.aze); } }
public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return get_success(); case AZE: return get_aze(); } throw new IllegalStateException(); }