You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tephra.apache.org by po...@apache.org on 2016/05/06 23:02:41 UTC
[35/51] [partial] incubator-tephra git commit: Rename package to
org.apache.tephra
http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/9c693743/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
new file mode 100644
index 0000000..3b44534
--- /dev/null
+++ b/tephra-core/src/main/java/org/apache/tephra/distributed/thrift/TTransactionServer.java
@@ -0,0 +1,11072 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.tephra.distributed.thrift;
+
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+import org.apache.thrift.scheme.TupleScheme;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.nio.ByteBuffer;
+import java.util.BitSet;
+import java.util.Collections;
+import java.util.EnumMap;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+public class TTransactionServer {
+
+ public interface Iface {
+
+ public TTransaction startLong() throws org.apache.thrift.TException;
+
+ public TTransaction startShort() throws org.apache.thrift.TException;
+
+ public TTransaction startShortTimeout(int timeout) throws org.apache.thrift.TException;
+
+ public TBoolean canCommitTx(TTransaction tx, Set<ByteBuffer> changes) throws TTransactionNotInProgressException, org.apache.thrift.TException;
+
+ public TBoolean commitTx(TTransaction tx) throws TTransactionNotInProgressException, org.apache.thrift.TException;
+
+ public void abortTx(TTransaction tx) throws org.apache.thrift.TException;
+
+ public boolean invalidateTx(long tx) throws org.apache.thrift.TException;
+
+ public ByteBuffer getSnapshot() throws TTransactionCouldNotTakeSnapshotException, org.apache.thrift.TException;
+
+ public void resetState() throws org.apache.thrift.TException;
+
+ public String status() throws org.apache.thrift.TException;
+
+ public TBoolean truncateInvalidTx(Set<Long> txns) throws org.apache.thrift.TException;
+
+ public TBoolean truncateInvalidTxBefore(long time) throws TInvalidTruncateTimeException, org.apache.thrift.TException;
+
+ public int invalidTxSize() throws org.apache.thrift.TException;
+
+ public TTransaction checkpoint(TTransaction tx) throws TTransactionNotInProgressException, org.apache.thrift.TException;
+
+ }
+
+ public interface AsyncIface {
+
+ public void startLong(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startLong_call> resultHandler) throws org.apache.thrift.TException;
+
+ public void startShort(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startShort_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 canCommitTx(TTransaction tx, Set<ByteBuffer> changes, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.canCommitTx_call> resultHandler) throws org.apache.thrift.TException;
+
+ public void commitTx(TTransaction tx, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.commitTx_call> resultHandler) throws org.apache.thrift.TException;
+
+ public void abortTx(TTransaction tx, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.abortTx_call> resultHandler) throws org.apache.thrift.TException;
+
+ public void invalidateTx(long tx, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.invalidateTx_call> resultHandler) throws org.apache.thrift.TException;
+
+ public void getSnapshot(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSnapshot_call> resultHandler) throws org.apache.thrift.TException;
+
+ public void resetState(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.resetState_call> resultHandler) throws org.apache.thrift.TException;
+
+ public void status(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.status_call> resultHandler) throws org.apache.thrift.TException;
+
+ public void truncateInvalidTx(Set<Long> txns, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.truncateInvalidTx_call> resultHandler) throws org.apache.thrift.TException;
+
+ public void truncateInvalidTxBefore(long time, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.truncateInvalidTxBefore_call> resultHandler) throws org.apache.thrift.TException;
+
+ public void invalidTxSize(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.invalidTxSize_call> resultHandler) throws org.apache.thrift.TException;
+
+ public void checkpoint(TTransaction tx, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.checkpoint_call> resultHandler) throws org.apache.thrift.TException;
+
+ }
+
+ public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
+ public Factory() {}
+ public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
+ return new Client(prot);
+ }
+ public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ return new Client(iprot, oprot);
+ }
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol prot)
+ {
+ super(prot, prot);
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ super(iprot, oprot);
+ }
+
+ public TTransaction startLong() throws org.apache.thrift.TException
+ {
+ send_startLong();
+ return recv_startLong();
+ }
+
+ public void send_startLong() throws org.apache.thrift.TException
+ {
+ startLong_args args = new startLong_args();
+ sendBase("startLong", args);
+ }
+
+ public TTransaction recv_startLong() throws org.apache.thrift.TException
+ {
+ startLong_result result = new startLong_result();
+ receiveBase(result, "startLong");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startLong failed: unknown result");
+ }
+
+ public TTransaction startShort() throws org.apache.thrift.TException
+ {
+ send_startShort();
+ return recv_startShort();
+ }
+
+ public void send_startShort() throws org.apache.thrift.TException
+ {
+ startShort_args args = new startShort_args();
+ sendBase("startShort", args);
+ }
+
+ public TTransaction recv_startShort() throws org.apache.thrift.TException
+ {
+ startShort_result result = new startShort_result();
+ receiveBase(result, "startShort");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startShort failed: unknown result");
+ }
+
+ public TTransaction startShortTimeout(int timeout) throws org.apache.thrift.TException
+ {
+ send_startShortTimeout(timeout);
+ return recv_startShortTimeout();
+ }
+
+ public void send_startShortTimeout(int timeout) throws org.apache.thrift.TException
+ {
+ startShortTimeout_args args = new startShortTimeout_args();
+ args.setTimeout(timeout);
+ sendBase("startShortTimeout", args);
+ }
+
+ public TTransaction recv_startShortTimeout() throws org.apache.thrift.TException
+ {
+ startShortTimeout_result result = new startShortTimeout_result();
+ receiveBase(result, "startShortTimeout");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startShortTimeout failed: unknown result");
+ }
+
+ public TBoolean canCommitTx(TTransaction tx, Set<ByteBuffer> changes) throws TTransactionNotInProgressException, org.apache.thrift.TException
+ {
+ send_canCommitTx(tx, changes);
+ return recv_canCommitTx();
+ }
+
+ public void send_canCommitTx(TTransaction tx, Set<ByteBuffer> changes) throws org.apache.thrift.TException
+ {
+ canCommitTx_args args = new canCommitTx_args();
+ args.setTx(tx);
+ args.setChanges(changes);
+ sendBase("canCommitTx", args);
+ }
+
+ public TBoolean recv_canCommitTx() throws TTransactionNotInProgressException, org.apache.thrift.TException
+ {
+ canCommitTx_result result = new canCommitTx_result();
+ receiveBase(result, "canCommitTx");
+ 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, "canCommitTx failed: unknown result");
+ }
+
+ public TBoolean commitTx(TTransaction tx) throws TTransactionNotInProgressException, org.apache.thrift.TException
+ {
+ send_commitTx(tx);
+ return recv_commitTx();
+ }
+
+ public void send_commitTx(TTransaction tx) throws org.apache.thrift.TException
+ {
+ commitTx_args args = new commitTx_args();
+ args.setTx(tx);
+ sendBase("commitTx", args);
+ }
+
+ public TBoolean recv_commitTx() throws TTransactionNotInProgressException, org.apache.thrift.TException
+ {
+ commitTx_result result = new commitTx_result();
+ receiveBase(result, "commitTx");
+ 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, "commitTx failed: unknown result");
+ }
+
+ public void abortTx(TTransaction tx) throws org.apache.thrift.TException
+ {
+ send_abortTx(tx);
+ recv_abortTx();
+ }
+
+ public void send_abortTx(TTransaction tx) throws org.apache.thrift.TException
+ {
+ abortTx_args args = new abortTx_args();
+ args.setTx(tx);
+ sendBase("abortTx", args);
+ }
+
+ public void recv_abortTx() throws org.apache.thrift.TException
+ {
+ abortTx_result result = new abortTx_result();
+ receiveBase(result, "abortTx");
+ return;
+ }
+
+ public boolean invalidateTx(long tx) throws org.apache.thrift.TException
+ {
+ send_invalidateTx(tx);
+ return recv_invalidateTx();
+ }
+
+ public void send_invalidateTx(long tx) throws org.apache.thrift.TException
+ {
+ invalidateTx_args args = new invalidateTx_args();
+ args.setTx(tx);
+ sendBase("invalidateTx", args);
+ }
+
+ public boolean recv_invalidateTx() throws org.apache.thrift.TException
+ {
+ invalidateTx_result result = new invalidateTx_result();
+ receiveBase(result, "invalidateTx");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "invalidateTx failed: unknown result");
+ }
+
+ public ByteBuffer getSnapshot() throws TTransactionCouldNotTakeSnapshotException, org.apache.thrift.TException
+ {
+ send_getSnapshot();
+ return recv_getSnapshot();
+ }
+
+ public void send_getSnapshot() throws org.apache.thrift.TException
+ {
+ getSnapshot_args args = new getSnapshot_args();
+ sendBase("getSnapshot", args);
+ }
+
+ public ByteBuffer recv_getSnapshot() throws TTransactionCouldNotTakeSnapshotException, org.apache.thrift.TException
+ {
+ getSnapshot_result result = new getSnapshot_result();
+ receiveBase(result, "getSnapshot");
+ 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, "getSnapshot failed: unknown result");
+ }
+
+ public void resetState() throws org.apache.thrift.TException
+ {
+ send_resetState();
+ recv_resetState();
+ }
+
+ public void send_resetState() throws org.apache.thrift.TException
+ {
+ resetState_args args = new resetState_args();
+ sendBase("resetState", args);
+ }
+
+ public void recv_resetState() throws org.apache.thrift.TException
+ {
+ resetState_result result = new resetState_result();
+ receiveBase(result, "resetState");
+ return;
+ }
+
+ public String status() throws org.apache.thrift.TException
+ {
+ send_status();
+ return recv_status();
+ }
+
+ public void send_status() throws org.apache.thrift.TException
+ {
+ status_args args = new status_args();
+ sendBase("status", args);
+ }
+
+ public String recv_status() throws org.apache.thrift.TException
+ {
+ status_result result = new status_result();
+ receiveBase(result, "status");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "status failed: unknown result");
+ }
+
+ public TBoolean truncateInvalidTx(Set<Long> txns) throws org.apache.thrift.TException
+ {
+ send_truncateInvalidTx(txns);
+ return recv_truncateInvalidTx();
+ }
+
+ public void send_truncateInvalidTx(Set<Long> txns) throws org.apache.thrift.TException
+ {
+ truncateInvalidTx_args args = new truncateInvalidTx_args();
+ args.setTxns(txns);
+ sendBase("truncateInvalidTx", args);
+ }
+
+ public TBoolean recv_truncateInvalidTx() throws org.apache.thrift.TException
+ {
+ truncateInvalidTx_result result = new truncateInvalidTx_result();
+ receiveBase(result, "truncateInvalidTx");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "truncateInvalidTx failed: unknown result");
+ }
+
+ public TBoolean truncateInvalidTxBefore(long time) throws TInvalidTruncateTimeException, org.apache.thrift.TException
+ {
+ send_truncateInvalidTxBefore(time);
+ return recv_truncateInvalidTxBefore();
+ }
+
+ public void send_truncateInvalidTxBefore(long time) throws org.apache.thrift.TException
+ {
+ truncateInvalidTxBefore_args args = new truncateInvalidTxBefore_args();
+ args.setTime(time);
+ sendBase("truncateInvalidTxBefore", args);
+ }
+
+ public TBoolean recv_truncateInvalidTxBefore() throws TInvalidTruncateTimeException, org.apache.thrift.TException
+ {
+ truncateInvalidTxBefore_result result = new truncateInvalidTxBefore_result();
+ receiveBase(result, "truncateInvalidTxBefore");
+ 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, "truncateInvalidTxBefore failed: unknown result");
+ }
+
+ public int invalidTxSize() throws org.apache.thrift.TException
+ {
+ send_invalidTxSize();
+ return recv_invalidTxSize();
+ }
+
+ public void send_invalidTxSize() throws org.apache.thrift.TException
+ {
+ invalidTxSize_args args = new invalidTxSize_args();
+ sendBase("invalidTxSize", args);
+ }
+
+ public int recv_invalidTxSize() throws org.apache.thrift.TException
+ {
+ invalidTxSize_result result = new invalidTxSize_result();
+ receiveBase(result, "invalidTxSize");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "invalidTxSize failed: unknown result");
+ }
+
+ public TTransaction checkpoint(TTransaction tx) throws TTransactionNotInProgressException, org.apache.thrift.TException
+ {
+ send_checkpoint(tx);
+ return recv_checkpoint();
+ }
+
+ public void send_checkpoint(TTransaction tx) throws org.apache.thrift.TException
+ {
+ checkpoint_args args = new checkpoint_args();
+ args.setTx(tx);
+ sendBase("checkpoint", args);
+ }
+
+ public TTransaction recv_checkpoint() throws TTransactionNotInProgressException, org.apache.thrift.TException
+ {
+ checkpoint_result result = new checkpoint_result();
+ receiveBase(result, "checkpoint");
+ 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, "checkpoint failed: unknown result");
+ }
+
+ }
+ public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
+ public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
+ private org.apache.thrift.async.TAsyncClientManager clientManager;
+ private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
+ public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+ this.clientManager = clientManager;
+ this.protocolFactory = protocolFactory;
+ }
+ public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
+ return new AsyncClient(protocolFactory, clientManager, transport);
+ }
+ }
+
+ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
+ super(protocolFactory, clientManager, transport);
+ }
+
+ public void startLong(org.apache.thrift.async.AsyncMethodCallback<startLong_call> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ startLong_call method_call = new startLong_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class startLong_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public startLong_call(org.apache.thrift.async.AsyncMethodCallback<startLong_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);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startLong", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ startLong_args args = new startLong_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public TTransaction getResult() throws 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_startLong();
+ }
+ }
+
+ public void startShort(org.apache.thrift.async.AsyncMethodCallback<startShort_call> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ startShort_call method_call = new startShort_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class startShort_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public startShort_call(org.apache.thrift.async.AsyncMethodCallback<startShort_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);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startShort", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ startShort_args args = new startShort_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public TTransaction getResult() throws 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_startShort();
+ }
+ }
+
+ 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);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class startShortTimeout_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private int timeout;
+ public startShortTimeout_call(int timeout, org.apache.thrift.async.AsyncMethodCallback<startShortTimeout_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.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("startShortTimeout", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ startShortTimeout_args args = new startShortTimeout_args();
+ args.setTimeout(timeout);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public TTransaction getResult() throws 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_startShortTimeout();
+ }
+ }
+
+ public void canCommitTx(TTransaction tx, Set<ByteBuffer> changes, org.apache.thrift.async.AsyncMethodCallback<canCommitTx_call> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ canCommitTx_call method_call = new canCommitTx_call(tx, changes, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class canCommitTx_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private TTransaction tx;
+ private Set<ByteBuffer> changes;
+ public canCommitTx_call(TTransaction tx, Set<ByteBuffer> changes, org.apache.thrift.async.AsyncMethodCallback<canCommitTx_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.tx = tx;
+ this.changes = changes;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("canCommitTx", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ canCommitTx_args args = new canCommitTx_args();
+ args.setTx(tx);
+ args.setChanges(changes);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public TBoolean getResult() throws TTransactionNotInProgressException, 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_canCommitTx();
+ }
+ }
+
+ public void commitTx(TTransaction tx, org.apache.thrift.async.AsyncMethodCallback<commitTx_call> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ commitTx_call method_call = new commitTx_call(tx, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class commitTx_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private TTransaction tx;
+ public commitTx_call(TTransaction tx, org.apache.thrift.async.AsyncMethodCallback<commitTx_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.tx = tx;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("commitTx", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ commitTx_args args = new commitTx_args();
+ args.setTx(tx);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public TBoolean getResult() throws TTransactionNotInProgressException, 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_commitTx();
+ }
+ }
+
+ public void abortTx(TTransaction tx, org.apache.thrift.async.AsyncMethodCallback<abortTx_call> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ abortTx_call method_call = new abortTx_call(tx, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class abortTx_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private TTransaction tx;
+ public abortTx_call(TTransaction tx, org.apache.thrift.async.AsyncMethodCallback<abortTx_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.tx = tx;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("abortTx", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ abortTx_args args = new abortTx_args();
+ args.setTx(tx);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws 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);
+ (new Client(prot)).recv_abortTx();
+ }
+ }
+
+ public void invalidateTx(long tx, org.apache.thrift.async.AsyncMethodCallback<invalidateTx_call> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ invalidateTx_call method_call = new invalidateTx_call(tx, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class invalidateTx_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private long tx;
+ public invalidateTx_call(long tx, org.apache.thrift.async.AsyncMethodCallback<invalidateTx_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.tx = tx;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("invalidateTx", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ invalidateTx_args args = new invalidateTx_args();
+ args.setTx(tx);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws 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_invalidateTx();
+ }
+ }
+
+ public void getSnapshot(org.apache.thrift.async.AsyncMethodCallback<getSnapshot_call> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getSnapshot_call method_call = new getSnapshot_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getSnapshot_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public getSnapshot_call(org.apache.thrift.async.AsyncMethodCallback<getSnapshot_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);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSnapshot", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getSnapshot_args args = new getSnapshot_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public ByteBuffer getResult() throws TTransactionCouldNotTakeSnapshotException, 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_getSnapshot();
+ }
+ }
+
+ public void resetState(org.apache.thrift.async.AsyncMethodCallback<resetState_call> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ resetState_call method_call = new resetState_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class resetState_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public resetState_call(org.apache.thrift.async.AsyncMethodCallback<resetState_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);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("resetState", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ resetState_args args = new resetState_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws 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);
+ (new Client(prot)).recv_resetState();
+ }
+ }
+
+ public void status(org.apache.thrift.async.AsyncMethodCallback<status_call> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ status_call method_call = new status_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class status_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public status_call(org.apache.thrift.async.AsyncMethodCallback<status_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);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("status", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ status_args args = new status_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws 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_status();
+ }
+ }
+
+ public void truncateInvalidTx(Set<Long> txns, org.apache.thrift.async.AsyncMethodCallback<truncateInvalidTx_call> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ truncateInvalidTx_call method_call = new truncateInvalidTx_call(txns, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class truncateInvalidTx_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private Set<Long> txns;
+ public truncateInvalidTx_call(Set<Long> txns, org.apache.thrift.async.AsyncMethodCallback<truncateInvalidTx_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.txns = txns;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("truncateInvalidTx", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ truncateInvalidTx_args args = new truncateInvalidTx_args();
+ args.setTxns(txns);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public TBoolean getResult() throws 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_truncateInvalidTx();
+ }
+ }
+
+ public void truncateInvalidTxBefore(long time, org.apache.thrift.async.AsyncMethodCallback<truncateInvalidTxBefore_call> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ truncateInvalidTxBefore_call method_call = new truncateInvalidTxBefore_call(time, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class truncateInvalidTxBefore_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private long time;
+ public truncateInvalidTxBefore_call(long time, org.apache.thrift.async.AsyncMethodCallback<truncateInvalidTxBefore_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.time = time;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("truncateInvalidTxBefore", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ truncateInvalidTxBefore_args args = new truncateInvalidTxBefore_args();
+ args.setTime(time);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public TBoolean getResult() throws TInvalidTruncateTimeException, 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_truncateInvalidTxBefore();
+ }
+ }
+
+ public void invalidTxSize(org.apache.thrift.async.AsyncMethodCallback<invalidTxSize_call> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ invalidTxSize_call method_call = new invalidTxSize_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class invalidTxSize_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public invalidTxSize_call(org.apache.thrift.async.AsyncMethodCallback<invalidTxSize_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);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("invalidTxSize", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ invalidTxSize_args args = new invalidTxSize_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public int getResult() throws 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_invalidTxSize();
+ }
+ }
+
+ public void checkpoint(TTransaction tx, org.apache.thrift.async.AsyncMethodCallback<checkpoint_call> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ checkpoint_call method_call = new checkpoint_call(tx, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class checkpoint_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private TTransaction tx;
+ public checkpoint_call(TTransaction tx, org.apache.thrift.async.AsyncMethodCallback<checkpoint_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.tx = tx;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("checkpoint", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ checkpoint_args args = new checkpoint_args();
+ args.setTx(tx);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public TTransaction getResult() throws TTransactionNotInProgressException, 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_checkpoint();
+ }
+ }
+
+ }
+
+ public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
+ private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+ public Processor(I iface) {
+ super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+ }
+
+ protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ super(iface, getProcessMap(processMap));
+ }
+
+ 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("startShortTimeout", new startShortTimeout());
+ processMap.put("canCommitTx", new canCommitTx());
+ processMap.put("commitTx", new commitTx());
+ processMap.put("abortTx", new abortTx());
+ processMap.put("invalidateTx", new invalidateTx());
+ processMap.put("getSnapshot", new getSnapshot());
+ processMap.put("resetState", new resetState());
+ processMap.put("status", new status());
+ processMap.put("truncateInvalidTx", new truncateInvalidTx());
+ processMap.put("truncateInvalidTxBefore", new truncateInvalidTxBefore());
+ processMap.put("invalidTxSize", new invalidTxSize());
+ processMap.put("checkpoint", new checkpoint());
+ return processMap;
+ }
+
+ public static class startLong<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startLong_args> {
+ public startLong() {
+ super("startLong");
+ }
+
+ public startLong_args getEmptyArgsInstance() {
+ return new startLong_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public startLong_result getResult(I iface, startLong_args args) throws org.apache.thrift.TException {
+ startLong_result result = new startLong_result();
+ result.success = iface.startLong();
+ return result;
+ }
+ }
+
+ public static class startShort<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startShort_args> {
+ public startShort() {
+ super("startShort");
+ }
+
+ public startShort_args getEmptyArgsInstance() {
+ return new startShort_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public startShort_result getResult(I iface, startShort_args args) throws org.apache.thrift.TException {
+ startShort_result result = new startShort_result();
+ result.success = iface.startShort();
+ return result;
+ }
+ }
+
+ public static class startShortTimeout<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startShortTimeout_args> {
+ public startShortTimeout() {
+ super("startShortTimeout");
+ }
+
+ public startShortTimeout_args getEmptyArgsInstance() {
+ return new startShortTimeout_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public startShortTimeout_result getResult(I iface, startShortTimeout_args args) throws org.apache.thrift.TException {
+ startShortTimeout_result result = new startShortTimeout_result();
+ result.success = iface.startShortTimeout(args.timeout);
+ return result;
+ }
+ }
+
+ public static class canCommitTx<I extends Iface> extends org.apache.thrift.ProcessFunction<I, canCommitTx_args> {
+ public canCommitTx() {
+ super("canCommitTx");
+ }
+
+ public canCommitTx_args getEmptyArgsInstance() {
+ return new canCommitTx_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public canCommitTx_result getResult(I iface, canCommitTx_args args) throws org.apache.thrift.TException {
+ canCommitTx_result result = new canCommitTx_result();
+ try {
+ result.success = iface.canCommitTx(args.tx, args.changes);
+ } catch (TTransactionNotInProgressException e) {
+ result.e = e;
+ }
+ return result;
+ }
+ }
+
+ public static class commitTx<I extends Iface> extends org.apache.thrift.ProcessFunction<I, commitTx_args> {
+ public commitTx() {
+ super("commitTx");
+ }
+
+ public commitTx_args getEmptyArgsInstance() {
+ return new commitTx_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public commitTx_result getResult(I iface, commitTx_args args) throws org.apache.thrift.TException {
+ commitTx_result result = new commitTx_result();
+ try {
+ result.success = iface.commitTx(args.tx);
+ } catch (TTransactionNotInProgressException e) {
+ result.e = e;
+ }
+ return result;
+ }
+ }
+
+ public static class abortTx<I extends Iface> extends org.apache.thrift.ProcessFunction<I, abortTx_args> {
+ public abortTx() {
+ super("abortTx");
+ }
+
+ public abortTx_args getEmptyArgsInstance() {
+ return new abortTx_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public abortTx_result getResult(I iface, abortTx_args args) throws org.apache.thrift.TException {
+ abortTx_result result = new abortTx_result();
+ iface.abortTx(args.tx);
+ return result;
+ }
+ }
+
+ public static class invalidateTx<I extends Iface> extends org.apache.thrift.ProcessFunction<I, invalidateTx_args> {
+ public invalidateTx() {
+ super("invalidateTx");
+ }
+
+ public invalidateTx_args getEmptyArgsInstance() {
+ return new invalidateTx_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public invalidateTx_result getResult(I iface, invalidateTx_args args) throws org.apache.thrift.TException {
+ invalidateTx_result result = new invalidateTx_result();
+ result.success = iface.invalidateTx(args.tx);
+ result.setSuccessIsSet(true);
+ return result;
+ }
+ }
+
+ public static class getSnapshot<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSnapshot_args> {
+ public getSnapshot() {
+ super("getSnapshot");
+ }
+
+ public getSnapshot_args getEmptyArgsInstance() {
+ return new getSnapshot_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getSnapshot_result getResult(I iface, getSnapshot_args args) throws org.apache.thrift.TException {
+ getSnapshot_result result = new getSnapshot_result();
+ try {
+ result.success = iface.getSnapshot();
+ } catch (TTransactionCouldNotTakeSnapshotException e) {
+ result.e = e;
+ }
+ return result;
+ }
+ }
+
+ public static class resetState<I extends Iface> extends org.apache.thrift.ProcessFunction<I, resetState_args> {
+ public resetState() {
+ super("resetState");
+ }
+
+ public resetState_args getEmptyArgsInstance() {
+ return new resetState_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public resetState_result getResult(I iface, resetState_args args) throws org.apache.thrift.TException {
+ resetState_result result = new resetState_result();
+ iface.resetState();
+ return result;
+ }
+ }
+
+ public static class status<I extends Iface> extends org.apache.thrift.ProcessFunction<I, status_args> {
+ public status() {
+ super("status");
+ }
+
+ public status_args getEmptyArgsInstance() {
+ return new status_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public status_result getResult(I iface, status_args args) throws org.apache.thrift.TException {
+ status_result result = new status_result();
+ result.success = iface.status();
+ return result;
+ }
+ }
+
+ public static class truncateInvalidTx<I extends Iface> extends org.apache.thrift.ProcessFunction<I, truncateInvalidTx_args> {
+ public truncateInvalidTx() {
+ super("truncateInvalidTx");
+ }
+
+ public truncateInvalidTx_args getEmptyArgsInstance() {
+ return new truncateInvalidTx_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public truncateInvalidTx_result getResult(I iface, truncateInvalidTx_args args) throws org.apache.thrift.TException {
+ truncateInvalidTx_result result = new truncateInvalidTx_result();
+ result.success = iface.truncateInvalidTx(args.txns);
+ return result;
+ }
+ }
+
+ public static class truncateInvalidTxBefore<I extends Iface> extends org.apache.thrift.ProcessFunction<I, truncateInvalidTxBefore_args> {
+ public truncateInvalidTxBefore() {
+ super("truncateInvalidTxBefore");
+ }
+
+ public truncateInvalidTxBefore_args getEmptyArgsInstance() {
+ return new truncateInvalidTxBefore_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public truncateInvalidTxBefore_result getResult(I iface, truncateInvalidTxBefore_args args) throws org.apache.thrift.TException {
+ truncateInvalidTxBefore_result result = new truncateInvalidTxBefore_result();
+ try {
+ result.success = iface.truncateInvalidTxBefore(args.time);
+ } catch (TInvalidTruncateTimeException e) {
+ result.e = e;
+ }
+ return result;
+ }
+ }
+
+ public static class invalidTxSize<I extends Iface> extends org.apache.thrift.ProcessFunction<I, invalidTxSize_args> {
+ public invalidTxSize() {
+ super("invalidTxSize");
+ }
+
+ public invalidTxSize_args getEmptyArgsInstance() {
+ return new invalidTxSize_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public invalidTxSize_result getResult(I iface, invalidTxSize_args args) throws org.apache.thrift.TException {
+ invalidTxSize_result result = new invalidTxSize_result();
+ result.success = iface.invalidTxSize();
+ result.setSuccessIsSet(true);
+ return result;
+ }
+ }
+
+ public static class checkpoint<I extends Iface> extends org.apache.thrift.ProcessFunction<I, checkpoint_args> {
+ public checkpoint() {
+ super("checkpoint");
+ }
+
+ public checkpoint_args getEmptyArgsInstance() {
+ return new checkpoint_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public checkpoint_result getResult(I iface, checkpoint_args args) throws org.apache.thrift.TException {
+ checkpoint_result result = new checkpoint_result();
+ try {
+ result.success = iface.checkpoint(args.tx);
+ } catch (TTransactionNotInProgressException e) {
+ result.e = e;
+ }
+ return result;
+ }
+ }
+
+ }
+
+ public static class startLong_args implements org.apache.thrift.TBase<startLong_args, startLong_args._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startLong_args");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new startLong_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new startLong_argsTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ 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) {
+ 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;
+ }
+ }
+ 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);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startLong_args.class, metaDataMap);
+ }
+
+ public startLong_args() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public startLong_args(startLong_args other) {
+ }
+
+ public startLong_args deepCopy() {
+ return new startLong_args(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ 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) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof startLong_args)
+ return this.equals((startLong_args)that);
+ return false;
+ }
+
+ public boolean equals(startLong_args that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(startLong_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ startLong_args typedOther = (startLong_args)other;
+
+ 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("startLong_args(");
+ boolean first = true;
+
+ 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 startLong_argsStandardSchemeFactory implements SchemeFactory {
+ public startLong_argsStandardScheme getScheme() {
+ return new startLong_argsStandardScheme();
+ }
+ }
+
+ private static class startLong_argsStandardScheme extends StandardScheme<startLong_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, startLong_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) {
+ 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, startLong_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class startLong_argsTupleSchemeFactory implements SchemeFactory {
+ public startLong_argsTupleScheme getScheme() {
+ return new startLong_argsTupleScheme();
+ }
+ }
+
+ private static class startLong_argsTupleScheme extends TupleScheme<startLong_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, startLong_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, startLong_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+ }
+
+ public static class startLong_result implements org.apache.thrift.TBase<startLong_result, startLong_result._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startLong_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 startLong_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new startLong_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(startLong_result.class, metaDataMap);
+ }
+
+ public startLong_result() {
+ }
+
+ public startLong_result(
+ TTransaction success)
+ {
+ this();
+ this.success = success;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public startLong_result(startLong_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new TTransaction(other.success);
+ }
+ }
+
+ public startLong_result deepCopy() {
+ return new startLong_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ }
+
+ public TTransaction getSuccess() {
+ return this.success;
+ }
+
+ public startLong_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 startLong_result)
+ return this.equals((startLong_result)that);
+ return false;
+ }
+
+ public boolean equals(startLong_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(startLong_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ startLong_result typedOther = (startLong_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("startLong_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 startLong_resultStandardSchemeFactory implements SchemeFactory {
+ public startLong_resultStandardScheme getScheme() {
+ return new startLong_resultStandardScheme();
+ }
+ }
+
+ private static class startLong_resultStandardScheme extends StandardScheme<startLong_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, startLong_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, startLong_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 startLong_resultTupleSchemeFactory implements SchemeFactory {
+ public startLong_resultTupleScheme getScheme() {
+ return new startLong_resultTupleScheme();
+ }
+ }
+
+ private static class startLong_resultTupleScheme extends TupleScheme<startLong_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, startLong_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, startLong_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 startShort_args implements org.apache.thrift.TBase<startShort_args, startShort_args._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startShort_args");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new startShort_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new startShort_argsTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ 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) {
+ 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;
+ }
+ }
+ 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);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startShort_args.class, metaDataMap);
+ }
+
+ public startShort_args() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public startShort_args(startShort_args other) {
+ }
+
+ public startShort_args deepCopy() {
+ return new startShort_args(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ 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) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof startShort_args)
+ return this.equals((startShort_args)that);
+ return false;
+ }
+
+ public boolean equals(startShort_args that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(startShort_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ startShort_args typedOther = (startShort_args)other;
+
+ 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("startShort_args(");
+ boolean first = true;
+
+ 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 startShort_argsStandardSchemeFactory implements SchemeFactory {
+ public startShort_argsStandardScheme getScheme() {
+ return new startShort_argsStandardScheme();
+ }
+ }
+
+ private static class startShort_argsStandardScheme extends StandardScheme<startShort_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, startShort_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) {
+ 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, startShort_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class startShort_argsTupleSchemeFactory implements SchemeFactory {
+ public startShort_argsTupleScheme getScheme() {
+ return new startShort_argsTupleScheme();
+ }
+ }
+
+ private static class startShort_argsTupleScheme extends TupleScheme<startShort_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, startShort_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, startShort_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+ }
+
+ public static class startShort_result implements org.apache.thrift.TBase<startShort_result, startShort_result._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startShort_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 startShort_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new startShort_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(startShort_result.class, metaDataMap);
+ }
+
+ public startShort_result() {
+ }
+
+ public startShort_result(
+ TTransaction success)
+ {
+ this();
+ this.success = success;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public startShort_result(startShort_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new TTransaction(other.success);
+ }
+ }
+
+ public startShort_result deepCopy() {
+ return new startShort_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ }
+
+ public TTransaction getSuccess() {
+ return this.success;
+ }
+
+ public startShort_result setSuccess(TTransaction success) {
+ this.success = success;
+ re
<TRUNCATED>