public void onComplete(MemoryUsage o) { getMemoryUsage_result result = new getMemoryUsage_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 Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case CLI_EXCEPTION: return getCliException(); } throw new IllegalStateException(); }
@Override public int compareTo(getMemoryUsage_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCliException()).compareTo(other.isSetCliException()); if (lastComparison != 0) { return lastComparison; } if (isSetCliException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cliException, other.cliException); if (lastComparison != 0) { return lastComparison; } } return 0; }
struct.success = new MemoryUsage(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.cliException = new CliThriftException(); struct.cliException.read(iprot); struct.setCliExceptionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getMemoryUsage_result result = new getMemoryUsage_result(); if (e instanceof CliThriftException) { result.cliException = (CliThriftException) e; result.setCliExceptionIsSet(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(); } };
public boolean equals(getMemoryUsage_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); 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_cliException = true && this.isSetCliException(); boolean that_present_cliException = true && that.isSetCliException(); if (this_present_cliException || that_present_cliException) { if (!(this_present_cliException && that_present_cliException)) return false; if (!this.cliException.equals(that.cliException)) return false; } return true; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, getMemoryUsage_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetCliException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetCliException()) { struct.cliException.write(oprot); } }
public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((MemoryUsage)value); } break; case CLI_EXCEPTION: if (value == null) { unsetCliException(); } else { setCliException((CliThriftException)value); } break; } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, getMemoryUsage_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new MemoryUsage(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.cliException = new CliThriftException(); struct.cliException.read(iprot); struct.setCliExceptionIsSet(true); } } }
public getMemoryUsage_result deepCopy() { return new getMemoryUsage_result(this); }
/** 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 isSetSuccess(); case CLI_EXCEPTION: return isSetCliException(); } throw new IllegalStateException(); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_cliException = true && (isSetCliException()); list.add(present_cliException); if (present_cliException) list.add(cliException); return list.hashCode(); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getMemoryUsage_result) return this.equals((getMemoryUsage_result)that); return false; }
/** * Performs a deep copy on <i>other</i>. */ public getMemoryUsage_result(getMemoryUsage_result other) { if (other.isSetSuccess()) { this.success = new MemoryUsage(other.success); } if (other.isSetCliException()) { this.cliException = new CliThriftException(other.cliException); } }
public MemoryUsage recv_getMemoryUsage() throws CliThriftException, org.apache.thrift.TException { getMemoryUsage_result result = new getMemoryUsage_result(); receiveBase(result, "getMemoryUsage"); if (result.isSetSuccess()) { return result.success; } if (result.cliException != null) { throw result.cliException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getMemoryUsage failed: unknown result"); }
public getMemoryUsage_result getResult(I iface, getMemoryUsage_args args) throws org.apache.thrift.TException { getMemoryUsage_result result = new getMemoryUsage_result(); try { result.success = iface.getMemoryUsage(args.forceGC); } catch (CliThriftException cliException) { result.cliException = cliException; } return result; } }
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); } }