@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); } } }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof DRPCRequest) return this.equals((DRPCRequest)that); return false; }
public Object getFieldValue(_Fields field) { switch (field) { case FUNC_ARGS: return get_func_args(); case REQUEST_ID: return get_request_id(); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public DRPCRequest(DRPCRequest other) { if (other.is_set_func_args()) { this.func_args = other.func_args; } if (other.is_set_request_id()) { this.request_id = other.request_id; } }
public void setFieldValue(_Fields field, Object value) { switch (field) { case FUNC_ARGS: if (value == null) { unset_func_args(); } else { set_func_args((String)value); } break; case REQUEST_ID: if (value == null) { unset_request_id(); } else { set_request_id((String)value); } break; } }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_func_args()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'func_args' is unset! Struct:" + toString()); } if (!is_set_request_id()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'request_id' is unset! Struct:" + toString()); } // check for sub-struct validity }
public DRPCRequest deepCopy() { return new DRPCRequest(this); }
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); } }
/** * Performs a deep copy on <i>other</i>. */ public DRPCRequest(DRPCRequest other) { if (other.is_set_func_args()) { this.func_args = other.func_args; } if (other.is_set_request_id()) { this.request_id = other.request_id; } }
public void setFieldValue(_Fields field, Object value) { switch (field) { case FUNC_ARGS: if (value == null) { unset_func_args(); } else { set_func_args((String)value); } break; case REQUEST_ID: if (value == null) { unset_request_id(); } else { set_request_id((String)value); } break; } }
public void validate() throws org.apache.thrift7.TException { // check for required fields if (!is_set_func_args()) { throw new org.apache.thrift7.protocol.TProtocolException("Required field 'func_args' is unset! Struct:" + toString()); } if (!is_set_request_id()) { throw new org.apache.thrift7.protocol.TProtocolException("Required field 'request_id' is unset! Struct:" + toString()); } }
public DRPCRequest deepCopy() { return new DRPCRequest(this); }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in))); } catch (org.apache.thrift7.TException te) { throw new java.io.IOException(te); } }
/** 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 FUNC_ARGS: return is_set_func_args(); case REQUEST_ID: return is_set_request_id(); } throw new IllegalStateException(); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case FUNC_ARGS: if (value == null) { unset_func_args(); } else { set_func_args((String)value); } break; case REQUEST_ID: if (value == null) { unset_request_id(); } else { set_request_id((String)value); } break; } }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_func_args()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'func_args' is unset! Struct:" + toString()); } if (!is_set_request_id()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'request_id' is unset! Struct:" + toString()); } }
case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new DRPCRequest(); struct.success.read(iprot); struct.set_success_isSet(true); } else {
public Object getFieldValue(_Fields field) { switch (field) { case FUNC_ARGS: return get_func_args(); case REQUEST_ID: return get_request_id(); } throw new IllegalStateException(); }
@Override public DRPCRequest fetchRequest(String functionName) throws TException { ConcurrentLinkedQueue<DRPCRequest> queue = acquireQueue(functionName); DRPCRequest req = queue.poll(); if (req != null) { LOG.info("Fetched request for " + functionName + " at " + (System.currentTimeMillis())); return req; } else { return new DRPCRequest("", ""); } }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof DRPCRequest) return this.equals((DRPCRequest)that); return false; }