http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/a22c11d8/tephra-core/src/main/java/org/apache/tephra/distributed/thrift/TTransactionServer.java ---------------------------------------------------------------------- diff --git a/tephra-core/src/main/java/org/apache/tephra/distributed/thrift/TTransactionServer.java b/tephra-core/src/main/java/org/apache/tephra/distributed/thrift/TTransactionServer.java index 3d47a8a..634350d 100644 --- a/tephra-core/src/main/java/org/apache/tephra/distributed/thrift/TTransactionServer.java +++ b/tephra-core/src/main/java/org/apache/tephra/distributed/thrift/TTransactionServer.java @@ -56,8 +56,14 @@ public class TTransactionServer { public TTransaction startShort() throws org.apache.thrift.TException; + public TTransaction startLongClientId(String clientId) throws TGenericException, org.apache.thrift.TException; + public TTransaction startShortTimeout(int timeout) throws org.apache.thrift.TException; + public TTransaction startShortClientId(String clientId) throws TGenericException, org.apache.thrift.TException; + + public TTransaction startShortWithClientIdAndTimeOut(String clientId, int timeout) throws TGenericException, org.apache.thrift.TException; + public TTransaction startShortWithTimeout(int timeout) throws TGenericException, org.apache.thrift.TException; public TBoolean canCommitTx(TTransaction tx, Set<ByteBuffer> changes) throws TTransactionNotInProgressException, org.apache.thrift.TException; @@ -90,8 +96,14 @@ public class TTransactionServer { public void startShort(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startShort_call> resultHandler) throws org.apache.thrift.TException; + public void startLongClientId(String clientId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startLongClientId_call> resultHandler) throws org.apache.thrift.TException; + public void startShortTimeout(int timeout, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startShortTimeout_call> resultHandler) throws org.apache.thrift.TException; + public void startShortClientId(String clientId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startShortClientId_call> resultHandler) throws org.apache.thrift.TException; + + public void startShortWithClientIdAndTimeOut(String clientId, int timeout, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startShortWithClientIdAndTimeOut_call> resultHandler) throws org.apache.thrift.TException; + public void startShortWithTimeout(int timeout, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startShortWithTimeout_call> resultHandler) throws org.apache.thrift.TException; public void canCommitTx(TTransaction tx, Set<ByteBuffer> changes, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.canCommitTx_call> resultHandler) throws org.apache.thrift.TException; @@ -182,6 +194,32 @@ public class TTransactionServer { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startShort failed: unknown result"); } + public TTransaction startLongClientId(String clientId) throws TGenericException, org.apache.thrift.TException + { + send_startLongClientId(clientId); + return recv_startLongClientId(); + } + + public void send_startLongClientId(String clientId) throws org.apache.thrift.TException + { + startLongClientId_args args = new startLongClientId_args(); + args.setClientId(clientId); + sendBase("startLongClientId", args); + } + + public TTransaction recv_startLongClientId() throws TGenericException, org.apache.thrift.TException + { + startLongClientId_result result = new startLongClientId_result(); + receiveBase(result, "startLongClientId"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.e != null) { + throw result.e; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startLongClientId failed: unknown result"); + } + public TTransaction startShortTimeout(int timeout) throws org.apache.thrift.TException { send_startShortTimeout(timeout); @@ -205,6 +243,59 @@ public class TTransactionServer { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startShortTimeout failed: unknown result"); } + public TTransaction startShortClientId(String clientId) throws TGenericException, org.apache.thrift.TException + { + send_startShortClientId(clientId); + return recv_startShortClientId(); + } + + public void send_startShortClientId(String clientId) throws org.apache.thrift.TException + { + startShortClientId_args args = new startShortClientId_args(); + args.setClientId(clientId); + sendBase("startShortClientId", args); + } + + public TTransaction recv_startShortClientId() throws TGenericException, org.apache.thrift.TException + { + startShortClientId_result result = new startShortClientId_result(); + receiveBase(result, "startShortClientId"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.e != null) { + throw result.e; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startShortClientId failed: unknown result"); + } + + public TTransaction startShortWithClientIdAndTimeOut(String clientId, int timeout) throws TGenericException, org.apache.thrift.TException + { + send_startShortWithClientIdAndTimeOut(clientId, timeout); + return recv_startShortWithClientIdAndTimeOut(); + } + + public void send_startShortWithClientIdAndTimeOut(String clientId, int timeout) throws org.apache.thrift.TException + { + startShortWithClientIdAndTimeOut_args args = new startShortWithClientIdAndTimeOut_args(); + args.setClientId(clientId); + args.setTimeout(timeout); + sendBase("startShortWithClientIdAndTimeOut", args); + } + + public TTransaction recv_startShortWithClientIdAndTimeOut() throws TGenericException, org.apache.thrift.TException + { + startShortWithClientIdAndTimeOut_result result = new startShortWithClientIdAndTimeOut_result(); + receiveBase(result, "startShortWithClientIdAndTimeOut"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.e != null) { + throw result.e; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startShortWithClientIdAndTimeOut failed: unknown result"); + } + public TTransaction startShortWithTimeout(int timeout) throws TGenericException, org.apache.thrift.TException { send_startShortWithTimeout(timeout); @@ -566,6 +657,38 @@ public class TTransactionServer { } } + public void startLongClientId(String clientId, org.apache.thrift.async.AsyncMethodCallback<startLongClientId_call> resultHandler) throws org.apache.thrift.TException { + checkReady(); + startLongClientId_call method_call = new startLongClientId_call(clientId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class startLongClientId_call extends org.apache.thrift.async.TAsyncMethodCall { + private String clientId; + public startLongClientId_call(String clientId, org.apache.thrift.async.AsyncMethodCallback<startLongClientId_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.clientId = clientId; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startLongClientId", org.apache.thrift.protocol.TMessageType.CALL, 0)); + startLongClientId_args args = new startLongClientId_args(); + args.setClientId(clientId); + args.write(prot); + prot.writeMessageEnd(); + } + + public TTransaction getResult() throws TGenericException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_startLongClientId(); + } + } + public void startShortTimeout(int timeout, org.apache.thrift.async.AsyncMethodCallback<startShortTimeout_call> resultHandler) throws org.apache.thrift.TException { checkReady(); startShortTimeout_call method_call = new startShortTimeout_call(timeout, resultHandler, this, ___protocolFactory, ___transport); @@ -598,6 +721,73 @@ public class TTransactionServer { } } + public void startShortClientId(String clientId, org.apache.thrift.async.AsyncMethodCallback<startShortClientId_call> resultHandler) throws org.apache.thrift.TException { + checkReady(); + startShortClientId_call method_call = new startShortClientId_call(clientId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class startShortClientId_call extends org.apache.thrift.async.TAsyncMethodCall { + private String clientId; + public startShortClientId_call(String clientId, org.apache.thrift.async.AsyncMethodCallback<startShortClientId_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.clientId = clientId; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startShortClientId", org.apache.thrift.protocol.TMessageType.CALL, 0)); + startShortClientId_args args = new startShortClientId_args(); + args.setClientId(clientId); + args.write(prot); + prot.writeMessageEnd(); + } + + public TTransaction getResult() throws TGenericException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_startShortClientId(); + } + } + + public void startShortWithClientIdAndTimeOut(String clientId, int timeout, org.apache.thrift.async.AsyncMethodCallback<startShortWithClientIdAndTimeOut_call> resultHandler) throws org.apache.thrift.TException { + checkReady(); + startShortWithClientIdAndTimeOut_call method_call = new startShortWithClientIdAndTimeOut_call(clientId, timeout, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class startShortWithClientIdAndTimeOut_call extends org.apache.thrift.async.TAsyncMethodCall { + private String clientId; + private int timeout; + public startShortWithClientIdAndTimeOut_call(String clientId, int timeout, org.apache.thrift.async.AsyncMethodCallback<startShortWithClientIdAndTimeOut_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.clientId = clientId; + this.timeout = timeout; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startShortWithClientIdAndTimeOut", org.apache.thrift.protocol.TMessageType.CALL, 0)); + startShortWithClientIdAndTimeOut_args args = new startShortWithClientIdAndTimeOut_args(); + args.setClientId(clientId); + args.setTimeout(timeout); + args.write(prot); + prot.writeMessageEnd(); + } + + public TTransaction getResult() throws TGenericException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_startShortWithClientIdAndTimeOut(); + } + } + public void startShortWithTimeout(int timeout, org.apache.thrift.async.AsyncMethodCallback<startShortWithTimeout_call> resultHandler) throws org.apache.thrift.TException { checkReady(); startShortWithTimeout_call method_call = new startShortWithTimeout_call(timeout, resultHandler, this, ___protocolFactory, ___transport); @@ -988,7 +1178,10 @@ public class TTransactionServer { private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { processMap.put("startLong", new startLong()); processMap.put("startShort", new startShort()); + processMap.put("startLongClientId", new startLongClientId()); processMap.put("startShortTimeout", new startShortTimeout()); + processMap.put("startShortClientId", new startShortClientId()); + processMap.put("startShortWithClientIdAndTimeOut", new startShortWithClientIdAndTimeOut()); processMap.put("startShortWithTimeout", new startShortWithTimeout()); processMap.put("canCommitTx", new canCommitTx()); processMap.put("commitTx", new commitTx()); @@ -1044,6 +1237,30 @@ public class TTransactionServer { } } + public static class startLongClientId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startLongClientId_args> { + public startLongClientId() { + super("startLongClientId"); + } + + public startLongClientId_args getEmptyArgsInstance() { + return new startLongClientId_args(); + } + + protected boolean isOneway() { + return false; + } + + public startLongClientId_result getResult(I iface, startLongClientId_args args) throws org.apache.thrift.TException { + startLongClientId_result result = new startLongClientId_result(); + try { + result.success = iface.startLongClientId(args.clientId); + } catch (TGenericException e) { + result.e = e; + } + return result; + } + } + public static class startShortTimeout<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startShortTimeout_args> { public startShortTimeout() { super("startShortTimeout"); @@ -1064,6 +1281,54 @@ public class TTransactionServer { } } + public static class startShortClientId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startShortClientId_args> { + public startShortClientId() { + super("startShortClientId"); + } + + public startShortClientId_args getEmptyArgsInstance() { + return new startShortClientId_args(); + } + + protected boolean isOneway() { + return false; + } + + public startShortClientId_result getResult(I iface, startShortClientId_args args) throws org.apache.thrift.TException { + startShortClientId_result result = new startShortClientId_result(); + try { + result.success = iface.startShortClientId(args.clientId); + } catch (TGenericException e) { + result.e = e; + } + return result; + } + } + + public static class startShortWithClientIdAndTimeOut<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startShortWithClientIdAndTimeOut_args> { + public startShortWithClientIdAndTimeOut() { + super("startShortWithClientIdAndTimeOut"); + } + + public startShortWithClientIdAndTimeOut_args getEmptyArgsInstance() { + return new startShortWithClientIdAndTimeOut_args(); + } + + protected boolean isOneway() { + return false; + } + + public startShortWithClientIdAndTimeOut_result getResult(I iface, startShortWithClientIdAndTimeOut_args args) throws org.apache.thrift.TException { + startShortWithClientIdAndTimeOut_result result = new startShortWithClientIdAndTimeOut_result(); + try { + result.success = iface.startShortWithClientIdAndTimeOut(args.clientId, args.timeout); + } catch (TGenericException e) { + result.e = e; + } + return result; + } + } + public static class startShortWithTimeout<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startShortWithTimeout_args> { public startShortWithTimeout() { super("startShortWithTimeout"); @@ -2542,22 +2807,22 @@ public class TTransactionServer { } - public static class startShortTimeout_args implements org.apache.thrift.TBase<startShortTimeout_args, startShortTimeout_args._Fields>, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startShortTimeout_args"); + public static class startLongClientId_args implements org.apache.thrift.TBase<startLongClientId_args, startLongClientId_args._Fields>, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startLongClientId_args"); - private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField CLIENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("clientId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new startShortTimeout_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new startShortTimeout_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new startLongClientId_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new startLongClientId_argsTupleSchemeFactory()); } - public int timeout; // required + public String clientId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TIMEOUT((short)1, "timeout"); + CLIENT_ID((short)1, "clientId"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -2572,8 +2837,8 @@ public class TTransactionServer { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TIMEOUT - return TIMEOUT; + case 1: // CLIENT_ID + return CLIENT_ID; default: return null; } @@ -2614,76 +2879,74 @@ public class TTransactionServer { } // isset id assignments - private static final int __TIMEOUT_ISSET_ID = 0; - private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.CLIENT_ID, new org.apache.thrift.meta_data.FieldMetaData("clientId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startShortTimeout_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startLongClientId_args.class, metaDataMap); } - public startShortTimeout_args() { + public startLongClientId_args() { } - public startShortTimeout_args( - int timeout) + public startLongClientId_args( + String clientId) { this(); - this.timeout = timeout; - setTimeoutIsSet(true); + this.clientId = clientId; } /** * Performs a deep copy on <i>other</i>. */ - public startShortTimeout_args(startShortTimeout_args other) { - __isset_bitfield = other.__isset_bitfield; - this.timeout = other.timeout; + public startLongClientId_args(startLongClientId_args other) { + if (other.isSetClientId()) { + this.clientId = other.clientId; + } } - public startShortTimeout_args deepCopy() { - return new startShortTimeout_args(this); + public startLongClientId_args deepCopy() { + return new startLongClientId_args(this); } @Override public void clear() { - setTimeoutIsSet(false); - this.timeout = 0; + this.clientId = null; } - public int getTimeout() { - return this.timeout; + public String getClientId() { + return this.clientId; } - public startShortTimeout_args setTimeout(int timeout) { - this.timeout = timeout; - setTimeoutIsSet(true); + public startLongClientId_args setClientId(String clientId) { + this.clientId = clientId; return this; } - public void unsetTimeout() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + public void unsetClientId() { + this.clientId = null; } - /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ - public boolean isSetTimeout() { - return EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + /** Returns true if field clientId is set (has been assigned a value) and false otherwise */ + public boolean isSetClientId() { + return this.clientId != null; } - public void setTimeoutIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); + public void setClientIdIsSet(boolean value) { + if (!value) { + this.clientId = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TIMEOUT: + case CLIENT_ID: if (value == null) { - unsetTimeout(); + unsetClientId(); } else { - setTimeout((Integer)value); + setClientId((String)value); } break; @@ -2692,8 +2955,8 @@ public class TTransactionServer { public Object getFieldValue(_Fields field) { switch (field) { - case TIMEOUT: - return Integer.valueOf(getTimeout()); + case CLIENT_ID: + return getClientId(); } throw new IllegalStateException(); @@ -2706,8 +2969,8 @@ public class TTransactionServer { } switch (field) { - case TIMEOUT: - return isSetTimeout(); + case CLIENT_ID: + return isSetClientId(); } throw new IllegalStateException(); } @@ -2716,21 +2979,21 @@ public class TTransactionServer { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof startShortTimeout_args) - return this.equals((startShortTimeout_args)that); + if (that instanceof startLongClientId_args) + return this.equals((startLongClientId_args)that); return false; } - public boolean equals(startShortTimeout_args that) { + public boolean equals(startLongClientId_args that) { if (that == null) return false; - boolean this_present_timeout = true; - boolean that_present_timeout = true; - if (this_present_timeout || that_present_timeout) { - if (!(this_present_timeout && that_present_timeout)) + boolean this_present_clientId = true && this.isSetClientId(); + boolean that_present_clientId = true && that.isSetClientId(); + if (this_present_clientId || that_present_clientId) { + if (!(this_present_clientId && that_present_clientId)) return false; - if (this.timeout != that.timeout) + if (!this.clientId.equals(that.clientId)) return false; } @@ -2742,20 +3005,20 @@ public class TTransactionServer { return 0; } - public int compareTo(startShortTimeout_args other) { + public int compareTo(startLongClientId_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - startShortTimeout_args typedOther = (startShortTimeout_args)other; + startLongClientId_args typedOther = (startLongClientId_args)other; - lastComparison = Boolean.valueOf(isSetTimeout()).compareTo(typedOther.isSetTimeout()); + lastComparison = Boolean.valueOf(isSetClientId()).compareTo(typedOther.isSetClientId()); if (lastComparison != 0) { return lastComparison; } - if (isSetTimeout()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, typedOther.timeout); + if (isSetClientId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientId, typedOther.clientId); if (lastComparison != 0) { return lastComparison; } @@ -2777,11 +3040,15 @@ public class TTransactionServer { @Override public String toString() { - StringBuilder sb = new StringBuilder("startShortTimeout_args("); + StringBuilder sb = new StringBuilder("startLongClientId_args("); boolean first = true; - sb.append("timeout:"); - sb.append(this.timeout); + sb.append("clientId:"); + if (this.clientId == null) { + sb.append("null"); + } else { + sb.append(this.clientId); + } first = false; sb.append(")"); return sb.toString(); @@ -2802,23 +3069,21 @@ public class TTransactionServer { 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); } } - private static class startShortTimeout_argsStandardSchemeFactory implements SchemeFactory { - public startShortTimeout_argsStandardScheme getScheme() { - return new startShortTimeout_argsStandardScheme(); + private static class startLongClientId_argsStandardSchemeFactory implements SchemeFactory { + public startLongClientId_argsStandardScheme getScheme() { + return new startLongClientId_argsStandardScheme(); } } - private static class startShortTimeout_argsStandardScheme extends StandardScheme<startShortTimeout_args> { + private static class startLongClientId_argsStandardScheme extends StandardScheme<startLongClientId_args> { - public void read(org.apache.thrift.protocol.TProtocol iprot, startShortTimeout_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, startLongClientId_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -2828,10 +3093,10 @@ public class TTransactionServer { break; } switch (schemeField.id) { - case 1: // TIMEOUT - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.timeout = iprot.readI32(); - struct.setTimeoutIsSet(true); + case 1: // CLIENT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.clientId = iprot.readString(); + struct.setClientIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -2847,45 +3112,2486 @@ public class TTransactionServer { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, startShortTimeout_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, startLongClientId_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); - oprot.writeI32(struct.timeout); - oprot.writeFieldEnd(); + if (struct.clientId != null) { + oprot.writeFieldBegin(CLIENT_ID_FIELD_DESC); + oprot.writeString(struct.clientId); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class startShortTimeout_argsTupleSchemeFactory implements SchemeFactory { + private static class startLongClientId_argsTupleSchemeFactory implements SchemeFactory { + public startLongClientId_argsTupleScheme getScheme() { + return new startLongClientId_argsTupleScheme(); + } + } + + private static class startLongClientId_argsTupleScheme extends TupleScheme<startLongClientId_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, startLongClientId_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetClientId()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetClientId()) { + oprot.writeString(struct.clientId); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, startLongClientId_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.clientId = iprot.readString(); + struct.setClientIdIsSet(true); + } + } + } + + } + + public static class startLongClientId_result implements org.apache.thrift.TBase<startLongClientId_result, startLongClientId_result._Fields>, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startLongClientId_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new startLongClientId_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new startLongClientId_resultTupleSchemeFactory()); + } + + public TTransaction success; // required + public TGenericException e; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + E((short)1, "e"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTransaction.class))); + tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startLongClientId_result.class, metaDataMap); + } + + public startLongClientId_result() { + } + + public startLongClientId_result( + TTransaction success, + TGenericException e) + { + this(); + this.success = success; + this.e = e; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public startLongClientId_result(startLongClientId_result other) { + if (other.isSetSuccess()) { + this.success = new TTransaction(other.success); + } + if (other.isSetE()) { + this.e = new TGenericException(other.e); + } + } + + public startLongClientId_result deepCopy() { + return new startLongClientId_result(this); + } + + @Override + public void clear() { + this.success = null; + this.e = null; + } + + public TTransaction getSuccess() { + return this.success; + } + + public startLongClientId_result setSuccess(TTransaction success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TGenericException getE() { + return this.e; + } + + public startLongClientId_result setE(TGenericException e) { + this.e = e; + return this; + } + + public void unsetE() { + this.e = null; + } + + /** Returns true if field e is set (has been assigned a value) and false otherwise */ + public boolean isSetE() { + return this.e != null; + } + + public void setEIsSet(boolean value) { + if (!value) { + this.e = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TTransaction)value); + } + break; + + case E: + if (value == null) { + unsetE(); + } else { + setE((TGenericException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case E: + return getE(); + + } + throw new IllegalStateException(); + } + + /** 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 E: + return isSetE(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof startLongClientId_result) + return this.equals((startLongClientId_result)that); + return false; + } + + public boolean equals(startLongClientId_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_e = true && this.isSetE(); + boolean that_present_e = true && that.isSetE(); + if (this_present_e || that_present_e) { + if (!(this_present_e && that_present_e)) + return false; + if (!this.e.equals(that.e)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(startLongClientId_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + startLongClientId_result typedOther = (startLongClientId_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetE()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("startLongClientId_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("e:"); + if (this.e == null) { + sb.append("null"); + } else { + sb.append(this.e); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + 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); + } + } + + private static class startLongClientId_resultStandardSchemeFactory implements SchemeFactory { + public startLongClientId_resultStandardScheme getScheme() { + return new startLongClientId_resultStandardScheme(); + } + } + + private static class startLongClientId_resultStandardScheme extends StandardScheme<startLongClientId_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, startLongClientId_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TTransaction(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // E + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.e = new TGenericException(); + struct.e.read(iprot); + struct.setEIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, startLongClientId_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.e != null) { + oprot.writeFieldBegin(E_FIELD_DESC); + struct.e.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class startLongClientId_resultTupleSchemeFactory implements SchemeFactory { + public startLongClientId_resultTupleScheme getScheme() { + return new startLongClientId_resultTupleScheme(); + } + } + + private static class startLongClientId_resultTupleScheme extends TupleScheme<startLongClientId_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, startLongClientId_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetE()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetE()) { + struct.e.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, startLongClientId_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new TTransaction(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.e = new TGenericException(); + struct.e.read(iprot); + struct.setEIsSet(true); + } + } + } + + } + + public static class startShortTimeout_args implements org.apache.thrift.TBase<startShortTimeout_args, startShortTimeout_args._Fields>, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startShortTimeout_args"); + + private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I32, (short)1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new startShortTimeout_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new startShortTimeout_argsTupleSchemeFactory()); + } + + public int timeout; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TIMEOUT((short)1, "timeout"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TIMEOUT + return TIMEOUT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TIMEOUT_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startShortTimeout_args.class, metaDataMap); + } + + public startShortTimeout_args() { + } + + public startShortTimeout_args( + int timeout) + { + this(); + this.timeout = timeout; + setTimeoutIsSet(true); + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public startShortTimeout_args(startShortTimeout_args other) { + __isset_bitfield = other.__isset_bitfield; + this.timeout = other.timeout; + } + + public startShortTimeout_args deepCopy() { + return new startShortTimeout_args(this); + } + + @Override + public void clear() { + setTimeoutIsSet(false); + this.timeout = 0; + } + + public int getTimeout() { + return this.timeout; + } + + public startShortTimeout_args setTimeout(int timeout) { + this.timeout = timeout; + setTimeoutIsSet(true); + return this; + } + + public void unsetTimeout() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + } + + /** Returns true if field timeout is set (has been assigned a value) and false otherwise */ + public boolean isSetTimeout() { + return EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID); + } + + public void setTimeoutIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TIMEOUT: + if (value == null) { + unsetTimeout(); + } else { + setTimeout((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TIMEOUT: + return Integer.valueOf(getTimeout()); + + } + throw new IllegalStateException(); + } + + /** 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 TIMEOUT: + return isSetTimeout(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof startShortTimeout_args) + return this.equals((startShortTimeout_args)that); + return false; + } + + public boolean equals(startShortTimeout_args that) { + if (that == null) + return false; + + boolean this_present_timeout = true; + boolean that_present_timeout = true; + if (this_present_timeout || that_present_timeout) { + if (!(this_present_timeout && that_present_timeout)) + return false; + if (this.timeout != that.timeout) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(startShortTimeout_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + startShortTimeout_args typedOther = (startShortTimeout_args)other; + + lastComparison = Boolean.valueOf(isSetTimeout()).compareTo(typedOther.isSetTimeout()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimeout()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, typedOther.timeout); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("startShortTimeout_args("); + boolean first = true; + + sb.append("timeout:"); + sb.append(this.timeout); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + 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); + } + } + + private static class startShortTimeout_argsStandardSchemeFactory implements SchemeFactory { + public startShortTimeout_argsStandardScheme getScheme() { + return new startShortTimeout_argsStandardScheme(); + } + } + + private static class startShortTimeout_argsStandardScheme extends StandardScheme<startShortTimeout_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, startShortTimeout_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TIMEOUT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.timeout = iprot.readI32(); + struct.setTimeoutIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, startShortTimeout_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(TIMEOUT_FIELD_DESC); + oprot.writeI32(struct.timeout); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class startShortTimeout_argsTupleSchemeFactory implements SchemeFactory { public startShortTimeout_argsTupleScheme getScheme() { return new startShortTimeout_argsTupleScheme(); } } - private static class startShortTimeout_argsTupleScheme extends TupleScheme<startShortTimeout_args> { + private static class startShortTimeout_argsTupleScheme extends TupleScheme<startShortTimeout_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, startShortTimeout_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTimeout()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetTimeout()) { + oprot.writeI32(struct.timeout); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, startShortTimeout_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.timeout = iprot.readI32(); + struct.setTimeoutIsSet(true); + } + } + } + + } + + public static class startShortTimeout_result implements org.apache.thrift.TBase<startShortTimeout_result, startShortTimeout_result._Fields>, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startShortTimeout_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new startShortTimeout_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new startShortTimeout_resultTupleSchemeFactory()); + } + + public TTransaction success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTransaction.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startShortTimeout_result.class, metaDataMap); + } + + public startShortTimeout_result() { + } + + public startShortTimeout_result( + TTransaction success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public startShortTimeout_result(startShortTimeout_result other) { + if (other.isSetSuccess()) { + this.success = new TTransaction(other.success); + } + } + + public startShortTimeout_result deepCopy() { + return new startShortTimeout_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public TTransaction getSuccess() { + return this.success; + } + + public startShortTimeout_result setSuccess(TTransaction success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TTransaction)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** 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(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof startShortTimeout_result) + return this.equals((startShortTimeout_result)that); + return false; + } + + public boolean equals(startShortTimeout_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; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(startShortTimeout_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + startShortTimeout_result typedOther = (startShortTimeout_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("startShortTimeout_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + 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); + } + } + + private static class startShortTimeout_resultStandardSchemeFactory implements SchemeFactory { + public startShortTimeout_resultStandardScheme getScheme() { + return new startShortTimeout_resultStandardScheme(); + } + } + + private static class startShortTimeout_resultStandardScheme extends StandardScheme<startShortTimeout_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, startShortTimeout_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TTransaction(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, startShortTimeout_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class startShortTimeout_resultTupleSchemeFactory implements SchemeFactory { + public startShortTimeout_resultTupleScheme getScheme() { + return new startShortTimeout_resultTupleScheme(); + } + } + + private static class startShortTimeout_resultTupleScheme extends TupleScheme<startShortTimeout_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, startShortTimeout_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, startShortTimeout_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TTransaction(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class startShortClientId_args implements org.apache.thrift.TBase<startShortClientId_args, startShortClientId_args._Fields>, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startShortClientId_args"); + + private static final org.apache.thrift.protocol.TField CLIENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("clientId", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new startShortClientId_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new startShortClientId_argsTupleSchemeFactory()); + } + + public String clientId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + CLIENT_ID((short)1, "clientId"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // CLIENT_ID + return CLIENT_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.CLIENT_ID, new org.apache.thrift.meta_data.FieldMetaData("clientId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startShortClientId_args.class, metaDataMap); + } + + public startShortClientId_args() { + } + + public startShortClientId_args( + String clientId) + { + this(); + this.clientId = clientId; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public startShortClientId_args(startShortClientId_args other) { + if (other.isSetClientId()) { + this.clientId = other.clientId; + } + } + + public startShortClientId_args deepCopy() { + return new startShortClientId_args(this); + } + + @Override + public void clear() { + this.clientId = null; + } + + public String getClientId() { + return this.clientId; + } + + public startShortClientId_args setClientId(String clientId) { + this.clientId = clientId; + return this; + } + + public void unsetClientId() { + this.clientId = null; + } + + /** Returns true if field clientId is set (has been assigned a value) and false otherwise */ + public boolean isSetClientId() { + return this.clientId != null; + } + + public void setClientIdIsSet(boolean value) { + if (!value) { + this.clientId = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case CLIENT_ID: + if (value == null) { + unsetClientId(); + } else { + setClientId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case CLIENT_ID: + return getClientId(); + + } + throw new IllegalStateException(); + } + + /** 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 CLIENT_ID: + return isSetClientId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof startShortClientId_args) + return this.equals((startShortClientId_args)that); + return false; + } + + public boolean equals(startShortClientId_args that) { + if (that == null) + return false; + + boolean this_present_clientId = true && this.isSetClientId(); + boolean that_present_clientId = true && that.isSetClientId(); + if (this_present_clientId || that_present_clientId) { + if (!(this_present_clientId && that_present_clientId)) + return false; + if (!this.clientId.equals(that.clientId)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(startShortClientId_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + startShortClientId_args typedOther = (startShortClientId_args)other; + + lastComparison = Boolean.valueOf(isSetClientId()).compareTo(typedOther.isSetClientId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetClientId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientId, typedOther.clientId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("startShortClientId_args("); + boolean first = true; + + sb.append("clientId:"); + if (this.clientId == null) { + sb.append("null"); + } else { + sb.append(this.clientId); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + 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); + } + } + + private static class startShortClientId_argsStandardSchemeFactory implements SchemeFactory { + public startShortClientId_argsStandardScheme getScheme() { + return new startShortClientId_argsStandardScheme(); + } + } + + private static class startShortClientId_argsStandardScheme extends StandardScheme<startShortClientId_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, startShortClientId_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // CLIENT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.clientId = iprot.readString(); + struct.setClientIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, startShortClientId_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.clientId != null) { + oprot.writeFieldBegin(CLIENT_ID_FIELD_DESC); + oprot.writeString(struct.clientId); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class startShortClientId_argsTupleSchemeFactory implements SchemeFactory { + public startShortClientId_argsTupleScheme getScheme() { + return new startShortClientId_argsTupleScheme(); + } + } + + private static class startShortClientId_argsTupleScheme extends TupleScheme<startShortClientId_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, startShortClientId_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetClientId()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetClientId()) { + oprot.writeString(struct.clientId); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, startShortClientId_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.clientId = iprot.readString(); + struct.setClientIdIsSet(true); + } + } + } + + } + + public static class startShortClientId_result implements org.apache.thrift.TBase<startShortClientId_result, startShortClientId_result._Fields>, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startShortClientId_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new startShortClientId_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new startShortClientId_resultTupleSchemeFactory()); + } + + public TTransaction success; // required + public TGenericException e; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + E((short)1, "e"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // E + return E; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTransaction.class))); + tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startShortClientId_result.class, metaDataMap); + } + + public startShortClientId_result() { + } + + public startShortClientId_result( + TTransaction success, + TGenericException e) + { + this(); + this.success = success; + this.e = e; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public startShortClientId_result(startShortClientId_result other) { + if (other.isSetSuccess()) { + this.success = new TTransaction(other.success); + } + if (other.isSetE()) { + this.e = new TGenericException(other.e); + } + } + + public startShortClientId_result deepCopy() { + return new startShortClientId_result(this); + } + + @Override + public void clear() { + this.success = null; + this.e = null; + } + + public TTransaction getSuccess() { + return this.success; + } + + public startShortClientId_result setSuccess(TTransaction success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TGenericException getE() { + return this.e; + } + + public startShortClientId_result setE(TGenericException e) { + this.e = e; + return this; + } + + public void unsetE() { + this.e = null; + } + + /** Returns true if field e is set (has been assigned a value) and false otherwise */ +
<TRUNCATED>
