/**
* Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.splout.db.thrift;
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.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2014-12-8")
public class DNodeService {
public interface Iface {
public ByteBuffer binarySqlQuery(String tablespace, long version, int partition, String query) throws DNodeException, org.apache.thrift.TException;
public String sqlQuery(String tablespace, long version, int partition, String query) throws DNodeException, org.apache.thrift.TException;
public String deleteOldVersions(List<TablespaceVersion> versions) throws DNodeException, org.apache.thrift.TException;
public String deploy(List<DeployAction> deployActions, long version) throws DNodeException, org.apache.thrift.TException;
public String rollback(List<RollbackAction> rollbackActions, String distributedBarrier) throws DNodeException, org.apache.thrift.TException;
public String status() throws DNodeException, org.apache.thrift.TException;
public String abortDeploy(long version) throws DNodeException, org.apache.thrift.TException;
public String testCommand(String command) throws DNodeException, org.apache.thrift.TException;
}
public interface AsyncIface {
public void binarySqlQuery(String tablespace, long version, int partition, String query, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void sqlQuery(String tablespace, long version, int partition, String query, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void deleteOldVersions(List<TablespaceVersion> versions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void deploy(List<DeployAction> deployActions, long version, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void rollback(List<RollbackAction> rollbackActions, String distributedBarrier, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void status(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void abortDeploy(long version, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void testCommand(String command, org.apache.thrift.async.AsyncMethodCallback 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 ByteBuffer binarySqlQuery(String tablespace, long version, int partition, String query) throws DNodeException, org.apache.thrift.TException
{
send_binarySqlQuery(tablespace, version, partition, query);
return recv_binarySqlQuery();
}
public void send_binarySqlQuery(String tablespace, long version, int partition, String query) throws org.apache.thrift.TException
{
binarySqlQuery_args args = new binarySqlQuery_args();
args.setTablespace(tablespace);
args.setVersion(version);
args.setPartition(partition);
args.setQuery(query);
sendBase("binarySqlQuery", args);
}
public ByteBuffer recv_binarySqlQuery() throws DNodeException, org.apache.thrift.TException
{
binarySqlQuery_result result = new binarySqlQuery_result();
receiveBase(result, "binarySqlQuery");
if (result.isSetSuccess()) {
return result.success;
}
if (result.excep != null) {
throw result.excep;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "binarySqlQuery failed: unknown result");
}
public String sqlQuery(String tablespace, long version, int partition, String query) throws DNodeException, org.apache.thrift.TException
{
send_sqlQuery(tablespace, version, partition, query);
return recv_sqlQuery();
}
public void send_sqlQuery(String tablespace, long version, int partition, String query) throws org.apache.thrift.TException
{
sqlQuery_args args = new sqlQuery_args();
args.setTablespace(tablespace);
args.setVersion(version);
args.setPartition(partition);
args.setQuery(query);
sendBase("sqlQuery", args);
}
public String recv_sqlQuery() throws DNodeException, org.apache.thrift.TException
{
sqlQuery_result result = new sqlQuery_result();
receiveBase(result, "sqlQuery");
if (result.isSetSuccess()) {
return result.success;
}
if (result.excep != null) {
throw result.excep;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "sqlQuery failed: unknown result");
}
public String deleteOldVersions(List<TablespaceVersion> versions) throws DNodeException, org.apache.thrift.TException
{
send_deleteOldVersions(versions);
return recv_deleteOldVersions();
}
public void send_deleteOldVersions(List<TablespaceVersion> versions) throws org.apache.thrift.TException
{
deleteOldVersions_args args = new deleteOldVersions_args();
args.setVersions(versions);
sendBase("deleteOldVersions", args);
}
public String recv_deleteOldVersions() throws DNodeException, org.apache.thrift.TException
{
deleteOldVersions_result result = new deleteOldVersions_result();
receiveBase(result, "deleteOldVersions");
if (result.isSetSuccess()) {
return result.success;
}
if (result.excep != null) {
throw result.excep;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteOldVersions failed: unknown result");
}
public String deploy(List<DeployAction> deployActions, long version) throws DNodeException, org.apache.thrift.TException
{
send_deploy(deployActions, version);
return recv_deploy();
}
public void send_deploy(List<DeployAction> deployActions, long version) throws org.apache.thrift.TException
{
deploy_args args = new deploy_args();
args.setDeployActions(deployActions);
args.setVersion(version);
sendBase("deploy", args);
}
public String recv_deploy() throws DNodeException, org.apache.thrift.TException
{
deploy_result result = new deploy_result();
receiveBase(result, "deploy");
if (result.isSetSuccess()) {
return result.success;
}
if (result.excep != null) {
throw result.excep;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deploy failed: unknown result");
}
public String rollback(List<RollbackAction> rollbackActions, String distributedBarrier) throws DNodeException, org.apache.thrift.TException
{
send_rollback(rollbackActions, distributedBarrier);
return recv_rollback();
}
public void send_rollback(List<RollbackAction> rollbackActions, String distributedBarrier) throws org.apache.thrift.TException
{
rollback_args args = new rollback_args();
args.setRollbackActions(rollbackActions);
args.setDistributedBarrier(distributedBarrier);
sendBase("rollback", args);
}
public String recv_rollback() throws DNodeException, org.apache.thrift.TException
{
rollback_result result = new rollback_result();
receiveBase(result, "rollback");
if (result.isSetSuccess()) {
return result.success;
}
if (result.excep != null) {
throw result.excep;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "rollback failed: unknown result");
}
public String status() throws DNodeException, 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 DNodeException, org.apache.thrift.TException
{
status_result result = new status_result();
receiveBase(result, "status");
if (result.isSetSuccess()) {
return result.success;
}
if (result.excep != null) {
throw result.excep;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "status failed: unknown result");
}
public String abortDeploy(long version) throws DNodeException, org.apache.thrift.TException
{
send_abortDeploy(version);
return recv_abortDeploy();
}
public void send_abortDeploy(long version) throws org.apache.thrift.TException
{
abortDeploy_args args = new abortDeploy_args();
args.setVersion(version);
sendBase("abortDeploy", args);
}
public String recv_abortDeploy() throws DNodeException, org.apache.thrift.TException
{
abortDeploy_result result = new abortDeploy_result();
receiveBase(result, "abortDeploy");
if (result.isSetSuccess()) {
return result.success;
}
if (result.excep != null) {
throw result.excep;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "abortDeploy failed: unknown result");
}
public String testCommand(String command) throws DNodeException, org.apache.thrift.TException
{
send_testCommand(command);
return recv_testCommand();
}
public void send_testCommand(String command) throws org.apache.thrift.TException
{
testCommand_args args = new testCommand_args();
args.setCommand(command);
sendBase("testCommand", args);
}
public String recv_testCommand() throws DNodeException, org.apache.thrift.TException
{
testCommand_result result = new testCommand_result();
receiveBase(result, "testCommand");
if (result.isSetSuccess()) {
return result.success;
}
if (result.excep != null) {
throw result.excep;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "testCommand 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 binarySqlQuery(String tablespace, long version, int partition, String query, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
binarySqlQuery_call method_call = new binarySqlQuery_call(tablespace, version, partition, query, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class binarySqlQuery_call extends org.apache.thrift.async.TAsyncMethodCall {
private String tablespace;
private long version;
private int partition;
private String query;
public binarySqlQuery_call(String tablespace, long version, int partition, String query, org.apache.thrift.async.AsyncMethodCallback 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.tablespace = tablespace;
this.version = version;
this.partition = partition;
this.query = query;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("binarySqlQuery", org.apache.thrift.protocol.TMessageType.CALL, 0));
binarySqlQuery_args args = new binarySqlQuery_args();
args.setTablespace(tablespace);
args.setVersion(version);
args.setPartition(partition);
args.setQuery(query);
args.write(prot);
prot.writeMessageEnd();
}
public ByteBuffer getResult() throws DNodeException, 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_binarySqlQuery();
}
}
public void sqlQuery(String tablespace, long version, int partition, String query, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
sqlQuery_call method_call = new sqlQuery_call(tablespace, version, partition, query, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class sqlQuery_call extends org.apache.thrift.async.TAsyncMethodCall {
private String tablespace;
private long version;
private int partition;
private String query;
public sqlQuery_call(String tablespace, long version, int partition, String query, org.apache.thrift.async.AsyncMethodCallback 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.tablespace = tablespace;
this.version = version;
this.partition = partition;
this.query = query;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sqlQuery", org.apache.thrift.protocol.TMessageType.CALL, 0));
sqlQuery_args args = new sqlQuery_args();
args.setTablespace(tablespace);
args.setVersion(version);
args.setPartition(partition);
args.setQuery(query);
args.write(prot);
prot.writeMessageEnd();
}
public String getResult() throws DNodeException, 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_sqlQuery();
}
}
public void deleteOldVersions(List<TablespaceVersion> versions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
deleteOldVersions_call method_call = new deleteOldVersions_call(versions, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteOldVersions_call extends org.apache.thrift.async.TAsyncMethodCall {
private List<TablespaceVersion> versions;
public deleteOldVersions_call(List<TablespaceVersion> versions, org.apache.thrift.async.AsyncMethodCallback 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.versions = versions;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteOldVersions", org.apache.thrift.protocol.TMessageType.CALL, 0));
deleteOldVersions_args args = new deleteOldVersions_args();
args.setVersions(versions);
args.write(prot);
prot.writeMessageEnd();
}
public String getResult() throws DNodeException, 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_deleteOldVersions();
}
}
public void deploy(List<DeployAction> deployActions, long version, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
deploy_call method_call = new deploy_call(deployActions, version, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deploy_call extends org.apache.thrift.async.TAsyncMethodCall {
private List<DeployAction> deployActions;
private long version;
public deploy_call(List<DeployAction> deployActions, long version, org.apache.thrift.async.AsyncMethodCallback 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.deployActions = deployActions;
this.version = version;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deploy", org.apache.thrift.protocol.TMessageType.CALL, 0));
deploy_args args = new deploy_args();
args.setDeployActions(deployActions);
args.setVersion(version);
args.write(prot);
prot.writeMessageEnd();
}
public String getResult() throws DNodeException, 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_deploy();
}
}
public void rollback(List<RollbackAction> rollbackActions, String distributedBarrier, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
rollback_call method_call = new rollback_call(rollbackActions, distributedBarrier, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class rollback_call extends org.apache.thrift.async.TAsyncMethodCall {
private List<RollbackAction> rollbackActions;
private String distributedBarrier;
public rollback_call(List<RollbackAction> rollbackActions, String distributedBarrier, org.apache.thrift.async.AsyncMethodCallback 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.rollbackActions = rollbackActions;
this.distributedBarrier = distributedBarrier;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("rollback", org.apache.thrift.protocol.TMessageType.CALL, 0));
rollback_args args = new rollback_args();
args.setRollbackActions(rollbackActions);
args.setDistributedBarrier(distributedBarrier);
args.write(prot);
prot.writeMessageEnd();
}
public String getResult() throws DNodeException, 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_rollback();
}
}
public void status(org.apache.thrift.async.AsyncMethodCallback 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 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 DNodeException, 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 abortDeploy(long version, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
abortDeploy_call method_call = new abortDeploy_call(version, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class abortDeploy_call extends org.apache.thrift.async.TAsyncMethodCall {
private long version;
public abortDeploy_call(long version, org.apache.thrift.async.AsyncMethodCallback 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.version = version;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("abortDeploy", org.apache.thrift.protocol.TMessageType.CALL, 0));
abortDeploy_args args = new abortDeploy_args();
args.setVersion(version);
args.write(prot);
prot.writeMessageEnd();
}
public String getResult() throws DNodeException, 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_abortDeploy();
}
}
public void testCommand(String command, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
testCommand_call method_call = new testCommand_call(command, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class testCommand_call extends org.apache.thrift.async.TAsyncMethodCall {
private String command;
public testCommand_call(String command, org.apache.thrift.async.AsyncMethodCallback 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.command = command;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("testCommand", org.apache.thrift.protocol.TMessageType.CALL, 0));
testCommand_args args = new testCommand_args();
args.setCommand(command);
args.write(prot);
prot.writeMessageEnd();
}
public String getResult() throws DNodeException, 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_testCommand();
}
}
}
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("binarySqlQuery", new binarySqlQuery());
processMap.put("sqlQuery", new sqlQuery());
processMap.put("deleteOldVersions", new deleteOldVersions());
processMap.put("deploy", new deploy());
processMap.put("rollback", new rollback());
processMap.put("status", new status());
processMap.put("abortDeploy", new abortDeploy());
processMap.put("testCommand", new testCommand());
return processMap;
}
public static class binarySqlQuery<I extends Iface> extends org.apache.thrift.ProcessFunction<I, binarySqlQuery_args> {
public binarySqlQuery() {
super("binarySqlQuery");
}
public binarySqlQuery_args getEmptyArgsInstance() {
return new binarySqlQuery_args();
}
protected boolean isOneway() {
return false;
}
public binarySqlQuery_result getResult(I iface, binarySqlQuery_args args) throws org.apache.thrift.TException {
binarySqlQuery_result result = new binarySqlQuery_result();
try {
result.success = iface.binarySqlQuery(args.tablespace, args.version, args.partition, args.query);
} catch (DNodeException excep) {
result.excep = excep;
}
return result;
}
}
public static class sqlQuery<I extends Iface> extends org.apache.thrift.ProcessFunction<I, sqlQuery_args> {
public sqlQuery() {
super("sqlQuery");
}
public sqlQuery_args getEmptyArgsInstance() {
return new sqlQuery_args();
}
protected boolean isOneway() {
return false;
}
public sqlQuery_result getResult(I iface, sqlQuery_args args) throws org.apache.thrift.TException {
sqlQuery_result result = new sqlQuery_result();
try {
result.success = iface.sqlQuery(args.tablespace, args.version, args.partition, args.query);
} catch (DNodeException excep) {
result.excep = excep;
}
return result;
}
}
public static class deleteOldVersions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteOldVersions_args> {
public deleteOldVersions() {
super("deleteOldVersions");
}
public deleteOldVersions_args getEmptyArgsInstance() {
return new deleteOldVersions_args();
}
protected boolean isOneway() {
return false;
}
public deleteOldVersions_result getResult(I iface, deleteOldVersions_args args) throws org.apache.thrift.TException {
deleteOldVersions_result result = new deleteOldVersions_result();
try {
result.success = iface.deleteOldVersions(args.versions);
} catch (DNodeException excep) {
result.excep = excep;
}
return result;
}
}
public static class deploy<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deploy_args> {
public deploy() {
super("deploy");
}
public deploy_args getEmptyArgsInstance() {
return new deploy_args();
}
protected boolean isOneway() {
return false;
}
public deploy_result getResult(I iface, deploy_args args) throws org.apache.thrift.TException {
deploy_result result = new deploy_result();
try {
result.success = iface.deploy(args.deployActions, args.version);
} catch (DNodeException excep) {
result.excep = excep;
}
return result;
}
}
public static class rollback<I extends Iface> extends org.apache.thrift.ProcessFunction<I, rollback_args> {
public rollback() {
super("rollback");
}
public rollback_args getEmptyArgsInstance() {
return new rollback_args();
}
protected boolean isOneway() {
return false;
}
public rollback_result getResult(I iface, rollback_args args) throws org.apache.thrift.TException {
rollback_result result = new rollback_result();
try {
result.success = iface.rollback(args.rollbackActions, args.distributedBarrier);
} catch (DNodeException excep) {
result.excep = excep;
}
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();
try {
result.success = iface.status();
} catch (DNodeException excep) {
result.excep = excep;
}
return result;
}
}
public static class abortDeploy<I extends Iface> extends org.apache.thrift.ProcessFunction<I, abortDeploy_args> {
public abortDeploy() {
super("abortDeploy");
}
public abortDeploy_args getEmptyArgsInstance() {
return new abortDeploy_args();
}
protected boolean isOneway() {
return false;
}
public abortDeploy_result getResult(I iface, abortDeploy_args args) throws org.apache.thrift.TException {
abortDeploy_result result = new abortDeploy_result();
try {
result.success = iface.abortDeploy(args.version);
} catch (DNodeException excep) {
result.excep = excep;
}
return result;
}
}
public static class testCommand<I extends Iface> extends org.apache.thrift.ProcessFunction<I, testCommand_args> {
public testCommand() {
super("testCommand");
}
public testCommand_args getEmptyArgsInstance() {
return new testCommand_args();
}
protected boolean isOneway() {
return false;
}
public testCommand_result getResult(I iface, testCommand_args args) throws org.apache.thrift.TException {
testCommand_result result = new testCommand_result();
try {
result.success = iface.testCommand(args.command);
} catch (DNodeException excep) {
result.excep = excep;
}
return result;
}
}
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
}
protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("binarySqlQuery", new binarySqlQuery());
processMap.put("sqlQuery", new sqlQuery());
processMap.put("deleteOldVersions", new deleteOldVersions());
processMap.put("deploy", new deploy());
processMap.put("rollback", new rollback());
processMap.put("status", new status());
processMap.put("abortDeploy", new abortDeploy());
processMap.put("testCommand", new testCommand());
return processMap;
}
public static class binarySqlQuery<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, binarySqlQuery_args, ByteBuffer> {
public binarySqlQuery() {
super("binarySqlQuery");
}
public binarySqlQuery_args getEmptyArgsInstance() {
return new binarySqlQuery_args();
}
public AsyncMethodCallback<ByteBuffer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<ByteBuffer>() {
public void onComplete(ByteBuffer o) {
binarySqlQuery_result result = new binarySqlQuery_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
binarySqlQuery_result result = new binarySqlQuery_result();
if (e instanceof DNodeException) {
result.excep = (DNodeException) e;
result.setExcepIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, binarySqlQuery_args args, org.apache.thrift.async.AsyncMethodCallback<ByteBuffer> resultHandler) throws TException {
iface.binarySqlQuery(args.tablespace, args.version, args.partition, args.query,resultHandler);
}
}
public static class sqlQuery<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, sqlQuery_args, String> {
public sqlQuery() {
super("sqlQuery");
}
public sqlQuery_args getEmptyArgsInstance() {
return new sqlQuery_args();
}
public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<String>() {
public void onComplete(String o) {
sqlQuery_result result = new sqlQuery_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
sqlQuery_result result = new sqlQuery_result();
if (e instanceof DNodeException) {
result.excep = (DNodeException) e;
result.setExcepIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, sqlQuery_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
iface.sqlQuery(args.tablespace, args.version, args.partition, args.query,resultHandler);
}
}
public static class deleteOldVersions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteOldVersions_args, String> {
public deleteOldVersions() {
super("deleteOldVersions");
}
public deleteOldVersions_args getEmptyArgsInstance() {
return new deleteOldVersions_args();
}
public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<String>() {
public void onComplete(String o) {
deleteOldVersions_result result = new deleteOldVersions_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
deleteOldVersions_result result = new deleteOldVersions_result();
if (e instanceof DNodeException) {
result.excep = (DNodeException) e;
result.setExcepIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, deleteOldVersions_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
iface.deleteOldVersions(args.versions,resultHandler);
}
}
public static class deploy<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deploy_args, String> {
public deploy() {
super("deploy");
}
public deploy_args getEmptyArgsInstance() {
return new deploy_args();
}
public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<String>() {
public void onComplete(String o) {
deploy_result result = new deploy_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
deploy_result result = new deploy_result();
if (e instanceof DNodeException) {
result.excep = (DNodeException) e;
result.setExcepIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, deploy_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
iface.deploy(args.deployActions, args.version,resultHandler);
}
}
public static class rollback<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, rollback_args, String> {
public rollback() {
super("rollback");
}
public rollback_args getEmptyArgsInstance() {
return new rollback_args();
}
public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<String>() {
public void onComplete(String o) {
rollback_result result = new rollback_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
rollback_result result = new rollback_result();
if (e instanceof DNodeException) {
result.excep = (DNodeException) e;
result.setExcepIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, rollback_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
iface.rollback(args.rollbackActions, args.distributedBarrier,resultHandler);
}
}
public static class status<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, status_args, String> {
public status() {
super("status");
}
public status_args getEmptyArgsInstance() {
return new status_args();
}
public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<String>() {
public void onComplete(String o) {
status_result result = new status_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
status_result result = new status_result();
if (e instanceof DNodeException) {
result.excep = (DNodeException) e;
result.setExcepIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, status_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
iface.status(resultHandler);
}
}
public static class abortDeploy<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, abortDeploy_args, String> {
public abortDeploy() {
super("abortDeploy");
}
public abortDeploy_args getEmptyArgsInstance() {
return new abortDeploy_args();
}
public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<String>() {
public void onComplete(String o) {
abortDeploy_result result = new abortDeploy_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
abortDeploy_result result = new abortDeploy_result();
if (e instanceof DNodeException) {
result.excep = (DNodeException) e;
result.setExcepIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, abortDeploy_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
iface.abortDeploy(args.version,resultHandler);
}
}
public static class testCommand<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, testCommand_args, String> {
public testCommand() {
super("testCommand");
}
public testCommand_args getEmptyArgsInstance() {
return new testCommand_args();
}
public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<String>() {
public void onComplete(String o) {
testCommand_result result = new testCommand_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
testCommand_result result = new testCommand_result();
if (e instanceof DNodeException) {
result.excep = (DNodeException) e;
result.setExcepIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, testCommand_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
iface.testCommand(args.command,resultHandler);
}
}
}
public static class binarySqlQuery_args implements org.apache.thrift.TBase<binarySqlQuery_args, binarySqlQuery_args._Fields>, java.io.Serializable, Cloneable, Comparable<binarySqlQuery_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("binarySqlQuery_args");
private static final org.apache.thrift.protocol.TField TABLESPACE_FIELD_DESC = new org.apache.thrift.protocol.TField("tablespace", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField PARTITION_FIELD_DESC = new org.apache.thrift.protocol.TField("partition", org.apache.thrift.protocol.TType.I32, (short)3);
private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new binarySqlQuery_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new binarySqlQuery_argsTupleSchemeFactory());
}
public String tablespace; // required
public long version; // required
public int partition; // required
public String query; // 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 {
TABLESPACE((short)1, "tablespace"),
VERSION((short)2, "version"),
PARTITION((short)3, "partition"),
QUERY((short)4, "query");
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: // TABLESPACE
return TABLESPACE;
case 2: // VERSION
return VERSION;
case 3: // PARTITION
return PARTITION;
case 4: // QUERY
return QUERY;
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 __VERSION_ISSET_ID = 0;
private static final int __PARTITION_ISSET_ID = 1;
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.TABLESPACE, new org.apache.thrift.meta_data.FieldMetaData("tablespace", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.PARTITION, new org.apache.thrift.meta_data.FieldMetaData("partition", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.QUERY, new org.apache.thrift.meta_data.FieldMetaData("query", 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(binarySqlQuery_args.class, metaDataMap);
}
public binarySqlQuery_args() {
}
public binarySqlQuery_args(
String tablespace,
long version,
int partition,
String query)
{
this();
this.tablespace = tablespace;
this.version = version;
setVersionIsSet(true);
this.partition = partition;
setPartitionIsSet(true);
this.query = query;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public binarySqlQuery_args(binarySqlQuery_args other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetTablespace()) {
this.tablespace = other.tablespace;
}
this.version = other.version;
this.partition = other.partition;
if (other.isSetQuery()) {
this.query = other.query;
}
}
public binarySqlQuery_args deepCopy() {
return new binarySqlQuery_args(this);
}
@Override
public void clear() {
this.tablespace = null;
setVersionIsSet(false);
this.version = 0;
setPartitionIsSet(false);
this.partition = 0;
this.query = null;
}
public String getTablespace() {
return this.tablespace;
}
public binarySqlQuery_args setTablespace(String tablespace) {
this.tablespace = tablespace;
return this;
}
public void unsetTablespace() {
this.tablespace = null;
}
/** Returns true if field tablespace is set (has been assigned a value) and false otherwise */
public boolean isSetTablespace() {
return this.tablespace != null;
}
public void setTablespaceIsSet(boolean value) {
if (!value) {
this.tablespace = null;
}
}
public long getVersion() {
return this.version;
}
public binarySqlQuery_args setVersion(long version) {
this.version = version;
setVersionIsSet(true);
return this;
}
public void unsetVersion() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID);
}
/** Returns true if field version is set (has been assigned a value) and false otherwise */
public boolean isSetVersion() {
return EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID);
}
public void setVersionIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value);
}
public int getPartition() {
return this.partition;
}
public binarySqlQuery_args setPartition(int partition) {
this.partition = partition;
setPartitionIsSet(true);
return this;
}
public void unsetPartition() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARTITION_ISSET_ID);
}
/** Returns true if field partition is set (has been assigned a value) and false otherwise */
public boolean isSetPartition() {
return EncodingUtils.testBit(__isset_bitfield, __PARTITION_ISSET_ID);
}
public void setPartitionIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARTITION_ISSET_ID, value);
}
public String getQuery() {
return this.query;
}
public binarySqlQuery_args setQuery(String query) {
this.query = query;
return this;
}
public void unsetQuery() {
this.query = null;
}
/** Returns true if field query is set (has been assigned a value) and false otherwise */
public boolean isSetQuery() {
return this.query != null;
}
public void setQueryIsSet(boolean value) {
if (!value) {
this.query = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLESPACE:
if (value == null) {
unsetTablespace();
} else {
setTablespace((String)value);
}
break;
case VERSION:
if (value == null) {
unsetVersion();
} else {
setVersion((Long)value);
}
break;
case PARTITION:
if (value == null) {
unsetPartition();
} else {
setPartition((Integer)value);
}
break;
case QUERY:
if (value == null) {
unsetQuery();
} else {
setQuery((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLESPACE:
return getTablespace();
case VERSION:
return Long.valueOf(getVersion());
case PARTITION:
return Integer.valueOf(getPartition());
case QUERY:
return getQuery();
}
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 TABLESPACE:
return isSetTablespace();
case VERSION:
return isSetVersion();
case PARTITION:
return isSetPartition();
case QUERY:
return isSetQuery();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof binarySqlQuery_args)
return this.equals((binarySqlQuery_args)that);
return false;
}
public boolean equals(binarySqlQuery_args that) {
if (that == null)
return false;
boolean this_present_tablespace = true && this.isSetTablespace();
boolean that_present_tablespace = true && that.isSetTablespace();
if (this_present_tablespace || that_present_tablespace) {
if (!(this_present_tablespace && that_present_tablespace))
return false;
if (!this.tablespace.equals(that.tablespace))
return false;
}
boolean this_present_version = true;
boolean that_present_version = true;
if (this_present_version || that_present_version) {
if (!(this_present_version && that_present_version))
return false;
if (this.version != that.version)
return false;
}
boolean this_present_partition = true;
boolean that_present_partition = true;
if (this_present_partition || that_present_partition) {
if (!(this_present_partition && that_present_partition))
return false;
if (this.partition != that.partition)
return false;
}
boolean this_present_query = true && this.isSetQuery();
boolean that_present_query = true && that.isSetQuery();
if (this_present_query || that_present_query) {
if (!(this_present_query && that_present_query))
return false;
if (!this.query.equals(that.query))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tablespace = true && (isSetTablespace());
list.add(present_tablespace);
if (present_tablespace)
list.add(tablespace);
boolean present_version = true;
list.add(present_version);
if (present_version)
list.add(version);
boolean present_partition = true;
list.add(present_partition);
if (present_partition)
list.add(partition);
boolean present_query = true && (isSetQuery());
list.add(present_query);
if (present_query)
list.add(query);
return list.hashCode();
}
@Override
public int compareTo(binarySqlQuery_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTablespace()).compareTo(other.isSetTablespace());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTablespace()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablespace, other.tablespace);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetVersion()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPartition()).compareTo(other.isSetPartition());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPartition()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partition, other.partition);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetQuery()).compareTo(other.isSetQuery());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQuery()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query, other.query);
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("binarySqlQuery_args(");
boolean first = true;
sb.append("tablespace:");
if (this.tablespace == null) {
sb.append("null");
} else {
sb.append(this.tablespace);
}
first = false;
if (!first) sb.append(", ");
sb.append("version:");
sb.append(this.version);
first = false;
if (!first) sb.append(", ");
sb.append("partition:");
sb.append(this.partition);
first = false;
if (!first) sb.append(", ");
sb.append("query:");
if (this.query == null) {
sb.append("null");
} else {
sb.append(this.query);
}
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 binarySqlQuery_argsStandardSchemeFactory implements SchemeFactory {
public binarySqlQuery_argsStandardScheme getScheme() {
return new binarySqlQuery_argsStandardScheme();
}
}
private static class binarySqlQuery_argsStandardScheme extends StandardScheme<binarySqlQuery_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, binarySqlQuery_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: // TABLESPACE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tablespace = iprot.readString();
struct.setTablespaceIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // VERSION
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.version = iprot.readI64();
struct.setVersionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // PARTITION
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.partition = iprot.readI32();
struct.setPartitionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // QUERY
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.query = iprot.readString();
struct.setQueryIsSet(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, binarySqlQuery_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tablespace != null) {
oprot.writeFieldBegin(TABLESPACE_FIELD_DESC);
oprot.writeString(struct.tablespace);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(VERSION_FIELD_DESC);
oprot.writeI64(struct.version);
oprot.writeFieldEnd();
oprot.writeFieldBegin(PARTITION_FIELD_DESC);
oprot.writeI32(struct.partition);
oprot.writeFieldEnd();
if (struct.query != null) {
oprot.writeFieldBegin(QUERY_FIELD_DESC);
oprot.writeString(struct.query);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class binarySqlQuery_argsTupleSchemeFactory implements SchemeFactory {
public binarySqlQuery_argsTupleScheme getScheme() {
return new binarySqlQuery_argsTupleScheme();
}
}
private static class binarySqlQuery_argsTupleScheme extends TupleScheme<binarySqlQuery_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, binarySqlQuery_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTablespace()) {
optionals.set(0);
}
if (struct.isSetVersion()) {
optionals.set(1);
}
if (struct.isSetPartition()) {
optionals.set(2);
}
if (struct.isSetQuery()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetTablespace()) {
oprot.writeString(struct.tablespace);
}
if (struct.isSetVersion()) {
oprot.writeI64(struct.version);
}
if (struct.isSetPartition()) {
oprot.writeI32(struct.partition);
}
if (struct.isSetQuery()) {
oprot.writeString(struct.query);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, binarySqlQuery_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.tablespace = iprot.readString();
struct.setTablespaceIsSet(true);
}
if (incoming.get(1)) {
struct.version = iprot.readI64();
struct.setVersionIsSet(true);
}
if (incoming.get(2)) {
struct.partition = iprot.readI32();
struct.setPartitionIsSet(true);
}
if (incoming.get(3)) {
struct.query = iprot.readString();
struct.setQueryIsSet(true);
}
}
}
}
public static class binarySqlQuery_result implements org.apache.thrift.TBase<binarySqlQuery_result, binarySqlQuery_result._Fields>, java.io.Serializable, Cloneable, Comparable<binarySqlQuery_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("binarySqlQuery_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final org.apache.thrift.protocol.TField EXCEP_FIELD_DESC = new org.apache.thrift.protocol.TField("excep", 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 binarySqlQuery_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new binarySqlQuery_resultTupleSchemeFactory());
}
public ByteBuffer success; // required
public DNodeException excep; // 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"),
EXCEP((short)1, "excep");
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: // EXCEP
return EXCEP;
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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.EXCEP, new org.apache.thrift.meta_data.FieldMetaData("excep", 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(binarySqlQuery_result.class, metaDataMap);
}
public binarySqlQuery_result() {
}
public binarySqlQuery_result(
ByteBuffer success,
DNodeException excep)
{
this();
this.success = org.apache.thrift.TBaseHelper.copyBinary(success);
this.excep = excep;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public binarySqlQuery_result(binarySqlQuery_result other) {
if (other.isSetSuccess()) {
this.success = org.apache.thrift.TBaseHelper.copyBinary(other.success);
}
if (other.isSetExcep()) {
this.excep = new DNodeException(other.excep);
}
}
public binarySqlQuery_result deepCopy() {
return new binarySqlQuery_result(this);
}
@Override
public void clear() {
this.success = null;
this.excep = null;
}
public byte[] getSuccess() {
setSuccess(org.apache.thrift.TBaseHelper.rightSize(success));
return success == null ? null : success.array();
}
public ByteBuffer bufferForSuccess() {
return org.apache.thrift.TBaseHelper.copyBinary(success);
}
public binarySqlQuery_result setSuccess(byte[] success) {
this.success = success == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(success, success.length));
return this;
}
public binarySqlQuery_result setSuccess(ByteBuffer success) {
this.success = org.apache.thrift.TBaseHelper.copyBinary(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 DNodeException getExcep() {
return this.excep;
}
public binarySqlQuery_result setExcep(DNodeException excep) {
this.excep = excep;
return this;
}
public void unsetExcep() {
this.excep = null;
}
/** Returns true if field excep is set (has been assigned a value) and false otherwise */
public boolean isSetExcep() {
return this.excep != null;
}
public void setExcepIsSet(boolean value) {
if (!value) {
this.excep = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((ByteBuffer)value);
}
break;
case EXCEP:
if (value == null) {
unsetExcep();
} else {
setExcep((DNodeException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case EXCEP:
return getExcep();
}
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 EXCEP:
return isSetExcep();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof binarySqlQuery_result)
return this.equals((binarySqlQuery_result)that);
return false;
}
public boolean equals(binarySqlQuery_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_excep = true && this.isSetExcep();
boolean that_present_excep = true && that.isSetExcep();
if (this_present_excep || that_present_excep) {
if (!(this_present_excep && that_present_excep))
return false;
if (!this.excep.equals(that.excep))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_excep = true && (isSetExcep());
list.add(present_excep);
if (present_excep)
list.add(excep);
return list.hashCode();
}
@Override
public int compareTo(binarySqlQuery_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetExcep()).compareTo(other.isSetExcep());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExcep()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.excep, other.excep);
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("binarySqlQuery_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.success, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("excep:");
if (this.excep == null) {
sb.append("null");
} else {
sb.append(this.excep);
}
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 binarySqlQuery_resultStandardSchemeFactory implements SchemeFactory {
public binarySqlQuery_resultStandardScheme getScheme() {
return new binarySqlQuery_resultStandardScheme();
}
}
private static class binarySqlQuery_resultStandardScheme extends StandardScheme<binarySqlQuery_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, binarySqlQuery_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.STRING) {
struct.success = iprot.readBinary();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // EXCEP
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.excep = new DNodeException();
struct.excep.read(iprot);
struct.setExcepIsSet(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, binarySqlQuery_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBinary(struct.success);
oprot.writeFieldEnd();
}
if (struct.excep != null) {
oprot.writeFieldBegin(EXCEP_FIELD_DESC);
struct.excep.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class binarySqlQuery_resultTupleSchemeFactory implements SchemeFactory {
public binarySqlQuery_resultTupleScheme getScheme() {
return new binarySqlQuery_resultTupleScheme();
}
}
private static class binarySqlQuery_resultTupleScheme extends TupleScheme<binarySqlQuery_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, binarySqlQuery_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetExcep()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeBinary(struct.success);
}
if (struct.isSetExcep()) {
struct.excep.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, binarySqlQuery_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readBinary();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.excep = new DNodeException();
struct.excep.read(iprot);
struct.setExcepIsSet(true);
}
}
}
}
public static class sqlQuery_args implements org.apache.thrift.TBase<sqlQuery_args, sqlQuery_args._Fields>, java.io.Serializable, Cloneable, Comparable<sqlQuery_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sqlQuery_args");
private static final org.apache.thrift.protocol.TField TABLESPACE_FIELD_DESC = new org.apache.thrift.protocol.TField("tablespace", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField PARTITION_FIELD_DESC = new org.apache.thrift.protocol.TField("partition", org.apache.thrift.protocol.TType.I32, (short)3);
private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new sqlQuery_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new sqlQuery_argsTupleSchemeFactory());
}
public String tablespace; // required
public long version; // required
public int partition; // required
public String query; // 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 {
TABLESPACE((short)1, "tablespace"),
VERSION((short)2, "version"),
PARTITION((short)3, "partition"),
QUERY((short)4, "query");
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: // TABLESPACE
return TABLESPACE;
case 2: // VERSION
return VERSION;
case 3: // PARTITION
return PARTITION;
case 4: // QUERY
return QUERY;
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 __VERSION_ISSET_ID = 0;
private static final int __PARTITION_ISSET_ID = 1;
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.TABLESPACE, new org.apache.thrift.meta_data.FieldMetaData("tablespace", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.PARTITION, new org.apache.thrift.meta_data.FieldMetaData("partition", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.QUERY, new org.apache.thrift.meta_data.FieldMetaData("query", 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(sqlQuery_args.class, metaDataMap);
}
public sqlQuery_args() {
}
public sqlQuery_args(
String tablespace,
long version,
int partition,
String query)
{
this();
this.tablespace = tablespace;
this.version = version;
setVersionIsSet(true);
this.partition = partition;
setPartitionIsSet(true);
this.query = query;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public sqlQuery_args(sqlQuery_args other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetTablespace()) {
this.tablespace = other.tablespace;
}
this.version = other.version;
this.partition = other.partition;
if (other.isSetQuery()) {
this.query = other.query;
}
}
public sqlQuery_args deepCopy() {
return new sqlQuery_args(this);
}
@Override
public void clear() {
this.tablespace = null;
setVersionIsSet(false);
this.version = 0;
setPartitionIsSet(false);
this.partition = 0;
this.query = null;
}
public String getTablespace() {
return this.tablespace;
}
public sqlQuery_args setTablespace(String tablespace) {
this.tablespace = tablespace;
return this;
}
public void unsetTablespace() {
this.tablespace = null;
}
/** Returns true if field tablespace is set (has been assigned a value) and false otherwise */
public boolean isSetTablespace() {
return this.tablespace != null;
}
public void setTablespaceIsSet(boolean value) {
if (!value) {
this.tablespace = null;
}
}
public long getVersion() {
return this.version;
}
public sqlQuery_args setVersion(long version) {
this.version = version;
setVersionIsSet(true);
return this;
}
public void unsetVersion() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID);
}
/** Returns true if field version is set (has been assigned a value) and false otherwise */
public boolean isSetVersion() {
return EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID);
}
public void setVersionIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value);
}
public int getPartition() {
return this.partition;
}
public sqlQuery_args setPartition(int partition) {
this.partition = partition;
setPartitionIsSet(true);
return this;
}
public void unsetPartition() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARTITION_ISSET_ID);
}
/** Returns true if field partition is set (has been assigned a value) and false otherwise */
public boolean isSetPartition() {
return EncodingUtils.testBit(__isset_bitfield, __PARTITION_ISSET_ID);
}
public void setPartitionIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARTITION_ISSET_ID, value);
}
public String getQuery() {
return this.query;
}
public sqlQuery_args setQuery(String query) {
this.query = query;
return this;
}
public void unsetQuery() {
this.query = null;
}
/** Returns true if field query is set (has been assigned a value) and false otherwise */
public boolean isSetQuery() {
return this.query != null;
}
public void setQueryIsSet(boolean value) {
if (!value) {
this.query = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLESPACE:
if (value == null) {
unsetTablespace();
} else {
setTablespace((String)value);
}
break;
case VERSION:
if (value == null) {
unsetVersion();
} else {
setVersion((Long)value);
}
break;
case PARTITION:
if (value == null) {
unsetPartition();
} else {
setPartition((Integer)value);
}
break;
case QUERY:
if (value == null) {
unsetQuery();
} else {
setQuery((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLESPACE:
return getTablespace();
case VERSION:
return Long.valueOf(getVersion());
case PARTITION:
return Integer.valueOf(getPartition());
case QUERY:
return getQuery();
}
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 TABLESPACE:
return isSetTablespace();
case VERSION:
return isSetVersion();
case PARTITION:
return isSetPartition();
case QUERY:
return isSetQuery();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sqlQuery_args)
return this.equals((sqlQuery_args)that);
return false;
}
public boolean equals(sqlQuery_args that) {
if (that == null)
return false;
boolean this_present_tablespace = true && this.isSetTablespace();
boolean that_present_tablespace = true && that.isSetTablespace();
if (this_present_tablespace || that_present_tablespace) {
if (!(this_present_tablespace && that_present_tablespace))
return false;
if (!this.tablespace.equals(that.tablespace))
return false;
}
boolean this_present_version = true;
boolean that_present_version = true;
if (this_present_version || that_present_version) {
if (!(this_present_version && that_present_version))
return false;
if (this.version != that.version)
return false;
}
boolean this_present_partition = true;
boolean that_present_partition = true;
if (this_present_partition || that_present_partition) {
if (!(this_present_partition && that_present_partition))
return false;
if (this.partition != that.partition)
return false;
}
boolean this_present_query = true && this.isSetQuery();
boolean that_present_query = true && that.isSetQuery();
if (this_present_query || that_present_query) {
if (!(this_present_query && that_present_query))
return false;
if (!this.query.equals(that.query))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_tablespace = true && (isSetTablespace());
list.add(present_tablespace);
if (present_tablespace)
list.add(tablespace);
boolean present_version = true;
list.add(present_version);
if (present_version)
list.add(version);
boolean present_partition = true;
list.add(present_partition);
if (present_partition)
list.add(partition);
boolean present_query = true && (isSetQuery());
list.add(present_query);
if (present_query)
list.add(query);
return list.hashCode();
}
@Override
public int compareTo(sqlQuery_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTablespace()).compareTo(other.isSetTablespace());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTablespace()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablespace, other.tablespace);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetVersion()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPartition()).compareTo(other.isSetPartition());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPartition()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partition, other.partition);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetQuery()).compareTo(other.isSetQuery());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQuery()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query, other.query);
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("sqlQuery_args(");
boolean first = true;
sb.append("tablespace:");
if (this.tablespace == null) {
sb.append("null");
} else {
sb.append(this.tablespace);
}
first = false;
if (!first) sb.append(", ");
sb.append("version:");
sb.append(this.version);
first = false;
if (!first) sb.append(", ");
sb.append("partition:");
sb.append(this.partition);
first = false;
if (!first) sb.append(", ");
sb.append("query:");
if (this.query == null) {
sb.append("null");
} else {
sb.append(this.query);
}
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 sqlQuery_argsStandardSchemeFactory implements SchemeFactory {
public sqlQuery_argsStandardScheme getScheme() {
return new sqlQuery_argsStandardScheme();
}
}
private static class sqlQuery_argsStandardScheme extends StandardScheme<sqlQuery_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, sqlQuery_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: // TABLESPACE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tablespace = iprot.readString();
struct.setTablespaceIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // VERSION
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.version = iprot.readI64();
struct.setVersionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // PARTITION
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.partition = iprot.readI32();
struct.setPartitionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // QUERY
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.query = iprot.readString();
struct.setQueryIsSet(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, sqlQuery_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tablespace != null) {
oprot.writeFieldBegin(TABLESPACE_FIELD_DESC);
oprot.writeString(struct.tablespace);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(VERSION_FIELD_DESC);
oprot.writeI64(struct.version);
oprot.writeFieldEnd();
oprot.writeFieldBegin(PARTITION_FIELD_DESC);
oprot.writeI32(struct.partition);
oprot.writeFieldEnd();
if (struct.query != null) {
oprot.writeFieldBegin(QUERY_FIELD_DESC);
oprot.writeString(struct.query);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class sqlQuery_argsTupleSchemeFactory implements SchemeFactory {
public sqlQuery_argsTupleScheme getScheme() {
return new sqlQuery_argsTupleScheme();
}
}
private static class sqlQuery_argsTupleScheme extends TupleScheme<sqlQuery_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, sqlQuery_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTablespace()) {
optionals.set(0);
}
if (struct.isSetVersion()) {
optionals.set(1);
}
if (struct.isSetPartition()) {
optionals.set(2);
}
if (struct.isSetQuery()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetTablespace()) {
oprot.writeString(struct.tablespace);
}
if (struct.isSetVersion()) {
oprot.writeI64(struct.version);
}
if (struct.isSetPartition()) {
oprot.writeI32(struct.partition);
}
if (struct.isSetQuery()) {
oprot.writeString(struct.query);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, sqlQuery_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.tablespace = iprot.readString();
struct.setTablespaceIsSet(true);
}
if (incoming.get(1)) {
struct.version = iprot.readI64();
struct.setVersionIsSet(true);
}
if (incoming.get(2)) {
struct.partition = iprot.readI32();
struct.setPartitionIsSet(true);
}
if (incoming.get(3)) {
struct.query = iprot.readString();
struct.setQueryIsSet(true);
}
}
}
}
public static class sqlQuery_result implements org.apache.thrift.TBase<sqlQuery_result, sqlQuery_result._Fields>, java.io.Serializable, Cloneable, Comparable<sqlQuery_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sqlQuery_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final org.apache.thrift.protocol.TField EXCEP_FIELD_DESC = new org.apache.thrift.protocol.TField("excep", 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 sqlQuery_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new sqlQuery_resultTupleSchemeFactory());
}
public String success; // required
public DNodeException excep; // 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"),
EXCEP((short)1, "excep");
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: // EXCEP
return EXCEP;
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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.EXCEP, new org.apache.thrift.meta_data.FieldMetaData("excep", 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(sqlQuery_result.class, metaDataMap);
}
public sqlQuery_result() {
}
public sqlQuery_result(
String success,
DNodeException excep)
{
this();
this.success = success;
this.excep = excep;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public sqlQuery_result(sqlQuery_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetExcep()) {
this.excep = new DNodeException(other.excep);
}
}
public sqlQuery_result deepCopy() {
return new sqlQuery_result(this);
}
@Override
public void clear() {
this.success = null;
this.excep = null;
}
public String getSuccess() {
return this.success;
}
public sqlQuery_result setSuccess(String 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 DNodeException getExcep() {
return this.excep;
}
public sqlQuery_result setExcep(DNodeException excep) {
this.excep = excep;
return this;
}
public void unsetExcep() {
this.excep = null;
}
/** Returns true if field excep is set (has been assigned a value) and false otherwise */
public boolean isSetExcep() {
return this.excep != null;
}
public void setExcepIsSet(boolean value) {
if (!value) {
this.excep = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((String)value);
}
break;
case EXCEP:
if (value == null) {
unsetExcep();
} else {
setExcep((DNodeException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case EXCEP:
return getExcep();
}
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 EXCEP:
return isSetExcep();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sqlQuery_result)
return this.equals((sqlQuery_result)that);
return false;
}
public boolean equals(sqlQuery_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_excep = true && this.isSetExcep();
boolean that_present_excep = true && that.isSetExcep();
if (this_present_excep || that_present_excep) {
if (!(this_present_excep && that_present_excep))
return false;
if (!this.excep.equals(that.excep))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_excep = true && (isSetExcep());
list.add(present_excep);
if (present_excep)
list.add(excep);
return list.hashCode();
}
@Override
public int compareTo(sqlQuery_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetExcep()).compareTo(other.isSetExcep());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExcep()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.excep, other.excep);
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("sqlQuery_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("excep:");
if (this.excep == null) {
sb.append("null");
} else {
sb.append(this.excep);
}
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 sqlQuery_resultStandardSchemeFactory implements SchemeFactory {
public sqlQuery_resultStandardScheme getScheme() {
return new sqlQuery_resultStandardScheme();
}
}
private static class sqlQuery_resultStandardScheme extends StandardScheme<sqlQuery_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, sqlQuery_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.STRING) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // EXCEP
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.excep = new DNodeException();
struct.excep.read(iprot);
struct.setExcepIsSet(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, sqlQuery_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeString(struct.success);
oprot.writeFieldEnd();
}
if (struct.excep != null) {
oprot.writeFieldBegin(EXCEP_FIELD_DESC);
struct.excep.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class sqlQuery_resultTupleSchemeFactory implements SchemeFactory {
public sqlQuery_resultTupleScheme getScheme() {
return new sqlQuery_resultTupleScheme();
}
}
private static class sqlQuery_resultTupleScheme extends TupleScheme<sqlQuery_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, sqlQuery_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetExcep()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
if (struct.isSetExcep()) {
struct.excep.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, sqlQuery_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.excep = new DNodeException();
struct.excep.read(iprot);
struct.setExcepIsSet(true);
}
}
}
}
public static class deleteOldVersions_args implements org.apache.thrift.TBase<deleteOldVersions_args, deleteOldVersions_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteOldVersions_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteOldVersions_args");
private static final org.apache.thrift.protocol.TField VERSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("versions", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteOldVersions_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteOldVersions_argsTupleSchemeFactory());
}
public List<TablespaceVersion> versions; // 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 {
VERSIONS((short)1, "versions");
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: // VERSIONS
return VERSIONS;
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.VERSIONS, new org.apache.thrift.meta_data.FieldMetaData("versions", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TablespaceVersion.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteOldVersions_args.class, metaDataMap);
}
public deleteOldVersions_args() {
}
public deleteOldVersions_args(
List<TablespaceVersion> versions)
{
this();
this.versions = versions;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteOldVersions_args(deleteOldVersions_args other) {
if (other.isSetVersions()) {
List<TablespaceVersion> __this__versions = new ArrayList<TablespaceVersion>(other.versions.size());
for (TablespaceVersion other_element : other.versions) {
__this__versions.add(new TablespaceVersion(other_element));
}
this.versions = __this__versions;
}
}
public deleteOldVersions_args deepCopy() {
return new deleteOldVersions_args(this);
}
@Override
public void clear() {
this.versions = null;
}
public int getVersionsSize() {
return (this.versions == null) ? 0 : this.versions.size();
}
public java.util.Iterator<TablespaceVersion> getVersionsIterator() {
return (this.versions == null) ? null : this.versions.iterator();
}
public void addToVersions(TablespaceVersion elem) {
if (this.versions == null) {
this.versions = new ArrayList<TablespaceVersion>();
}
this.versions.add(elem);
}
public List<TablespaceVersion> getVersions() {
return this.versions;
}
public deleteOldVersions_args setVersions(List<TablespaceVersion> versions) {
this.versions = versions;
return this;
}
public void unsetVersions() {
this.versions = null;
}
/** Returns true if field versions is set (has been assigned a value) and false otherwise */
public boolean isSetVersions() {
return this.versions != null;
}
public void setVersionsIsSet(boolean value) {
if (!value) {
this.versions = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case VERSIONS:
if (value == null) {
unsetVersions();
} else {
setVersions((List<TablespaceVersion>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case VERSIONS:
return getVersions();
}
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 VERSIONS:
return isSetVersions();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteOldVersions_args)
return this.equals((deleteOldVersions_args)that);
return false;
}
public boolean equals(deleteOldVersions_args that) {
if (that == null)
return false;
boolean this_present_versions = true && this.isSetVersions();
boolean that_present_versions = true && that.isSetVersions();
if (this_present_versions || that_present_versions) {
if (!(this_present_versions && that_present_versions))
return false;
if (!this.versions.equals(that.versions))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_versions = true && (isSetVersions());
list.add(present_versions);
if (present_versions)
list.add(versions);
return list.hashCode();
}
@Override
public int compareTo(deleteOldVersions_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetVersions()).compareTo(other.isSetVersions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetVersions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.versions, other.versions);
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("deleteOldVersions_args(");
boolean first = true;
sb.append("versions:");
if (this.versions == null) {
sb.append("null");
} else {
sb.append(this.versions);
}
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 deleteOldVersions_argsStandardSchemeFactory implements SchemeFactory {
public deleteOldVersions_argsStandardScheme getScheme() {
return new deleteOldVersions_argsStandardScheme();
}
}
private static class deleteOldVersions_argsStandardScheme extends StandardScheme<deleteOldVersions_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteOldVersions_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: // VERSIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
struct.versions = new ArrayList<TablespaceVersion>(_list8.size);
TablespaceVersion _elem9;
for (int _i10 = 0; _i10 < _list8.size; ++_i10)
{
_elem9 = new TablespaceVersion();
_elem9.read(iprot);
struct.versions.add(_elem9);
}
iprot.readListEnd();
}
struct.setVersionsIsSet(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, deleteOldVersions_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.versions != null) {
oprot.writeFieldBegin(VERSIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.versions.size()));
for (TablespaceVersion _iter11 : struct.versions)
{
_iter11.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteOldVersions_argsTupleSchemeFactory implements SchemeFactory {
public deleteOldVersions_argsTupleScheme getScheme() {
return new deleteOldVersions_argsTupleScheme();
}
}
private static class deleteOldVersions_argsTupleScheme extends TupleScheme<deleteOldVersions_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteOldVersions_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetVersions()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetVersions()) {
{
oprot.writeI32(struct.versions.size());
for (TablespaceVersion _iter12 : struct.versions)
{
_iter12.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteOldVersions_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.versions = new ArrayList<TablespaceVersion>(_list13.size);
TablespaceVersion _elem14;
for (int _i15 = 0; _i15 < _list13.size; ++_i15)
{
_elem14 = new TablespaceVersion();
_elem14.read(iprot);
struct.versions.add(_elem14);
}
}
struct.setVersionsIsSet(true);
}
}
}
}
public static class deleteOldVersions_result implements org.apache.thrift.TBase<deleteOldVersions_result, deleteOldVersions_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteOldVersions_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteOldVersions_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final org.apache.thrift.protocol.TField EXCEP_FIELD_DESC = new org.apache.thrift.protocol.TField("excep", 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 deleteOldVersions_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteOldVersions_resultTupleSchemeFactory());
}
public String success; // required
public DNodeException excep; // 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"),
EXCEP((short)1, "excep");
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: // EXCEP
return EXCEP;
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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.EXCEP, new org.apache.thrift.meta_data.FieldMetaData("excep", 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(deleteOldVersions_result.class, metaDataMap);
}
public deleteOldVersions_result() {
}
public deleteOldVersions_result(
String success,
DNodeException excep)
{
this();
this.success = success;
this.excep = excep;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteOldVersions_result(deleteOldVersions_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetExcep()) {
this.excep = new DNodeException(other.excep);
}
}
public deleteOldVersions_result deepCopy() {
return new deleteOldVersions_result(this);
}
@Override
public void clear() {
this.success = null;
this.excep = null;
}
public String getSuccess() {
return this.success;
}
public deleteOldVersions_result setSuccess(String 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 DNodeException getExcep() {
return this.excep;
}
public deleteOldVersions_result setExcep(DNodeException excep) {
this.excep = excep;
return this;
}
public void unsetExcep() {
this.excep = null;
}
/** Returns true if field excep is set (has been assigned a value) and false otherwise */
public boolean isSetExcep() {
return this.excep != null;
}
public void setExcepIsSet(boolean value) {
if (!value) {
this.excep = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((String)value);
}
break;
case EXCEP:
if (value == null) {
unsetExcep();
} else {
setExcep((DNodeException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case EXCEP:
return getExcep();
}
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 EXCEP:
return isSetExcep();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteOldVersions_result)
return this.equals((deleteOldVersions_result)that);
return false;
}
public boolean equals(deleteOldVersions_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_excep = true && this.isSetExcep();
boolean that_present_excep = true && that.isSetExcep();
if (this_present_excep || that_present_excep) {
if (!(this_present_excep && that_present_excep))
return false;
if (!this.excep.equals(that.excep))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_excep = true && (isSetExcep());
list.add(present_excep);
if (present_excep)
list.add(excep);
return list.hashCode();
}
@Override
public int compareTo(deleteOldVersions_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetExcep()).compareTo(other.isSetExcep());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExcep()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.excep, other.excep);
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("deleteOldVersions_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("excep:");
if (this.excep == null) {
sb.append("null");
} else {
sb.append(this.excep);
}
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 deleteOldVersions_resultStandardSchemeFactory implements SchemeFactory {
public deleteOldVersions_resultStandardScheme getScheme() {
return new deleteOldVersions_resultStandardScheme();
}
}
private static class deleteOldVersions_resultStandardScheme extends StandardScheme<deleteOldVersions_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteOldVersions_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.STRING) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // EXCEP
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.excep = new DNodeException();
struct.excep.read(iprot);
struct.setExcepIsSet(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, deleteOldVersions_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeString(struct.success);
oprot.writeFieldEnd();
}
if (struct.excep != null) {
oprot.writeFieldBegin(EXCEP_FIELD_DESC);
struct.excep.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteOldVersions_resultTupleSchemeFactory implements SchemeFactory {
public deleteOldVersions_resultTupleScheme getScheme() {
return new deleteOldVersions_resultTupleScheme();
}
}
private static class deleteOldVersions_resultTupleScheme extends TupleScheme<deleteOldVersions_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteOldVersions_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetExcep()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
if (struct.isSetExcep()) {
struct.excep.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteOldVersions_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.excep = new DNodeException();
struct.excep.read(iprot);
struct.setExcepIsSet(true);
}
}
}
}
public static class deploy_args implements org.apache.thrift.TBase<deploy_args, deploy_args._Fields>, java.io.Serializable, Cloneable, Comparable<deploy_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deploy_args");
private static final org.apache.thrift.protocol.TField DEPLOY_ACTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("deployActions", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.I64, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deploy_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new deploy_argsTupleSchemeFactory());
}
public List<DeployAction> deployActions; // required
public long version; // 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 {
DEPLOY_ACTIONS((short)1, "deployActions"),
VERSION((short)2, "version");
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: // DEPLOY_ACTIONS
return DEPLOY_ACTIONS;
case 2: // VERSION
return VERSION;
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 __VERSION_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.DEPLOY_ACTIONS, new org.apache.thrift.meta_data.FieldMetaData("deployActions", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DeployAction.class))));
tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deploy_args.class, metaDataMap);
}
public deploy_args() {
}
public deploy_args(
List<DeployAction> deployActions,
long version)
{
this();
this.deployActions = deployActions;
this.version = version;
setVersionIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deploy_args(deploy_args other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetDeployActions()) {
List<DeployAction> __this__deployActions = new ArrayList<DeployAction>(other.deployActions.size());
for (DeployAction other_element : other.deployActions) {
__this__deployActions.add(new DeployAction(other_element));
}
this.deployActions = __this__deployActions;
}
this.version = other.version;
}
public deploy_args deepCopy() {
return new deploy_args(this);
}
@Override
public void clear() {
this.deployActions = null;
setVersionIsSet(false);
this.version = 0;
}
public int getDeployActionsSize() {
return (this.deployActions == null) ? 0 : this.deployActions.size();
}
public java.util.Iterator<DeployAction> getDeployActionsIterator() {
return (this.deployActions == null) ? null : this.deployActions.iterator();
}
public void addToDeployActions(DeployAction elem) {
if (this.deployActions == null) {
this.deployActions = new ArrayList<DeployAction>();
}
this.deployActions.add(elem);
}
public List<DeployAction> getDeployActions() {
return this.deployActions;
}
public deploy_args setDeployActions(List<DeployAction> deployActions) {
this.deployActions = deployActions;
return this;
}
public void unsetDeployActions() {
this.deployActions = null;
}
/** Returns true if field deployActions is set (has been assigned a value) and false otherwise */
public boolean isSetDeployActions() {
return this.deployActions != null;
}
public void setDeployActionsIsSet(boolean value) {
if (!value) {
this.deployActions = null;
}
}
public long getVersion() {
return this.version;
}
public deploy_args setVersion(long version) {
this.version = version;
setVersionIsSet(true);
return this;
}
public void unsetVersion() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID);
}
/** Returns true if field version is set (has been assigned a value) and false otherwise */
public boolean isSetVersion() {
return EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID);
}
public void setVersionIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case DEPLOY_ACTIONS:
if (value == null) {
unsetDeployActions();
} else {
setDeployActions((List<DeployAction>)value);
}
break;
case VERSION:
if (value == null) {
unsetVersion();
} else {
setVersion((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case DEPLOY_ACTIONS:
return getDeployActions();
case VERSION:
return Long.valueOf(getVersion());
}
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 DEPLOY_ACTIONS:
return isSetDeployActions();
case VERSION:
return isSetVersion();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deploy_args)
return this.equals((deploy_args)that);
return false;
}
public boolean equals(deploy_args that) {
if (that == null)
return false;
boolean this_present_deployActions = true && this.isSetDeployActions();
boolean that_present_deployActions = true && that.isSetDeployActions();
if (this_present_deployActions || that_present_deployActions) {
if (!(this_present_deployActions && that_present_deployActions))
return false;
if (!this.deployActions.equals(that.deployActions))
return false;
}
boolean this_present_version = true;
boolean that_present_version = true;
if (this_present_version || that_present_version) {
if (!(this_present_version && that_present_version))
return false;
if (this.version != that.version)
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_deployActions = true && (isSetDeployActions());
list.add(present_deployActions);
if (present_deployActions)
list.add(deployActions);
boolean present_version = true;
list.add(present_version);
if (present_version)
list.add(version);
return list.hashCode();
}
@Override
public int compareTo(deploy_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetDeployActions()).compareTo(other.isSetDeployActions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDeployActions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deployActions, other.deployActions);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetVersion()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version);
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("deploy_args(");
boolean first = true;
sb.append("deployActions:");
if (this.deployActions == null) {
sb.append("null");
} else {
sb.append(this.deployActions);
}
first = false;
if (!first) sb.append(", ");
sb.append("version:");
sb.append(this.version);
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 deploy_argsStandardSchemeFactory implements SchemeFactory {
public deploy_argsStandardScheme getScheme() {
return new deploy_argsStandardScheme();
}
}
private static class deploy_argsStandardScheme extends StandardScheme<deploy_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deploy_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: // DEPLOY_ACTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
struct.deployActions = new ArrayList<DeployAction>(_list16.size);
DeployAction _elem17;
for (int _i18 = 0; _i18 < _list16.size; ++_i18)
{
_elem17 = new DeployAction();
_elem17.read(iprot);
struct.deployActions.add(_elem17);
}
iprot.readListEnd();
}
struct.setDeployActionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // VERSION
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.version = iprot.readI64();
struct.setVersionIsSet(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, deploy_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.deployActions != null) {
oprot.writeFieldBegin(DEPLOY_ACTIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.deployActions.size()));
for (DeployAction _iter19 : struct.deployActions)
{
_iter19.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(VERSION_FIELD_DESC);
oprot.writeI64(struct.version);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deploy_argsTupleSchemeFactory implements SchemeFactory {
public deploy_argsTupleScheme getScheme() {
return new deploy_argsTupleScheme();
}
}
private static class deploy_argsTupleScheme extends TupleScheme<deploy_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deploy_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetDeployActions()) {
optionals.set(0);
}
if (struct.isSetVersion()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetDeployActions()) {
{
oprot.writeI32(struct.deployActions.size());
for (DeployAction _iter20 : struct.deployActions)
{
_iter20.write(oprot);
}
}
}
if (struct.isSetVersion()) {
oprot.writeI64(struct.version);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deploy_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.deployActions = new ArrayList<DeployAction>(_list21.size);
DeployAction _elem22;
for (int _i23 = 0; _i23 < _list21.size; ++_i23)
{
_elem22 = new DeployAction();
_elem22.read(iprot);
struct.deployActions.add(_elem22);
}
}
struct.setDeployActionsIsSet(true);
}
if (incoming.get(1)) {
struct.version = iprot.readI64();
struct.setVersionIsSet(true);
}
}
}
}
public static class deploy_result implements org.apache.thrift.TBase<deploy_result, deploy_result._Fields>, java.io.Serializable, Cloneable, Comparable<deploy_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deploy_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final org.apache.thrift.protocol.TField EXCEP_FIELD_DESC = new org.apache.thrift.protocol.TField("excep", 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 deploy_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new deploy_resultTupleSchemeFactory());
}
public String success; // required
public DNodeException excep; // 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"),
EXCEP((short)1, "excep");
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: // EXCEP
return EXCEP;
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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.EXCEP, new org.apache.thrift.meta_data.FieldMetaData("excep", 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(deploy_result.class, metaDataMap);
}
public deploy_result() {
}
public deploy_result(
String success,
DNodeException excep)
{
this();
this.success = success;
this.excep = excep;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deploy_result(deploy_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetExcep()) {
this.excep = new DNodeException(other.excep);
}
}
public deploy_result deepCopy() {
return new deploy_result(this);
}
@Override
public void clear() {
this.success = null;
this.excep = null;
}
public String getSuccess() {
return this.success;
}
public deploy_result setSuccess(String 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 DNodeException getExcep() {
return this.excep;
}
public deploy_result setExcep(DNodeException excep) {
this.excep = excep;
return this;
}
public void unsetExcep() {
this.excep = null;
}
/** Returns true if field excep is set (has been assigned a value) and false otherwise */
public boolean isSetExcep() {
return this.excep != null;
}
public void setExcepIsSet(boolean value) {
if (!value) {
this.excep = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((String)value);
}
break;
case EXCEP:
if (value == null) {
unsetExcep();
} else {
setExcep((DNodeException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case EXCEP:
return getExcep();
}
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 EXCEP:
return isSetExcep();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deploy_result)
return this.equals((deploy_result)that);
return false;
}
public boolean equals(deploy_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_excep = true && this.isSetExcep();
boolean that_present_excep = true && that.isSetExcep();
if (this_present_excep || that_present_excep) {
if (!(this_present_excep && that_present_excep))
return false;
if (!this.excep.equals(that.excep))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_excep = true && (isSetExcep());
list.add(present_excep);
if (present_excep)
list.add(excep);
return list.hashCode();
}
@Override
public int compareTo(deploy_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetExcep()).compareTo(other.isSetExcep());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExcep()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.excep, other.excep);
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("deploy_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("excep:");
if (this.excep == null) {
sb.append("null");
} else {
sb.append(this.excep);
}
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 deploy_resultStandardSchemeFactory implements SchemeFactory {
public deploy_resultStandardScheme getScheme() {
return new deploy_resultStandardScheme();
}
}
private static class deploy_resultStandardScheme extends StandardScheme<deploy_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deploy_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.STRING) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // EXCEP
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.excep = new DNodeException();
struct.excep.read(iprot);
struct.setExcepIsSet(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, deploy_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeString(struct.success);
oprot.writeFieldEnd();
}
if (struct.excep != null) {
oprot.writeFieldBegin(EXCEP_FIELD_DESC);
struct.excep.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deploy_resultTupleSchemeFactory implements SchemeFactory {
public deploy_resultTupleScheme getScheme() {
return new deploy_resultTupleScheme();
}
}
private static class deploy_resultTupleScheme extends TupleScheme<deploy_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deploy_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetExcep()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
if (struct.isSetExcep()) {
struct.excep.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deploy_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.excep = new DNodeException();
struct.excep.read(iprot);
struct.setExcepIsSet(true);
}
}
}
}
public static class rollback_args implements org.apache.thrift.TBase<rollback_args, rollback_args._Fields>, java.io.Serializable, Cloneable, Comparable<rollback_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rollback_args");
private static final org.apache.thrift.protocol.TField ROLLBACK_ACTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("rollbackActions", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField DISTRIBUTED_BARRIER_FIELD_DESC = new org.apache.thrift.protocol.TField("distributedBarrier", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new rollback_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new rollback_argsTupleSchemeFactory());
}
public List<RollbackAction> rollbackActions; // required
public String distributedBarrier; // 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 {
ROLLBACK_ACTIONS((short)1, "rollbackActions"),
DISTRIBUTED_BARRIER((short)2, "distributedBarrier");
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: // ROLLBACK_ACTIONS
return ROLLBACK_ACTIONS;
case 2: // DISTRIBUTED_BARRIER
return DISTRIBUTED_BARRIER;
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.ROLLBACK_ACTIONS, new org.apache.thrift.meta_data.FieldMetaData("rollbackActions", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RollbackAction.class))));
tmpMap.put(_Fields.DISTRIBUTED_BARRIER, new org.apache.thrift.meta_data.FieldMetaData("distributedBarrier", 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(rollback_args.class, metaDataMap);
}
public rollback_args() {
}
public rollback_args(
List<RollbackAction> rollbackActions,
String distributedBarrier)
{
this();
this.rollbackActions = rollbackActions;
this.distributedBarrier = distributedBarrier;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public rollback_args(rollback_args other) {
if (other.isSetRollbackActions()) {
List<RollbackAction> __this__rollbackActions = new ArrayList<RollbackAction>(other.rollbackActions.size());
for (RollbackAction other_element : other.rollbackActions) {
__this__rollbackActions.add(new RollbackAction(other_element));
}
this.rollbackActions = __this__rollbackActions;
}
if (other.isSetDistributedBarrier()) {
this.distributedBarrier = other.distributedBarrier;
}
}
public rollback_args deepCopy() {
return new rollback_args(this);
}
@Override
public void clear() {
this.rollbackActions = null;
this.distributedBarrier = null;
}
public int getRollbackActionsSize() {
return (this.rollbackActions == null) ? 0 : this.rollbackActions.size();
}
public java.util.Iterator<RollbackAction> getRollbackActionsIterator() {
return (this.rollbackActions == null) ? null : this.rollbackActions.iterator();
}
public void addToRollbackActions(RollbackAction elem) {
if (this.rollbackActions == null) {
this.rollbackActions = new ArrayList<RollbackAction>();
}
this.rollbackActions.add(elem);
}
public List<RollbackAction> getRollbackActions() {
return this.rollbackActions;
}
public rollback_args setRollbackActions(List<RollbackAction> rollbackActions) {
this.rollbackActions = rollbackActions;
return this;
}
public void unsetRollbackActions() {
this.rollbackActions = null;
}
/** Returns true if field rollbackActions is set (has been assigned a value) and false otherwise */
public boolean isSetRollbackActions() {
return this.rollbackActions != null;
}
public void setRollbackActionsIsSet(boolean value) {
if (!value) {
this.rollbackActions = null;
}
}
public String getDistributedBarrier() {
return this.distributedBarrier;
}
public rollback_args setDistributedBarrier(String distributedBarrier) {
this.distributedBarrier = distributedBarrier;
return this;
}
public void unsetDistributedBarrier() {
this.distributedBarrier = null;
}
/** Returns true if field distributedBarrier is set (has been assigned a value) and false otherwise */
public boolean isSetDistributedBarrier() {
return this.distributedBarrier != null;
}
public void setDistributedBarrierIsSet(boolean value) {
if (!value) {
this.distributedBarrier = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ROLLBACK_ACTIONS:
if (value == null) {
unsetRollbackActions();
} else {
setRollbackActions((List<RollbackAction>)value);
}
break;
case DISTRIBUTED_BARRIER:
if (value == null) {
unsetDistributedBarrier();
} else {
setDistributedBarrier((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case ROLLBACK_ACTIONS:
return getRollbackActions();
case DISTRIBUTED_BARRIER:
return getDistributedBarrier();
}
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 ROLLBACK_ACTIONS:
return isSetRollbackActions();
case DISTRIBUTED_BARRIER:
return isSetDistributedBarrier();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof rollback_args)
return this.equals((rollback_args)that);
return false;
}
public boolean equals(rollback_args that) {
if (that == null)
return false;
boolean this_present_rollbackActions = true && this.isSetRollbackActions();
boolean that_present_rollbackActions = true && that.isSetRollbackActions();
if (this_present_rollbackActions || that_present_rollbackActions) {
if (!(this_present_rollbackActions && that_present_rollbackActions))
return false;
if (!this.rollbackActions.equals(that.rollbackActions))
return false;
}
boolean this_present_distributedBarrier = true && this.isSetDistributedBarrier();
boolean that_present_distributedBarrier = true && that.isSetDistributedBarrier();
if (this_present_distributedBarrier || that_present_distributedBarrier) {
if (!(this_present_distributedBarrier && that_present_distributedBarrier))
return false;
if (!this.distributedBarrier.equals(that.distributedBarrier))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_rollbackActions = true && (isSetRollbackActions());
list.add(present_rollbackActions);
if (present_rollbackActions)
list.add(rollbackActions);
boolean present_distributedBarrier = true && (isSetDistributedBarrier());
list.add(present_distributedBarrier);
if (present_distributedBarrier)
list.add(distributedBarrier);
return list.hashCode();
}
@Override
public int compareTo(rollback_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetRollbackActions()).compareTo(other.isSetRollbackActions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRollbackActions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rollbackActions, other.rollbackActions);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetDistributedBarrier()).compareTo(other.isSetDistributedBarrier());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDistributedBarrier()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.distributedBarrier, other.distributedBarrier);
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("rollback_args(");
boolean first = true;
sb.append("rollbackActions:");
if (this.rollbackActions == null) {
sb.append("null");
} else {
sb.append(this.rollbackActions);
}
first = false;
if (!first) sb.append(", ");
sb.append("distributedBarrier:");
if (this.distributedBarrier == null) {
sb.append("null");
} else {
sb.append(this.distributedBarrier);
}
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 rollback_argsStandardSchemeFactory implements SchemeFactory {
public rollback_argsStandardScheme getScheme() {
return new rollback_argsStandardScheme();
}
}
private static class rollback_argsStandardScheme extends StandardScheme<rollback_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, rollback_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: // ROLLBACK_ACTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
struct.rollbackActions = new ArrayList<RollbackAction>(_list24.size);
RollbackAction _elem25;
for (int _i26 = 0; _i26 < _list24.size; ++_i26)
{
_elem25 = new RollbackAction();
_elem25.read(iprot);
struct.rollbackActions.add(_elem25);
}
iprot.readListEnd();
}
struct.setRollbackActionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // DISTRIBUTED_BARRIER
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.distributedBarrier = iprot.readString();
struct.setDistributedBarrierIsSet(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, rollback_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.rollbackActions != null) {
oprot.writeFieldBegin(ROLLBACK_ACTIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.rollbackActions.size()));
for (RollbackAction _iter27 : struct.rollbackActions)
{
_iter27.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.distributedBarrier != null) {
oprot.writeFieldBegin(DISTRIBUTED_BARRIER_FIELD_DESC);
oprot.writeString(struct.distributedBarrier);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class rollback_argsTupleSchemeFactory implements SchemeFactory {
public rollback_argsTupleScheme getScheme() {
return new rollback_argsTupleScheme();
}
}
private static class rollback_argsTupleScheme extends TupleScheme<rollback_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, rollback_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetRollbackActions()) {
optionals.set(0);
}
if (struct.isSetDistributedBarrier()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetRollbackActions()) {
{
oprot.writeI32(struct.rollbackActions.size());
for (RollbackAction _iter28 : struct.rollbackActions)
{
_iter28.write(oprot);
}
}
}
if (struct.isSetDistributedBarrier()) {
oprot.writeString(struct.distributedBarrier);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, rollback_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.rollbackActions = new ArrayList<RollbackAction>(_list29.size);
RollbackAction _elem30;
for (int _i31 = 0; _i31 < _list29.size; ++_i31)
{
_elem30 = new RollbackAction();
_elem30.read(iprot);
struct.rollbackActions.add(_elem30);
}
}
struct.setRollbackActionsIsSet(true);
}
if (incoming.get(1)) {
struct.distributedBarrier = iprot.readString();
struct.setDistributedBarrierIsSet(true);
}
}
}
}
public static class rollback_result implements org.apache.thrift.TBase<rollback_result, rollback_result._Fields>, java.io.Serializable, Cloneable, Comparable<rollback_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rollback_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final org.apache.thrift.protocol.TField EXCEP_FIELD_DESC = new org.apache.thrift.protocol.TField("excep", 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 rollback_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new rollback_resultTupleSchemeFactory());
}
public String success; // required
public DNodeException excep; // 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"),
EXCEP((short)1, "excep");
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: // EXCEP
return EXCEP;
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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.EXCEP, new org.apache.thrift.meta_data.FieldMetaData("excep", 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(rollback_result.class, metaDataMap);
}
public rollback_result() {
}
public rollback_result(
String success,
DNodeException excep)
{
this();
this.success = success;
this.excep = excep;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public rollback_result(rollback_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetExcep()) {
this.excep = new DNodeException(other.excep);
}
}
public rollback_result deepCopy() {
return new rollback_result(this);
}
@Override
public void clear() {
this.success = null;
this.excep = null;
}
public String getSuccess() {
return this.success;
}
public rollback_result setSuccess(String 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 DNodeException getExcep() {
return this.excep;
}
public rollback_result setExcep(DNodeException excep) {
this.excep = excep;
return this;
}
public void unsetExcep() {
this.excep = null;
}
/** Returns true if field excep is set (has been assigned a value) and false otherwise */
public boolean isSetExcep() {
return this.excep != null;
}
public void setExcepIsSet(boolean value) {
if (!value) {
this.excep = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((String)value);
}
break;
case EXCEP:
if (value == null) {
unsetExcep();
} else {
setExcep((DNodeException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case EXCEP:
return getExcep();
}
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 EXCEP:
return isSetExcep();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof rollback_result)
return this.equals((rollback_result)that);
return false;
}
public boolean equals(rollback_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_excep = true && this.isSetExcep();
boolean that_present_excep = true && that.isSetExcep();
if (this_present_excep || that_present_excep) {
if (!(this_present_excep && that_present_excep))
return false;
if (!this.excep.equals(that.excep))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_excep = true && (isSetExcep());
list.add(present_excep);
if (present_excep)
list.add(excep);
return list.hashCode();
}
@Override
public int compareTo(rollback_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetExcep()).compareTo(other.isSetExcep());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExcep()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.excep, other.excep);
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("rollback_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("excep:");
if (this.excep == null) {
sb.append("null");
} else {
sb.append(this.excep);
}
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 rollback_resultStandardSchemeFactory implements SchemeFactory {
public rollback_resultStandardScheme getScheme() {
return new rollback_resultStandardScheme();
}
}
private static class rollback_resultStandardScheme extends StandardScheme<rollback_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, rollback_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.STRING) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // EXCEP
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.excep = new DNodeException();
struct.excep.read(iprot);
struct.setExcepIsSet(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, rollback_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeString(struct.success);
oprot.writeFieldEnd();
}
if (struct.excep != null) {
oprot.writeFieldBegin(EXCEP_FIELD_DESC);
struct.excep.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class rollback_resultTupleSchemeFactory implements SchemeFactory {
public rollback_resultTupleScheme getScheme() {
return new rollback_resultTupleScheme();
}
}
private static class rollback_resultTupleScheme extends TupleScheme<rollback_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, rollback_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetExcep()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
if (struct.isSetExcep()) {
struct.excep.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, rollback_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.excep = new DNodeException();
struct.excep.read(iprot);
struct.setExcepIsSet(true);
}
}
}
}
public static class status_args implements org.apache.thrift.TBase<status_args, status_args._Fields>, java.io.Serializable, Cloneable, Comparable<status_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("status_args");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new status_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new status_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(status_args.class, metaDataMap);
}
public status_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public status_args(status_args other) {
}
public status_args deepCopy() {
return new status_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 status_args)
return this.equals((status_args)that);
return false;
}
public boolean equals(status_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
return list.hashCode();
}
@Override
public int compareTo(status_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
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("status_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 status_argsStandardSchemeFactory implements SchemeFactory {
public status_argsStandardScheme getScheme() {
return new status_argsStandardScheme();
}
}
private static class status_argsStandardScheme extends StandardScheme<status_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, status_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, status_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class status_argsTupleSchemeFactory implements SchemeFactory {
public status_argsTupleScheme getScheme() {
return new status_argsTupleScheme();
}
}
private static class status_argsTupleScheme extends TupleScheme<status_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, status_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, status_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class status_result implements org.apache.thrift.TBase<status_result, status_result._Fields>, java.io.Serializable, Cloneable, Comparable<status_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("status_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final org.apache.thrift.protocol.TField EXCEP_FIELD_DESC = new org.apache.thrift.protocol.TField("excep", 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 status_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new status_resultTupleSchemeFactory());
}
public String success; // required
public DNodeException excep; // 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"),
EXCEP((short)1, "excep");
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: // EXCEP
return EXCEP;
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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.EXCEP, new org.apache.thrift.meta_data.FieldMetaData("excep", 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(status_result.class, metaDataMap);
}
public status_result() {
}
public status_result(
String success,
DNodeException excep)
{
this();
this.success = success;
this.excep = excep;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public status_result(status_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetExcep()) {
this.excep = new DNodeException(other.excep);
}
}
public status_result deepCopy() {
return new status_result(this);
}
@Override
public void clear() {
this.success = null;
this.excep = null;
}
public String getSuccess() {
return this.success;
}
public status_result setSuccess(String 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 DNodeException getExcep() {
return this.excep;
}
public status_result setExcep(DNodeException excep) {
this.excep = excep;
return this;
}
public void unsetExcep() {
this.excep = null;
}
/** Returns true if field excep is set (has been assigned a value) and false otherwise */
public boolean isSetExcep() {
return this.excep != null;
}
public void setExcepIsSet(boolean value) {
if (!value) {
this.excep = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((String)value);
}
break;
case EXCEP:
if (value == null) {
unsetExcep();
} else {
setExcep((DNodeException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case EXCEP:
return getExcep();
}
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 EXCEP:
return isSetExcep();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof status_result)
return this.equals((status_result)that);
return false;
}
public boolean equals(status_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_excep = true && this.isSetExcep();
boolean that_present_excep = true && that.isSetExcep();
if (this_present_excep || that_present_excep) {
if (!(this_present_excep && that_present_excep))
return false;
if (!this.excep.equals(that.excep))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_excep = true && (isSetExcep());
list.add(present_excep);
if (present_excep)
list.add(excep);
return list.hashCode();
}
@Override
public int compareTo(status_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetExcep()).compareTo(other.isSetExcep());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExcep()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.excep, other.excep);
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("status_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("excep:");
if (this.excep == null) {
sb.append("null");
} else {
sb.append(this.excep);
}
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 status_resultStandardSchemeFactory implements SchemeFactory {
public status_resultStandardScheme getScheme() {
return new status_resultStandardScheme();
}
}
private static class status_resultStandardScheme extends StandardScheme<status_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, status_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.STRING) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // EXCEP
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.excep = new DNodeException();
struct.excep.read(iprot);
struct.setExcepIsSet(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, status_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeString(struct.success);
oprot.writeFieldEnd();
}
if (struct.excep != null) {
oprot.writeFieldBegin(EXCEP_FIELD_DESC);
struct.excep.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class status_resultTupleSchemeFactory implements SchemeFactory {
public status_resultTupleScheme getScheme() {
return new status_resultTupleScheme();
}
}
private static class status_resultTupleScheme extends TupleScheme<status_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, status_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetExcep()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
if (struct.isSetExcep()) {
struct.excep.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, status_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.excep = new DNodeException();
struct.excep.read(iprot);
struct.setExcepIsSet(true);
}
}
}
}
public static class abortDeploy_args implements org.apache.thrift.TBase<abortDeploy_args, abortDeploy_args._Fields>, java.io.Serializable, Cloneable, Comparable<abortDeploy_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abortDeploy_args");
private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.I64, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new abortDeploy_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new abortDeploy_argsTupleSchemeFactory());
}
public long version; // 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 {
VERSION((short)1, "version");
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: // VERSION
return VERSION;
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 __VERSION_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.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(abortDeploy_args.class, metaDataMap);
}
public abortDeploy_args() {
}
public abortDeploy_args(
long version)
{
this();
this.version = version;
setVersionIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public abortDeploy_args(abortDeploy_args other) {
__isset_bitfield = other.__isset_bitfield;
this.version = other.version;
}
public abortDeploy_args deepCopy() {
return new abortDeploy_args(this);
}
@Override
public void clear() {
setVersionIsSet(false);
this.version = 0;
}
public long getVersion() {
return this.version;
}
public abortDeploy_args setVersion(long version) {
this.version = version;
setVersionIsSet(true);
return this;
}
public void unsetVersion() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID);
}
/** Returns true if field version is set (has been assigned a value) and false otherwise */
public boolean isSetVersion() {
return EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID);
}
public void setVersionIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case VERSION:
if (value == null) {
unsetVersion();
} else {
setVersion((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case VERSION:
return Long.valueOf(getVersion());
}
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 VERSION:
return isSetVersion();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof abortDeploy_args)
return this.equals((abortDeploy_args)that);
return false;
}
public boolean equals(abortDeploy_args that) {
if (that == null)
return false;
boolean this_present_version = true;
boolean that_present_version = true;
if (this_present_version || that_present_version) {
if (!(this_present_version && that_present_version))
return false;
if (this.version != that.version)
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_version = true;
list.add(present_version);
if (present_version)
list.add(version);
return list.hashCode();
}
@Override
public int compareTo(abortDeploy_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetVersion()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version);
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("abortDeploy_args(");
boolean first = true;
sb.append("version:");
sb.append(this.version);
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 abortDeploy_argsStandardSchemeFactory implements SchemeFactory {
public abortDeploy_argsStandardScheme getScheme() {
return new abortDeploy_argsStandardScheme();
}
}
private static class abortDeploy_argsStandardScheme extends StandardScheme<abortDeploy_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, abortDeploy_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: // VERSION
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.version = iprot.readI64();
struct.setVersionIsSet(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, abortDeploy_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(VERSION_FIELD_DESC);
oprot.writeI64(struct.version);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class abortDeploy_argsTupleSchemeFactory implements SchemeFactory {
public abortDeploy_argsTupleScheme getScheme() {
return new abortDeploy_argsTupleScheme();
}
}
private static class abortDeploy_argsTupleScheme extends TupleScheme<abortDeploy_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, abortDeploy_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetVersion()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetVersion()) {
oprot.writeI64(struct.version);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, abortDeploy_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.version = iprot.readI64();
struct.setVersionIsSet(true);
}
}
}
}
public static class abortDeploy_result implements org.apache.thrift.TBase<abortDeploy_result, abortDeploy_result._Fields>, java.io.Serializable, Cloneable, Comparable<abortDeploy_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abortDeploy_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final org.apache.thrift.protocol.TField EXCEP_FIELD_DESC = new org.apache.thrift.protocol.TField("excep", 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 abortDeploy_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new abortDeploy_resultTupleSchemeFactory());
}
public String success; // required
public DNodeException excep; // 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"),
EXCEP((short)1, "excep");
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: // EXCEP
return EXCEP;
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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.EXCEP, new org.apache.thrift.meta_data.FieldMetaData("excep", 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(abortDeploy_result.class, metaDataMap);
}
public abortDeploy_result() {
}
public abortDeploy_result(
String success,
DNodeException excep)
{
this();
this.success = success;
this.excep = excep;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public abortDeploy_result(abortDeploy_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetExcep()) {
this.excep = new DNodeException(other.excep);
}
}
public abortDeploy_result deepCopy() {
return new abortDeploy_result(this);
}
@Override
public void clear() {
this.success = null;
this.excep = null;
}
public String getSuccess() {
return this.success;
}
public abortDeploy_result setSuccess(String 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 DNodeException getExcep() {
return this.excep;
}
public abortDeploy_result setExcep(DNodeException excep) {
this.excep = excep;
return this;
}
public void unsetExcep() {
this.excep = null;
}
/** Returns true if field excep is set (has been assigned a value) and false otherwise */
public boolean isSetExcep() {
return this.excep != null;
}
public void setExcepIsSet(boolean value) {
if (!value) {
this.excep = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((String)value);
}
break;
case EXCEP:
if (value == null) {
unsetExcep();
} else {
setExcep((DNodeException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case EXCEP:
return getExcep();
}
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 EXCEP:
return isSetExcep();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof abortDeploy_result)
return this.equals((abortDeploy_result)that);
return false;
}
public boolean equals(abortDeploy_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_excep = true && this.isSetExcep();
boolean that_present_excep = true && that.isSetExcep();
if (this_present_excep || that_present_excep) {
if (!(this_present_excep && that_present_excep))
return false;
if (!this.excep.equals(that.excep))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_excep = true && (isSetExcep());
list.add(present_excep);
if (present_excep)
list.add(excep);
return list.hashCode();
}
@Override
public int compareTo(abortDeploy_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetExcep()).compareTo(other.isSetExcep());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExcep()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.excep, other.excep);
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("abortDeploy_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("excep:");
if (this.excep == null) {
sb.append("null");
} else {
sb.append(this.excep);
}
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 abortDeploy_resultStandardSchemeFactory implements SchemeFactory {
public abortDeploy_resultStandardScheme getScheme() {
return new abortDeploy_resultStandardScheme();
}
}
private static class abortDeploy_resultStandardScheme extends StandardScheme<abortDeploy_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, abortDeploy_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.STRING) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // EXCEP
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.excep = new DNodeException();
struct.excep.read(iprot);
struct.setExcepIsSet(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, abortDeploy_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeString(struct.success);
oprot.writeFieldEnd();
}
if (struct.excep != null) {
oprot.writeFieldBegin(EXCEP_FIELD_DESC);
struct.excep.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class abortDeploy_resultTupleSchemeFactory implements SchemeFactory {
public abortDeploy_resultTupleScheme getScheme() {
return new abortDeploy_resultTupleScheme();
}
}
private static class abortDeploy_resultTupleScheme extends TupleScheme<abortDeploy_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, abortDeploy_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetExcep()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
if (struct.isSetExcep()) {
struct.excep.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, abortDeploy_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.excep = new DNodeException();
struct.excep.read(iprot);
struct.setExcepIsSet(true);
}
}
}
}
public static class testCommand_args implements org.apache.thrift.TBase<testCommand_args, testCommand_args._Fields>, java.io.Serializable, Cloneable, Comparable<testCommand_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testCommand_args");
private static final org.apache.thrift.protocol.TField COMMAND_FIELD_DESC = new org.apache.thrift.protocol.TField("command", 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 testCommand_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new testCommand_argsTupleSchemeFactory());
}
public String command; // 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 {
COMMAND((short)1, "command");
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: // COMMAND
return COMMAND;
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.COMMAND, new org.apache.thrift.meta_data.FieldMetaData("command", 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(testCommand_args.class, metaDataMap);
}
public testCommand_args() {
}
public testCommand_args(
String command)
{
this();
this.command = command;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public testCommand_args(testCommand_args other) {
if (other.isSetCommand()) {
this.command = other.command;
}
}
public testCommand_args deepCopy() {
return new testCommand_args(this);
}
@Override
public void clear() {
this.command = null;
}
public String getCommand() {
return this.command;
}
public testCommand_args setCommand(String command) {
this.command = command;
return this;
}
public void unsetCommand() {
this.command = null;
}
/** Returns true if field command is set (has been assigned a value) and false otherwise */
public boolean isSetCommand() {
return this.command != null;
}
public void setCommandIsSet(boolean value) {
if (!value) {
this.command = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case COMMAND:
if (value == null) {
unsetCommand();
} else {
setCommand((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case COMMAND:
return getCommand();
}
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 COMMAND:
return isSetCommand();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof testCommand_args)
return this.equals((testCommand_args)that);
return false;
}
public boolean equals(testCommand_args that) {
if (that == null)
return false;
boolean this_present_command = true && this.isSetCommand();
boolean that_present_command = true && that.isSetCommand();
if (this_present_command || that_present_command) {
if (!(this_present_command && that_present_command))
return false;
if (!this.command.equals(that.command))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_command = true && (isSetCommand());
list.add(present_command);
if (present_command)
list.add(command);
return list.hashCode();
}
@Override
public int compareTo(testCommand_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetCommand()).compareTo(other.isSetCommand());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCommand()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.command, other.command);
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("testCommand_args(");
boolean first = true;
sb.append("command:");
if (this.command == null) {
sb.append("null");
} else {
sb.append(this.command);
}
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 testCommand_argsStandardSchemeFactory implements SchemeFactory {
public testCommand_argsStandardScheme getScheme() {
return new testCommand_argsStandardScheme();
}
}
private static class testCommand_argsStandardScheme extends StandardScheme<testCommand_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, testCommand_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: // COMMAND
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.command = iprot.readString();
struct.setCommandIsSet(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, testCommand_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.command != null) {
oprot.writeFieldBegin(COMMAND_FIELD_DESC);
oprot.writeString(struct.command);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class testCommand_argsTupleSchemeFactory implements SchemeFactory {
public testCommand_argsTupleScheme getScheme() {
return new testCommand_argsTupleScheme();
}
}
private static class testCommand_argsTupleScheme extends TupleScheme<testCommand_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, testCommand_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetCommand()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetCommand()) {
oprot.writeString(struct.command);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, testCommand_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.command = iprot.readString();
struct.setCommandIsSet(true);
}
}
}
}
public static class testCommand_result implements org.apache.thrift.TBase<testCommand_result, testCommand_result._Fields>, java.io.Serializable, Cloneable, Comparable<testCommand_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("testCommand_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final org.apache.thrift.protocol.TField EXCEP_FIELD_DESC = new org.apache.thrift.protocol.TField("excep", 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 testCommand_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new testCommand_resultTupleSchemeFactory());
}
public String success; // required
public DNodeException excep; // 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"),
EXCEP((short)1, "excep");
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: // EXCEP
return EXCEP;
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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.EXCEP, new org.apache.thrift.meta_data.FieldMetaData("excep", 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(testCommand_result.class, metaDataMap);
}
public testCommand_result() {
}
public testCommand_result(
String success,
DNodeException excep)
{
this();
this.success = success;
this.excep = excep;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public testCommand_result(testCommand_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetExcep()) {
this.excep = new DNodeException(other.excep);
}
}
public testCommand_result deepCopy() {
return new testCommand_result(this);
}
@Override
public void clear() {
this.success = null;
this.excep = null;
}
public String getSuccess() {
return this.success;
}
public testCommand_result setSuccess(String 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 DNodeException getExcep() {
return this.excep;
}
public testCommand_result setExcep(DNodeException excep) {
this.excep = excep;
return this;
}
public void unsetExcep() {
this.excep = null;
}
/** Returns true if field excep is set (has been assigned a value) and false otherwise */
public boolean isSetExcep() {
return this.excep != null;
}
public void setExcepIsSet(boolean value) {
if (!value) {
this.excep = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((String)value);
}
break;
case EXCEP:
if (value == null) {
unsetExcep();
} else {
setExcep((DNodeException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case EXCEP:
return getExcep();
}
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 EXCEP:
return isSetExcep();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof testCommand_result)
return this.equals((testCommand_result)that);
return false;
}
public boolean equals(testCommand_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_excep = true && this.isSetExcep();
boolean that_present_excep = true && that.isSetExcep();
if (this_present_excep || that_present_excep) {
if (!(this_present_excep && that_present_excep))
return false;
if (!this.excep.equals(that.excep))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_excep = true && (isSetExcep());
list.add(present_excep);
if (present_excep)
list.add(excep);
return list.hashCode();
}
@Override
public int compareTo(testCommand_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetExcep()).compareTo(other.isSetExcep());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExcep()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.excep, other.excep);
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("testCommand_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("excep:");
if (this.excep == null) {
sb.append("null");
} else {
sb.append(this.excep);
}
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 testCommand_resultStandardSchemeFactory implements SchemeFactory {
public testCommand_resultStandardScheme getScheme() {
return new testCommand_resultStandardScheme();
}
}
private static class testCommand_resultStandardScheme extends StandardScheme<testCommand_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, testCommand_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.STRING) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // EXCEP
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.excep = new DNodeException();
struct.excep.read(iprot);
struct.setExcepIsSet(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, testCommand_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeString(struct.success);
oprot.writeFieldEnd();
}
if (struct.excep != null) {
oprot.writeFieldBegin(EXCEP_FIELD_DESC);
struct.excep.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class testCommand_resultTupleSchemeFactory implements SchemeFactory {
public testCommand_resultTupleScheme getScheme() {
return new testCommand_resultTupleScheme();
}
}
private static class testCommand_resultTupleScheme extends TupleScheme<testCommand_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, testCommand_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetExcep()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
if (struct.isSetExcep()) {
struct.excep.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, testCommand_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.excep = new DNodeException();
struct.excep.read(iprot);
struct.setExcepIsSet(true);
}
}
}
}
}