DossService.java

/**
 * Autogenerated by Thrift Compiler (0.9.1)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package doss.net;

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 org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class DossService {

  public interface Iface {

    public StatResponse stat(long blobId) throws RemoteNoSuchBlobException, RemoteIOException, org.apache.thrift.TException;

    public StatResponse statLegacy(String legacyPath) throws RemoteNoSuchBlobException, RemoteIOException, org.apache.thrift.TException;

    public String digest(long blobId, String algorithm) throws RemoteNoSuchBlobException, RemoteIOException, org.apache.thrift.TException;

    public ByteBuffer read(long blobId, long offset, int length) throws RemoteNoSuchBlobException, RemoteIOException, org.apache.thrift.TException;

    public List<String> verify(long blobId) throws RemoteNoSuchBlobException, RemoteIOException, org.apache.thrift.TException;

    public long beginTx() throws org.apache.thrift.TException;

    public void commitTx(long txId) throws org.apache.thrift.TException;

    public void rollbackTx(long txId) throws org.apache.thrift.TException;

    public void prepareTx(long txId) throws org.apache.thrift.TException;

    public long beginPut(long txId) throws org.apache.thrift.TException;

    public void write(long handle, ByteBuffer data) throws org.apache.thrift.TException;

    public long finishPut(long handle) throws org.apache.thrift.TException;

  }

  public interface AsyncIface {

    public void stat(long blobId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void statLegacy(String legacyPath, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void digest(long blobId, String algorithm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void read(long blobId, long offset, int length, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void verify(long blobId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void beginTx(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void commitTx(long txId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void rollbackTx(long txId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void prepareTx(long txId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void beginPut(long txId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void write(long handle, ByteBuffer data, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void finishPut(long handle, 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 StatResponse stat(long blobId) throws RemoteNoSuchBlobException, RemoteIOException, org.apache.thrift.TException
    {
      send_stat(blobId);
      return recv_stat();
    }

    public void send_stat(long blobId) throws org.apache.thrift.TException
    {
      stat_args args = new stat_args();
      args.setBlobId(blobId);
      sendBase("stat", args);
    }

    public StatResponse recv_stat() throws RemoteNoSuchBlobException, RemoteIOException, org.apache.thrift.TException
    {
      stat_result result = new stat_result();
      receiveBase(result, "stat");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.noSuchBlobException != null) {
        throw result.noSuchBlobException;
      }
      if (result.ioException != null) {
        throw result.ioException;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "stat failed: unknown result");
    }

    public StatResponse statLegacy(String legacyPath) throws RemoteNoSuchBlobException, RemoteIOException, org.apache.thrift.TException
    {
      send_statLegacy(legacyPath);
      return recv_statLegacy();
    }

    public void send_statLegacy(String legacyPath) throws org.apache.thrift.TException
    {
      statLegacy_args args = new statLegacy_args();
      args.setLegacyPath(legacyPath);
      sendBase("statLegacy", args);
    }

    public StatResponse recv_statLegacy() throws RemoteNoSuchBlobException, RemoteIOException, org.apache.thrift.TException
    {
      statLegacy_result result = new statLegacy_result();
      receiveBase(result, "statLegacy");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.noSuchBlobException != null) {
        throw result.noSuchBlobException;
      }
      if (result.ioException != null) {
        throw result.ioException;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "statLegacy failed: unknown result");
    }

    public String digest(long blobId, String algorithm) throws RemoteNoSuchBlobException, RemoteIOException, org.apache.thrift.TException
    {
      send_digest(blobId, algorithm);
      return recv_digest();
    }

    public void send_digest(long blobId, String algorithm) throws org.apache.thrift.TException
    {
      digest_args args = new digest_args();
      args.setBlobId(blobId);
      args.setAlgorithm(algorithm);
      sendBase("digest", args);
    }

    public String recv_digest() throws RemoteNoSuchBlobException, RemoteIOException, org.apache.thrift.TException
    {
      digest_result result = new digest_result();
      receiveBase(result, "digest");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.noSuchBlobException != null) {
        throw result.noSuchBlobException;
      }
      if (result.ioException != null) {
        throw result.ioException;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "digest failed: unknown result");
    }

    public ByteBuffer read(long blobId, long offset, int length) throws RemoteNoSuchBlobException, RemoteIOException, org.apache.thrift.TException
    {
      send_read(blobId, offset, length);
      return recv_read();
    }

    public void send_read(long blobId, long offset, int length) throws org.apache.thrift.TException
    {
      read_args args = new read_args();
      args.setBlobId(blobId);
      args.setOffset(offset);
      args.setLength(length);
      sendBase("read", args);
    }

    public ByteBuffer recv_read() throws RemoteNoSuchBlobException, RemoteIOException, org.apache.thrift.TException
    {
      read_result result = new read_result();
      receiveBase(result, "read");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.noSuchBlobException != null) {
        throw result.noSuchBlobException;
      }
      if (result.ioException != null) {
        throw result.ioException;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "read failed: unknown result");
    }

    public List<String> verify(long blobId) throws RemoteNoSuchBlobException, RemoteIOException, org.apache.thrift.TException
    {
      send_verify(blobId);
      return recv_verify();
    }

    public void send_verify(long blobId) throws org.apache.thrift.TException
    {
      verify_args args = new verify_args();
      args.setBlobId(blobId);
      sendBase("verify", args);
    }

    public List<String> recv_verify() throws RemoteNoSuchBlobException, RemoteIOException, org.apache.thrift.TException
    {
      verify_result result = new verify_result();
      receiveBase(result, "verify");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.noSuchBlobException != null) {
        throw result.noSuchBlobException;
      }
      if (result.ioException != null) {
        throw result.ioException;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "verify failed: unknown result");
    }

    public long beginTx() throws org.apache.thrift.TException
    {
      send_beginTx();
      return recv_beginTx();
    }

    public void send_beginTx() throws org.apache.thrift.TException
    {
      beginTx_args args = new beginTx_args();
      sendBase("beginTx", args);
    }

    public long recv_beginTx() throws org.apache.thrift.TException
    {
      beginTx_result result = new beginTx_result();
      receiveBase(result, "beginTx");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "beginTx failed: unknown result");
    }

    public void commitTx(long txId) throws org.apache.thrift.TException
    {
      send_commitTx(txId);
      recv_commitTx();
    }

    public void send_commitTx(long txId) throws org.apache.thrift.TException
    {
      commitTx_args args = new commitTx_args();
      args.setTxId(txId);
      sendBase("commitTx", args);
    }

    public void recv_commitTx() throws org.apache.thrift.TException
    {
      commitTx_result result = new commitTx_result();
      receiveBase(result, "commitTx");
      return;
    }

    public void rollbackTx(long txId) throws org.apache.thrift.TException
    {
      send_rollbackTx(txId);
      recv_rollbackTx();
    }

    public void send_rollbackTx(long txId) throws org.apache.thrift.TException
    {
      rollbackTx_args args = new rollbackTx_args();
      args.setTxId(txId);
      sendBase("rollbackTx", args);
    }

    public void recv_rollbackTx() throws org.apache.thrift.TException
    {
      rollbackTx_result result = new rollbackTx_result();
      receiveBase(result, "rollbackTx");
      return;
    }

    public void prepareTx(long txId) throws org.apache.thrift.TException
    {
      send_prepareTx(txId);
      recv_prepareTx();
    }

    public void send_prepareTx(long txId) throws org.apache.thrift.TException
    {
      prepareTx_args args = new prepareTx_args();
      args.setTxId(txId);
      sendBase("prepareTx", args);
    }

    public void recv_prepareTx() throws org.apache.thrift.TException
    {
      prepareTx_result result = new prepareTx_result();
      receiveBase(result, "prepareTx");
      return;
    }

    public long beginPut(long txId) throws org.apache.thrift.TException
    {
      send_beginPut(txId);
      return recv_beginPut();
    }

    public void send_beginPut(long txId) throws org.apache.thrift.TException
    {
      beginPut_args args = new beginPut_args();
      args.setTxId(txId);
      sendBase("beginPut", args);
    }

    public long recv_beginPut() throws org.apache.thrift.TException
    {
      beginPut_result result = new beginPut_result();
      receiveBase(result, "beginPut");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "beginPut failed: unknown result");
    }

    public void write(long handle, ByteBuffer data) throws org.apache.thrift.TException
    {
      send_write(handle, data);
      recv_write();
    }

    public void send_write(long handle, ByteBuffer data) throws org.apache.thrift.TException
    {
      write_args args = new write_args();
      args.setHandle(handle);
      args.setData(data);
      sendBase("write", args);
    }

    public void recv_write() throws org.apache.thrift.TException
    {
      write_result result = new write_result();
      receiveBase(result, "write");
      return;
    }

    public long finishPut(long handle) throws org.apache.thrift.TException
    {
      send_finishPut(handle);
      return recv_finishPut();
    }

    public void send_finishPut(long handle) throws org.apache.thrift.TException
    {
      finishPut_args args = new finishPut_args();
      args.setHandle(handle);
      sendBase("finishPut", args);
    }

    public long recv_finishPut() throws org.apache.thrift.TException
    {
      finishPut_result result = new finishPut_result();
      receiveBase(result, "finishPut");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "finishPut 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 stat(long blobId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      stat_call method_call = new stat_call(blobId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class stat_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long blobId;
      public stat_call(long blobId, 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.blobId = blobId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("stat", org.apache.thrift.protocol.TMessageType.CALL, 0));
        stat_args args = new stat_args();
        args.setBlobId(blobId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public StatResponse getResult() throws RemoteNoSuchBlobException, RemoteIOException, 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_stat();
      }
    }

    public void statLegacy(String legacyPath, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      statLegacy_call method_call = new statLegacy_call(legacyPath, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class statLegacy_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String legacyPath;
      public statLegacy_call(String legacyPath, 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.legacyPath = legacyPath;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("statLegacy", org.apache.thrift.protocol.TMessageType.CALL, 0));
        statLegacy_args args = new statLegacy_args();
        args.setLegacyPath(legacyPath);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public StatResponse getResult() throws RemoteNoSuchBlobException, RemoteIOException, 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_statLegacy();
      }
    }

    public void digest(long blobId, String algorithm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      digest_call method_call = new digest_call(blobId, algorithm, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class digest_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long blobId;
      private String algorithm;
      public digest_call(long blobId, String algorithm, 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.blobId = blobId;
        this.algorithm = algorithm;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("digest", org.apache.thrift.protocol.TMessageType.CALL, 0));
        digest_args args = new digest_args();
        args.setBlobId(blobId);
        args.setAlgorithm(algorithm);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws RemoteNoSuchBlobException, RemoteIOException, 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_digest();
      }
    }

    public void read(long blobId, long offset, int length, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      read_call method_call = new read_call(blobId, offset, length, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class read_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long blobId;
      private long offset;
      private int length;
      public read_call(long blobId, long offset, int length, 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.blobId = blobId;
        this.offset = offset;
        this.length = length;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("read", org.apache.thrift.protocol.TMessageType.CALL, 0));
        read_args args = new read_args();
        args.setBlobId(blobId);
        args.setOffset(offset);
        args.setLength(length);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ByteBuffer getResult() throws RemoteNoSuchBlobException, RemoteIOException, 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_read();
      }
    }

    public void verify(long blobId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      verify_call method_call = new verify_call(blobId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class verify_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long blobId;
      public verify_call(long blobId, 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.blobId = blobId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("verify", org.apache.thrift.protocol.TMessageType.CALL, 0));
        verify_args args = new verify_args();
        args.setBlobId(blobId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<String> getResult() throws RemoteNoSuchBlobException, RemoteIOException, 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_verify();
      }
    }

    public void beginTx(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      beginTx_call method_call = new beginTx_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class beginTx_call extends org.apache.thrift.async.TAsyncMethodCall {
      public beginTx_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("beginTx", org.apache.thrift.protocol.TMessageType.CALL, 0));
        beginTx_args args = new beginTx_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public long getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_beginTx();
      }
    }

    public void commitTx(long txId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      commitTx_call method_call = new commitTx_call(txId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class commitTx_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long txId;
      public commitTx_call(long txId, 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.txId = txId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("commitTx", org.apache.thrift.protocol.TMessageType.CALL, 0));
        commitTx_args args = new commitTx_args();
        args.setTxId(txId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_commitTx();
      }
    }

    public void rollbackTx(long txId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      rollbackTx_call method_call = new rollbackTx_call(txId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class rollbackTx_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long txId;
      public rollbackTx_call(long txId, 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.txId = txId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("rollbackTx", org.apache.thrift.protocol.TMessageType.CALL, 0));
        rollbackTx_args args = new rollbackTx_args();
        args.setTxId(txId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_rollbackTx();
      }
    }

    public void prepareTx(long txId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      prepareTx_call method_call = new prepareTx_call(txId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class prepareTx_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long txId;
      public prepareTx_call(long txId, 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.txId = txId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("prepareTx", org.apache.thrift.protocol.TMessageType.CALL, 0));
        prepareTx_args args = new prepareTx_args();
        args.setTxId(txId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_prepareTx();
      }
    }

    public void beginPut(long txId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      beginPut_call method_call = new beginPut_call(txId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class beginPut_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long txId;
      public beginPut_call(long txId, 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.txId = txId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("beginPut", org.apache.thrift.protocol.TMessageType.CALL, 0));
        beginPut_args args = new beginPut_args();
        args.setTxId(txId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public long getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_beginPut();
      }
    }

    public void write(long handle, ByteBuffer data, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      write_call method_call = new write_call(handle, data, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class write_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long handle;
      private ByteBuffer data;
      public write_call(long handle, ByteBuffer data, 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.handle = handle;
        this.data = data;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("write", org.apache.thrift.protocol.TMessageType.CALL, 0));
        write_args args = new write_args();
        args.setHandle(handle);
        args.setData(data);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_write();
      }
    }

    public void finishPut(long handle, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      finishPut_call method_call = new finishPut_call(handle, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class finishPut_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long handle;
      public finishPut_call(long handle, 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.handle = handle;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("finishPut", org.apache.thrift.protocol.TMessageType.CALL, 0));
        finishPut_args args = new finishPut_args();
        args.setHandle(handle);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public long getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_finishPut();
      }
    }

  }

  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("stat", new stat());
      processMap.put("statLegacy", new statLegacy());
      processMap.put("digest", new digest());
      processMap.put("read", new read());
      processMap.put("verify", new verify());
      processMap.put("beginTx", new beginTx());
      processMap.put("commitTx", new commitTx());
      processMap.put("rollbackTx", new rollbackTx());
      processMap.put("prepareTx", new prepareTx());
      processMap.put("beginPut", new beginPut());
      processMap.put("write", new write());
      processMap.put("finishPut", new finishPut());
      return processMap;
    }

    public static class stat<I extends Iface> extends org.apache.thrift.ProcessFunction<I, stat_args> {
      public stat() {
        super("stat");
      }

      public stat_args getEmptyArgsInstance() {
        return new stat_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public stat_result getResult(I iface, stat_args args) throws org.apache.thrift.TException {
        stat_result result = new stat_result();
        try {
          result.success = iface.stat(args.blobId);
        } catch (RemoteNoSuchBlobException noSuchBlobException) {
          result.noSuchBlobException = noSuchBlobException;
        } catch (RemoteIOException ioException) {
          result.ioException = ioException;
        }
        return result;
      }
    }

    public static class statLegacy<I extends Iface> extends org.apache.thrift.ProcessFunction<I, statLegacy_args> {
      public statLegacy() {
        super("statLegacy");
      }

      public statLegacy_args getEmptyArgsInstance() {
        return new statLegacy_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public statLegacy_result getResult(I iface, statLegacy_args args) throws org.apache.thrift.TException {
        statLegacy_result result = new statLegacy_result();
        try {
          result.success = iface.statLegacy(args.legacyPath);
        } catch (RemoteNoSuchBlobException noSuchBlobException) {
          result.noSuchBlobException = noSuchBlobException;
        } catch (RemoteIOException ioException) {
          result.ioException = ioException;
        }
        return result;
      }
    }

    public static class digest<I extends Iface> extends org.apache.thrift.ProcessFunction<I, digest_args> {
      public digest() {
        super("digest");
      }

      public digest_args getEmptyArgsInstance() {
        return new digest_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public digest_result getResult(I iface, digest_args args) throws org.apache.thrift.TException {
        digest_result result = new digest_result();
        try {
          result.success = iface.digest(args.blobId, args.algorithm);
        } catch (RemoteNoSuchBlobException noSuchBlobException) {
          result.noSuchBlobException = noSuchBlobException;
        } catch (RemoteIOException ioException) {
          result.ioException = ioException;
        }
        return result;
      }
    }

    public static class read<I extends Iface> extends org.apache.thrift.ProcessFunction<I, read_args> {
      public read() {
        super("read");
      }

      public read_args getEmptyArgsInstance() {
        return new read_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public read_result getResult(I iface, read_args args) throws org.apache.thrift.TException {
        read_result result = new read_result();
        try {
          result.success = iface.read(args.blobId, args.offset, args.length);
        } catch (RemoteNoSuchBlobException noSuchBlobException) {
          result.noSuchBlobException = noSuchBlobException;
        } catch (RemoteIOException ioException) {
          result.ioException = ioException;
        }
        return result;
      }
    }

    public static class verify<I extends Iface> extends org.apache.thrift.ProcessFunction<I, verify_args> {
      public verify() {
        super("verify");
      }

      public verify_args getEmptyArgsInstance() {
        return new verify_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public verify_result getResult(I iface, verify_args args) throws org.apache.thrift.TException {
        verify_result result = new verify_result();
        try {
          result.success = iface.verify(args.blobId);
        } catch (RemoteNoSuchBlobException noSuchBlobException) {
          result.noSuchBlobException = noSuchBlobException;
        } catch (RemoteIOException ioException) {
          result.ioException = ioException;
        }
        return result;
      }
    }

    public static class beginTx<I extends Iface> extends org.apache.thrift.ProcessFunction<I, beginTx_args> {
      public beginTx() {
        super("beginTx");
      }

      public beginTx_args getEmptyArgsInstance() {
        return new beginTx_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public beginTx_result getResult(I iface, beginTx_args args) throws org.apache.thrift.TException {
        beginTx_result result = new beginTx_result();
        result.success = iface.beginTx();
        result.setSuccessIsSet(true);
        return result;
      }
    }

    public static class commitTx<I extends Iface> extends org.apache.thrift.ProcessFunction<I, commitTx_args> {
      public commitTx() {
        super("commitTx");
      }

      public commitTx_args getEmptyArgsInstance() {
        return new commitTx_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public commitTx_result getResult(I iface, commitTx_args args) throws org.apache.thrift.TException {
        commitTx_result result = new commitTx_result();
        iface.commitTx(args.txId);
        return result;
      }
    }

    public static class rollbackTx<I extends Iface> extends org.apache.thrift.ProcessFunction<I, rollbackTx_args> {
      public rollbackTx() {
        super("rollbackTx");
      }

      public rollbackTx_args getEmptyArgsInstance() {
        return new rollbackTx_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public rollbackTx_result getResult(I iface, rollbackTx_args args) throws org.apache.thrift.TException {
        rollbackTx_result result = new rollbackTx_result();
        iface.rollbackTx(args.txId);
        return result;
      }
    }

    public static class prepareTx<I extends Iface> extends org.apache.thrift.ProcessFunction<I, prepareTx_args> {
      public prepareTx() {
        super("prepareTx");
      }

      public prepareTx_args getEmptyArgsInstance() {
        return new prepareTx_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public prepareTx_result getResult(I iface, prepareTx_args args) throws org.apache.thrift.TException {
        prepareTx_result result = new prepareTx_result();
        iface.prepareTx(args.txId);
        return result;
      }
    }

    public static class beginPut<I extends Iface> extends org.apache.thrift.ProcessFunction<I, beginPut_args> {
      public beginPut() {
        super("beginPut");
      }

      public beginPut_args getEmptyArgsInstance() {
        return new beginPut_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public beginPut_result getResult(I iface, beginPut_args args) throws org.apache.thrift.TException {
        beginPut_result result = new beginPut_result();
        result.success = iface.beginPut(args.txId);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    public static class write<I extends Iface> extends org.apache.thrift.ProcessFunction<I, write_args> {
      public write() {
        super("write");
      }

      public write_args getEmptyArgsInstance() {
        return new write_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public write_result getResult(I iface, write_args args) throws org.apache.thrift.TException {
        write_result result = new write_result();
        iface.write(args.handle, args.data);
        return result;
      }
    }

    public static class finishPut<I extends Iface> extends org.apache.thrift.ProcessFunction<I, finishPut_args> {
      public finishPut() {
        super("finishPut");
      }

      public finishPut_args getEmptyArgsInstance() {
        return new finishPut_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public finishPut_result getResult(I iface, finishPut_args args) throws org.apache.thrift.TException {
        finishPut_result result = new finishPut_result();
        result.success = iface.finishPut(args.handle);
        result.setSuccessIsSet(true);
        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("stat", new stat());
      processMap.put("statLegacy", new statLegacy());
      processMap.put("digest", new digest());
      processMap.put("read", new read());
      processMap.put("verify", new verify());
      processMap.put("beginTx", new beginTx());
      processMap.put("commitTx", new commitTx());
      processMap.put("rollbackTx", new rollbackTx());
      processMap.put("prepareTx", new prepareTx());
      processMap.put("beginPut", new beginPut());
      processMap.put("write", new write());
      processMap.put("finishPut", new finishPut());
      return processMap;
    }

    public static class stat<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, stat_args, StatResponse> {
      public stat() {
        super("stat");
      }

      public stat_args getEmptyArgsInstance() {
        return new stat_args();
      }

      public AsyncMethodCallback<StatResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<StatResponse>() { 
          public void onComplete(StatResponse o) {
            stat_result result = new stat_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;
            stat_result result = new stat_result();
            if (e instanceof RemoteNoSuchBlobException) {
                        result.noSuchBlobException = (RemoteNoSuchBlobException) e;
                        result.setNoSuchBlobExceptionIsSet(true);
                        msg = result;
            }
            else             if (e instanceof RemoteIOException) {
                        result.ioException = (RemoteIOException) e;
                        result.setIoExceptionIsSet(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, stat_args args, org.apache.thrift.async.AsyncMethodCallback<StatResponse> resultHandler) throws TException {
        iface.stat(args.blobId,resultHandler);
      }
    }

    public static class statLegacy<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, statLegacy_args, StatResponse> {
      public statLegacy() {
        super("statLegacy");
      }

      public statLegacy_args getEmptyArgsInstance() {
        return new statLegacy_args();
      }

      public AsyncMethodCallback<StatResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<StatResponse>() { 
          public void onComplete(StatResponse o) {
            statLegacy_result result = new statLegacy_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;
            statLegacy_result result = new statLegacy_result();
            if (e instanceof RemoteNoSuchBlobException) {
                        result.noSuchBlobException = (RemoteNoSuchBlobException) e;
                        result.setNoSuchBlobExceptionIsSet(true);
                        msg = result;
            }
            else             if (e instanceof RemoteIOException) {
                        result.ioException = (RemoteIOException) e;
                        result.setIoExceptionIsSet(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, statLegacy_args args, org.apache.thrift.async.AsyncMethodCallback<StatResponse> resultHandler) throws TException {
        iface.statLegacy(args.legacyPath,resultHandler);
      }
    }

    public static class digest<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, digest_args, String> {
      public digest() {
        super("digest");
      }

      public digest_args getEmptyArgsInstance() {
        return new digest_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) {
            digest_result result = new digest_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;
            digest_result result = new digest_result();
            if (e instanceof RemoteNoSuchBlobException) {
                        result.noSuchBlobException = (RemoteNoSuchBlobException) e;
                        result.setNoSuchBlobExceptionIsSet(true);
                        msg = result;
            }
            else             if (e instanceof RemoteIOException) {
                        result.ioException = (RemoteIOException) e;
                        result.setIoExceptionIsSet(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, digest_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
        iface.digest(args.blobId, args.algorithm,resultHandler);
      }
    }

    public static class read<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, read_args, ByteBuffer> {
      public read() {
        super("read");
      }

      public read_args getEmptyArgsInstance() {
        return new read_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) {
            read_result result = new read_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;
            read_result result = new read_result();
            if (e instanceof RemoteNoSuchBlobException) {
                        result.noSuchBlobException = (RemoteNoSuchBlobException) e;
                        result.setNoSuchBlobExceptionIsSet(true);
                        msg = result;
            }
            else             if (e instanceof RemoteIOException) {
                        result.ioException = (RemoteIOException) e;
                        result.setIoExceptionIsSet(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, read_args args, org.apache.thrift.async.AsyncMethodCallback<ByteBuffer> resultHandler) throws TException {
        iface.read(args.blobId, args.offset, args.length,resultHandler);
      }
    }

    public static class verify<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, verify_args, List<String>> {
      public verify() {
        super("verify");
      }

      public verify_args getEmptyArgsInstance() {
        return new verify_args();
      }

      public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<List<String>>() { 
          public void onComplete(List<String> o) {
            verify_result result = new verify_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;
            verify_result result = new verify_result();
            if (e instanceof RemoteNoSuchBlobException) {
                        result.noSuchBlobException = (RemoteNoSuchBlobException) e;
                        result.setNoSuchBlobExceptionIsSet(true);
                        msg = result;
            }
            else             if (e instanceof RemoteIOException) {
                        result.ioException = (RemoteIOException) e;
                        result.setIoExceptionIsSet(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, verify_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException {
        iface.verify(args.blobId,resultHandler);
      }
    }

    public static class beginTx<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, beginTx_args, Long> {
      public beginTx() {
        super("beginTx");
      }

      public beginTx_args getEmptyArgsInstance() {
        return new beginTx_args();
      }

      public AsyncMethodCallback<Long> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Long>() { 
          public void onComplete(Long o) {
            beginTx_result result = new beginTx_result();
            result.success = o;
            result.setSuccessIsSet(true);
            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;
            beginTx_result result = new beginTx_result();
            {
              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, beginTx_args args, org.apache.thrift.async.AsyncMethodCallback<Long> resultHandler) throws TException {
        iface.beginTx(resultHandler);
      }
    }

    public static class commitTx<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, commitTx_args, Void> {
      public commitTx() {
        super("commitTx");
      }

      public commitTx_args getEmptyArgsInstance() {
        return new commitTx_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            commitTx_result result = new commitTx_result();
            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;
            commitTx_result result = new commitTx_result();
            {
              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, commitTx_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.commitTx(args.txId,resultHandler);
      }
    }

    public static class rollbackTx<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, rollbackTx_args, Void> {
      public rollbackTx() {
        super("rollbackTx");
      }

      public rollbackTx_args getEmptyArgsInstance() {
        return new rollbackTx_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            rollbackTx_result result = new rollbackTx_result();
            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;
            rollbackTx_result result = new rollbackTx_result();
            {
              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, rollbackTx_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.rollbackTx(args.txId,resultHandler);
      }
    }

    public static class prepareTx<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, prepareTx_args, Void> {
      public prepareTx() {
        super("prepareTx");
      }

      public prepareTx_args getEmptyArgsInstance() {
        return new prepareTx_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            prepareTx_result result = new prepareTx_result();
            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;
            prepareTx_result result = new prepareTx_result();
            {
              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, prepareTx_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.prepareTx(args.txId,resultHandler);
      }
    }

    public static class beginPut<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, beginPut_args, Long> {
      public beginPut() {
        super("beginPut");
      }

      public beginPut_args getEmptyArgsInstance() {
        return new beginPut_args();
      }

      public AsyncMethodCallback<Long> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Long>() { 
          public void onComplete(Long o) {
            beginPut_result result = new beginPut_result();
            result.success = o;
            result.setSuccessIsSet(true);
            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;
            beginPut_result result = new beginPut_result();
            {
              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, beginPut_args args, org.apache.thrift.async.AsyncMethodCallback<Long> resultHandler) throws TException {
        iface.beginPut(args.txId,resultHandler);
      }
    }

    public static class write<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, write_args, Void> {
      public write() {
        super("write");
      }

      public write_args getEmptyArgsInstance() {
        return new write_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            write_result result = new write_result();
            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;
            write_result result = new write_result();
            {
              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, write_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.write(args.handle, args.data,resultHandler);
      }
    }

    public static class finishPut<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, finishPut_args, Long> {
      public finishPut() {
        super("finishPut");
      }

      public finishPut_args getEmptyArgsInstance() {
        return new finishPut_args();
      }

      public AsyncMethodCallback<Long> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Long>() { 
          public void onComplete(Long o) {
            finishPut_result result = new finishPut_result();
            result.success = o;
            result.setSuccessIsSet(true);
            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;
            finishPut_result result = new finishPut_result();
            {
              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, finishPut_args args, org.apache.thrift.async.AsyncMethodCallback<Long> resultHandler) throws TException {
        iface.finishPut(args.handle,resultHandler);
      }
    }

  }

  public static class stat_args implements org.apache.thrift.TBase<stat_args, stat_args._Fields>, java.io.Serializable, Cloneable, Comparable<stat_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("stat_args");

    private static final org.apache.thrift.protocol.TField BLOB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blobId", 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 stat_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new stat_argsTupleSchemeFactory());
    }

    public long blobId; // 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 {
      BLOB_ID((short)1, "blobId");

      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: // BLOB_ID
            return BLOB_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __BLOBID_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.BLOB_ID, new org.apache.thrift.meta_data.FieldMetaData("blobId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "BlobId")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stat_args.class, metaDataMap);
    }

    public stat_args() {
    }

    public stat_args(
      long blobId)
    {
      this();
      this.blobId = blobId;
      setBlobIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public stat_args(stat_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.blobId = other.blobId;
    }

    public stat_args deepCopy() {
      return new stat_args(this);
    }

    @Override
    public void clear() {
      setBlobIdIsSet(false);
      this.blobId = 0;
    }

    public long getBlobId() {
      return this.blobId;
    }

    public stat_args setBlobId(long blobId) {
      this.blobId = blobId;
      setBlobIdIsSet(true);
      return this;
    }

    public void unsetBlobId() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOBID_ISSET_ID);
    }

    /** Returns true if field blobId is set (has been assigned a value) and false otherwise */
    public boolean isSetBlobId() {
      return EncodingUtils.testBit(__isset_bitfield, __BLOBID_ISSET_ID);
    }

    public void setBlobIdIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOBID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case BLOB_ID:
        if (value == null) {
          unsetBlobId();
        } else {
          setBlobId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case BLOB_ID:
        return Long.valueOf(getBlobId());

      }
      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 BLOB_ID:
        return isSetBlobId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof stat_args)
        return this.equals((stat_args)that);
      return false;
    }

    public boolean equals(stat_args that) {
      if (that == null)
        return false;

      boolean this_present_blobId = true;
      boolean that_present_blobId = true;
      if (this_present_blobId || that_present_blobId) {
        if (!(this_present_blobId && that_present_blobId))
          return false;
        if (this.blobId != that.blobId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(stat_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetBlobId()).compareTo(other.isSetBlobId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBlobId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blobId, other.blobId);
        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("stat_args(");
      boolean first = true;

      sb.append("blobId:");
      sb.append(this.blobId);
      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 stat_argsStandardSchemeFactory implements SchemeFactory {
      public stat_argsStandardScheme getScheme() {
        return new stat_argsStandardScheme();
      }
    }

    private static class stat_argsStandardScheme extends StandardScheme<stat_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, stat_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: // BLOB_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.blobId = iprot.readI64();
                struct.setBlobIdIsSet(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, stat_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(BLOB_ID_FIELD_DESC);
        oprot.writeI64(struct.blobId);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class stat_argsTupleSchemeFactory implements SchemeFactory {
      public stat_argsTupleScheme getScheme() {
        return new stat_argsTupleScheme();
      }
    }

    private static class stat_argsTupleScheme extends TupleScheme<stat_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, stat_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetBlobId()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetBlobId()) {
          oprot.writeI64(struct.blobId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, stat_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.blobId = iprot.readI64();
          struct.setBlobIdIsSet(true);
        }
      }
    }

  }

  public static class stat_result implements org.apache.thrift.TBase<stat_result, stat_result._Fields>, java.io.Serializable, Cloneable, Comparable<stat_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("stat_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField NO_SUCH_BLOB_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("noSuchBlobException", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField IO_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("ioException", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new stat_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new stat_resultTupleSchemeFactory());
    }

    public StatResponse success; // required
    public RemoteNoSuchBlobException noSuchBlobException; // required
    public RemoteIOException ioException; // 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"),
      NO_SUCH_BLOB_EXCEPTION((short)1, "noSuchBlobException"),
      IO_EXCEPTION((short)2, "ioException");

      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: // NO_SUCH_BLOB_EXCEPTION
            return NO_SUCH_BLOB_EXCEPTION;
          case 2: // IO_EXCEPTION
            return IO_EXCEPTION;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StatResponse.class)));
      tmpMap.put(_Fields.NO_SUCH_BLOB_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("noSuchBlobException", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.IO_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("ioException", 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(stat_result.class, metaDataMap);
    }

    public stat_result() {
    }

    public stat_result(
      StatResponse success,
      RemoteNoSuchBlobException noSuchBlobException,
      RemoteIOException ioException)
    {
      this();
      this.success = success;
      this.noSuchBlobException = noSuchBlobException;
      this.ioException = ioException;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public stat_result(stat_result other) {
      if (other.isSetSuccess()) {
        this.success = new StatResponse(other.success);
      }
      if (other.isSetNoSuchBlobException()) {
        this.noSuchBlobException = new RemoteNoSuchBlobException(other.noSuchBlobException);
      }
      if (other.isSetIoException()) {
        this.ioException = new RemoteIOException(other.ioException);
      }
    }

    public stat_result deepCopy() {
      return new stat_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.noSuchBlobException = null;
      this.ioException = null;
    }

    public StatResponse getSuccess() {
      return this.success;
    }

    public stat_result setSuccess(StatResponse 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 RemoteNoSuchBlobException getNoSuchBlobException() {
      return this.noSuchBlobException;
    }

    public stat_result setNoSuchBlobException(RemoteNoSuchBlobException noSuchBlobException) {
      this.noSuchBlobException = noSuchBlobException;
      return this;
    }

    public void unsetNoSuchBlobException() {
      this.noSuchBlobException = null;
    }

    /** Returns true if field noSuchBlobException is set (has been assigned a value) and false otherwise */
    public boolean isSetNoSuchBlobException() {
      return this.noSuchBlobException != null;
    }

    public void setNoSuchBlobExceptionIsSet(boolean value) {
      if (!value) {
        this.noSuchBlobException = null;
      }
    }

    public RemoteIOException getIoException() {
      return this.ioException;
    }

    public stat_result setIoException(RemoteIOException ioException) {
      this.ioException = ioException;
      return this;
    }

    public void unsetIoException() {
      this.ioException = null;
    }

    /** Returns true if field ioException is set (has been assigned a value) and false otherwise */
    public boolean isSetIoException() {
      return this.ioException != null;
    }

    public void setIoExceptionIsSet(boolean value) {
      if (!value) {
        this.ioException = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((StatResponse)value);
        }
        break;

      case NO_SUCH_BLOB_EXCEPTION:
        if (value == null) {
          unsetNoSuchBlobException();
        } else {
          setNoSuchBlobException((RemoteNoSuchBlobException)value);
        }
        break;

      case IO_EXCEPTION:
        if (value == null) {
          unsetIoException();
        } else {
          setIoException((RemoteIOException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case NO_SUCH_BLOB_EXCEPTION:
        return getNoSuchBlobException();

      case IO_EXCEPTION:
        return getIoException();

      }
      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 NO_SUCH_BLOB_EXCEPTION:
        return isSetNoSuchBlobException();
      case IO_EXCEPTION:
        return isSetIoException();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof stat_result)
        return this.equals((stat_result)that);
      return false;
    }

    public boolean equals(stat_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_noSuchBlobException = true && this.isSetNoSuchBlobException();
      boolean that_present_noSuchBlobException = true && that.isSetNoSuchBlobException();
      if (this_present_noSuchBlobException || that_present_noSuchBlobException) {
        if (!(this_present_noSuchBlobException && that_present_noSuchBlobException))
          return false;
        if (!this.noSuchBlobException.equals(that.noSuchBlobException))
          return false;
      }

      boolean this_present_ioException = true && this.isSetIoException();
      boolean that_present_ioException = true && that.isSetIoException();
      if (this_present_ioException || that_present_ioException) {
        if (!(this_present_ioException && that_present_ioException))
          return false;
        if (!this.ioException.equals(that.ioException))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(stat_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(isSetNoSuchBlobException()).compareTo(other.isSetNoSuchBlobException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNoSuchBlobException()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.noSuchBlobException, other.noSuchBlobException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetIoException()).compareTo(other.isSetIoException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetIoException()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ioException, other.ioException);
        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("stat_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("noSuchBlobException:");
      if (this.noSuchBlobException == null) {
        sb.append("null");
      } else {
        sb.append(this.noSuchBlobException);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ioException:");
      if (this.ioException == null) {
        sb.append("null");
      } else {
        sb.append(this.ioException);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class stat_resultStandardSchemeFactory implements SchemeFactory {
      public stat_resultStandardScheme getScheme() {
        return new stat_resultStandardScheme();
      }
    }

    private static class stat_resultStandardScheme extends StandardScheme<stat_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, stat_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new StatResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // NO_SUCH_BLOB_EXCEPTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.noSuchBlobException = new RemoteNoSuchBlobException();
                struct.noSuchBlobException.read(iprot);
                struct.setNoSuchBlobExceptionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IO_EXCEPTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ioException = new RemoteIOException();
                struct.ioException.read(iprot);
                struct.setIoExceptionIsSet(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, stat_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.noSuchBlobException != null) {
          oprot.writeFieldBegin(NO_SUCH_BLOB_EXCEPTION_FIELD_DESC);
          struct.noSuchBlobException.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ioException != null) {
          oprot.writeFieldBegin(IO_EXCEPTION_FIELD_DESC);
          struct.ioException.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class stat_resultTupleSchemeFactory implements SchemeFactory {
      public stat_resultTupleScheme getScheme() {
        return new stat_resultTupleScheme();
      }
    }

    private static class stat_resultTupleScheme extends TupleScheme<stat_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, stat_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetNoSuchBlobException()) {
          optionals.set(1);
        }
        if (struct.isSetIoException()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetNoSuchBlobException()) {
          struct.noSuchBlobException.write(oprot);
        }
        if (struct.isSetIoException()) {
          struct.ioException.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, stat_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = new StatResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.noSuchBlobException = new RemoteNoSuchBlobException();
          struct.noSuchBlobException.read(iprot);
          struct.setNoSuchBlobExceptionIsSet(true);
        }
        if (incoming.get(2)) {
          struct.ioException = new RemoteIOException();
          struct.ioException.read(iprot);
          struct.setIoExceptionIsSet(true);
        }
      }
    }

  }

  public static class statLegacy_args implements org.apache.thrift.TBase<statLegacy_args, statLegacy_args._Fields>, java.io.Serializable, Cloneable, Comparable<statLegacy_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("statLegacy_args");

    private static final org.apache.thrift.protocol.TField LEGACY_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("legacyPath", 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 statLegacy_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new statLegacy_argsTupleSchemeFactory());
    }

    public String legacyPath; // 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 {
      LEGACY_PATH((short)1, "legacyPath");

      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: // LEGACY_PATH
            return LEGACY_PATH;
          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.LEGACY_PATH, new org.apache.thrift.meta_data.FieldMetaData("legacyPath", 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(statLegacy_args.class, metaDataMap);
    }

    public statLegacy_args() {
    }

    public statLegacy_args(
      String legacyPath)
    {
      this();
      this.legacyPath = legacyPath;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public statLegacy_args(statLegacy_args other) {
      if (other.isSetLegacyPath()) {
        this.legacyPath = other.legacyPath;
      }
    }

    public statLegacy_args deepCopy() {
      return new statLegacy_args(this);
    }

    @Override
    public void clear() {
      this.legacyPath = null;
    }

    public String getLegacyPath() {
      return this.legacyPath;
    }

    public statLegacy_args setLegacyPath(String legacyPath) {
      this.legacyPath = legacyPath;
      return this;
    }

    public void unsetLegacyPath() {
      this.legacyPath = null;
    }

    /** Returns true if field legacyPath is set (has been assigned a value) and false otherwise */
    public boolean isSetLegacyPath() {
      return this.legacyPath != null;
    }

    public void setLegacyPathIsSet(boolean value) {
      if (!value) {
        this.legacyPath = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case LEGACY_PATH:
        if (value == null) {
          unsetLegacyPath();
        } else {
          setLegacyPath((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case LEGACY_PATH:
        return getLegacyPath();

      }
      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 LEGACY_PATH:
        return isSetLegacyPath();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof statLegacy_args)
        return this.equals((statLegacy_args)that);
      return false;
    }

    public boolean equals(statLegacy_args that) {
      if (that == null)
        return false;

      boolean this_present_legacyPath = true && this.isSetLegacyPath();
      boolean that_present_legacyPath = true && that.isSetLegacyPath();
      if (this_present_legacyPath || that_present_legacyPath) {
        if (!(this_present_legacyPath && that_present_legacyPath))
          return false;
        if (!this.legacyPath.equals(that.legacyPath))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(statLegacy_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetLegacyPath()).compareTo(other.isSetLegacyPath());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLegacyPath()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.legacyPath, other.legacyPath);
        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("statLegacy_args(");
      boolean first = true;

      sb.append("legacyPath:");
      if (this.legacyPath == null) {
        sb.append("null");
      } else {
        sb.append(this.legacyPath);
      }
      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 statLegacy_argsStandardSchemeFactory implements SchemeFactory {
      public statLegacy_argsStandardScheme getScheme() {
        return new statLegacy_argsStandardScheme();
      }
    }

    private static class statLegacy_argsStandardScheme extends StandardScheme<statLegacy_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, statLegacy_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: // LEGACY_PATH
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.legacyPath = iprot.readString();
                struct.setLegacyPathIsSet(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, statLegacy_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.legacyPath != null) {
          oprot.writeFieldBegin(LEGACY_PATH_FIELD_DESC);
          oprot.writeString(struct.legacyPath);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class statLegacy_argsTupleSchemeFactory implements SchemeFactory {
      public statLegacy_argsTupleScheme getScheme() {
        return new statLegacy_argsTupleScheme();
      }
    }

    private static class statLegacy_argsTupleScheme extends TupleScheme<statLegacy_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, statLegacy_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetLegacyPath()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetLegacyPath()) {
          oprot.writeString(struct.legacyPath);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, statLegacy_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.legacyPath = iprot.readString();
          struct.setLegacyPathIsSet(true);
        }
      }
    }

  }

  public static class statLegacy_result implements org.apache.thrift.TBase<statLegacy_result, statLegacy_result._Fields>, java.io.Serializable, Cloneable, Comparable<statLegacy_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("statLegacy_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField NO_SUCH_BLOB_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("noSuchBlobException", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField IO_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("ioException", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new statLegacy_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new statLegacy_resultTupleSchemeFactory());
    }

    public StatResponse success; // required
    public RemoteNoSuchBlobException noSuchBlobException; // required
    public RemoteIOException ioException; // 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"),
      NO_SUCH_BLOB_EXCEPTION((short)1, "noSuchBlobException"),
      IO_EXCEPTION((short)2, "ioException");

      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: // NO_SUCH_BLOB_EXCEPTION
            return NO_SUCH_BLOB_EXCEPTION;
          case 2: // IO_EXCEPTION
            return IO_EXCEPTION;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StatResponse.class)));
      tmpMap.put(_Fields.NO_SUCH_BLOB_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("noSuchBlobException", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.IO_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("ioException", 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(statLegacy_result.class, metaDataMap);
    }

    public statLegacy_result() {
    }

    public statLegacy_result(
      StatResponse success,
      RemoteNoSuchBlobException noSuchBlobException,
      RemoteIOException ioException)
    {
      this();
      this.success = success;
      this.noSuchBlobException = noSuchBlobException;
      this.ioException = ioException;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public statLegacy_result(statLegacy_result other) {
      if (other.isSetSuccess()) {
        this.success = new StatResponse(other.success);
      }
      if (other.isSetNoSuchBlobException()) {
        this.noSuchBlobException = new RemoteNoSuchBlobException(other.noSuchBlobException);
      }
      if (other.isSetIoException()) {
        this.ioException = new RemoteIOException(other.ioException);
      }
    }

    public statLegacy_result deepCopy() {
      return new statLegacy_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.noSuchBlobException = null;
      this.ioException = null;
    }

    public StatResponse getSuccess() {
      return this.success;
    }

    public statLegacy_result setSuccess(StatResponse 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 RemoteNoSuchBlobException getNoSuchBlobException() {
      return this.noSuchBlobException;
    }

    public statLegacy_result setNoSuchBlobException(RemoteNoSuchBlobException noSuchBlobException) {
      this.noSuchBlobException = noSuchBlobException;
      return this;
    }

    public void unsetNoSuchBlobException() {
      this.noSuchBlobException = null;
    }

    /** Returns true if field noSuchBlobException is set (has been assigned a value) and false otherwise */
    public boolean isSetNoSuchBlobException() {
      return this.noSuchBlobException != null;
    }

    public void setNoSuchBlobExceptionIsSet(boolean value) {
      if (!value) {
        this.noSuchBlobException = null;
      }
    }

    public RemoteIOException getIoException() {
      return this.ioException;
    }

    public statLegacy_result setIoException(RemoteIOException ioException) {
      this.ioException = ioException;
      return this;
    }

    public void unsetIoException() {
      this.ioException = null;
    }

    /** Returns true if field ioException is set (has been assigned a value) and false otherwise */
    public boolean isSetIoException() {
      return this.ioException != null;
    }

    public void setIoExceptionIsSet(boolean value) {
      if (!value) {
        this.ioException = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((StatResponse)value);
        }
        break;

      case NO_SUCH_BLOB_EXCEPTION:
        if (value == null) {
          unsetNoSuchBlobException();
        } else {
          setNoSuchBlobException((RemoteNoSuchBlobException)value);
        }
        break;

      case IO_EXCEPTION:
        if (value == null) {
          unsetIoException();
        } else {
          setIoException((RemoteIOException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case NO_SUCH_BLOB_EXCEPTION:
        return getNoSuchBlobException();

      case IO_EXCEPTION:
        return getIoException();

      }
      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 NO_SUCH_BLOB_EXCEPTION:
        return isSetNoSuchBlobException();
      case IO_EXCEPTION:
        return isSetIoException();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof statLegacy_result)
        return this.equals((statLegacy_result)that);
      return false;
    }

    public boolean equals(statLegacy_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_noSuchBlobException = true && this.isSetNoSuchBlobException();
      boolean that_present_noSuchBlobException = true && that.isSetNoSuchBlobException();
      if (this_present_noSuchBlobException || that_present_noSuchBlobException) {
        if (!(this_present_noSuchBlobException && that_present_noSuchBlobException))
          return false;
        if (!this.noSuchBlobException.equals(that.noSuchBlobException))
          return false;
      }

      boolean this_present_ioException = true && this.isSetIoException();
      boolean that_present_ioException = true && that.isSetIoException();
      if (this_present_ioException || that_present_ioException) {
        if (!(this_present_ioException && that_present_ioException))
          return false;
        if (!this.ioException.equals(that.ioException))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(statLegacy_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(isSetNoSuchBlobException()).compareTo(other.isSetNoSuchBlobException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNoSuchBlobException()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.noSuchBlobException, other.noSuchBlobException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetIoException()).compareTo(other.isSetIoException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetIoException()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ioException, other.ioException);
        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("statLegacy_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("noSuchBlobException:");
      if (this.noSuchBlobException == null) {
        sb.append("null");
      } else {
        sb.append(this.noSuchBlobException);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ioException:");
      if (this.ioException == null) {
        sb.append("null");
      } else {
        sb.append(this.ioException);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class statLegacy_resultStandardSchemeFactory implements SchemeFactory {
      public statLegacy_resultStandardScheme getScheme() {
        return new statLegacy_resultStandardScheme();
      }
    }

    private static class statLegacy_resultStandardScheme extends StandardScheme<statLegacy_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, statLegacy_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new StatResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // NO_SUCH_BLOB_EXCEPTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.noSuchBlobException = new RemoteNoSuchBlobException();
                struct.noSuchBlobException.read(iprot);
                struct.setNoSuchBlobExceptionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IO_EXCEPTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ioException = new RemoteIOException();
                struct.ioException.read(iprot);
                struct.setIoExceptionIsSet(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, statLegacy_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.noSuchBlobException != null) {
          oprot.writeFieldBegin(NO_SUCH_BLOB_EXCEPTION_FIELD_DESC);
          struct.noSuchBlobException.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ioException != null) {
          oprot.writeFieldBegin(IO_EXCEPTION_FIELD_DESC);
          struct.ioException.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class statLegacy_resultTupleSchemeFactory implements SchemeFactory {
      public statLegacy_resultTupleScheme getScheme() {
        return new statLegacy_resultTupleScheme();
      }
    }

    private static class statLegacy_resultTupleScheme extends TupleScheme<statLegacy_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, statLegacy_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetNoSuchBlobException()) {
          optionals.set(1);
        }
        if (struct.isSetIoException()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetNoSuchBlobException()) {
          struct.noSuchBlobException.write(oprot);
        }
        if (struct.isSetIoException()) {
          struct.ioException.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, statLegacy_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = new StatResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.noSuchBlobException = new RemoteNoSuchBlobException();
          struct.noSuchBlobException.read(iprot);
          struct.setNoSuchBlobExceptionIsSet(true);
        }
        if (incoming.get(2)) {
          struct.ioException = new RemoteIOException();
          struct.ioException.read(iprot);
          struct.setIoExceptionIsSet(true);
        }
      }
    }

  }

  public static class digest_args implements org.apache.thrift.TBase<digest_args, digest_args._Fields>, java.io.Serializable, Cloneable, Comparable<digest_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("digest_args");

    private static final org.apache.thrift.protocol.TField BLOB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blobId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField ALGORITHM_FIELD_DESC = new org.apache.thrift.protocol.TField("algorithm", 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 digest_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new digest_argsTupleSchemeFactory());
    }

    public long blobId; // required
    public String algorithm; // 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 {
      BLOB_ID((short)1, "blobId"),
      ALGORITHM((short)2, "algorithm");

      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: // BLOB_ID
            return BLOB_ID;
          case 2: // ALGORITHM
            return ALGORITHM;
          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 __BLOBID_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.BLOB_ID, new org.apache.thrift.meta_data.FieldMetaData("blobId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "BlobId")));
      tmpMap.put(_Fields.ALGORITHM, new org.apache.thrift.meta_data.FieldMetaData("algorithm", 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(digest_args.class, metaDataMap);
    }

    public digest_args() {
    }

    public digest_args(
      long blobId,
      String algorithm)
    {
      this();
      this.blobId = blobId;
      setBlobIdIsSet(true);
      this.algorithm = algorithm;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public digest_args(digest_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.blobId = other.blobId;
      if (other.isSetAlgorithm()) {
        this.algorithm = other.algorithm;
      }
    }

    public digest_args deepCopy() {
      return new digest_args(this);
    }

    @Override
    public void clear() {
      setBlobIdIsSet(false);
      this.blobId = 0;
      this.algorithm = null;
    }

    public long getBlobId() {
      return this.blobId;
    }

    public digest_args setBlobId(long blobId) {
      this.blobId = blobId;
      setBlobIdIsSet(true);
      return this;
    }

    public void unsetBlobId() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOBID_ISSET_ID);
    }

    /** Returns true if field blobId is set (has been assigned a value) and false otherwise */
    public boolean isSetBlobId() {
      return EncodingUtils.testBit(__isset_bitfield, __BLOBID_ISSET_ID);
    }

    public void setBlobIdIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOBID_ISSET_ID, value);
    }

    public String getAlgorithm() {
      return this.algorithm;
    }

    public digest_args setAlgorithm(String algorithm) {
      this.algorithm = algorithm;
      return this;
    }

    public void unsetAlgorithm() {
      this.algorithm = null;
    }

    /** Returns true if field algorithm is set (has been assigned a value) and false otherwise */
    public boolean isSetAlgorithm() {
      return this.algorithm != null;
    }

    public void setAlgorithmIsSet(boolean value) {
      if (!value) {
        this.algorithm = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case BLOB_ID:
        if (value == null) {
          unsetBlobId();
        } else {
          setBlobId((Long)value);
        }
        break;

      case ALGORITHM:
        if (value == null) {
          unsetAlgorithm();
        } else {
          setAlgorithm((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case BLOB_ID:
        return Long.valueOf(getBlobId());

      case ALGORITHM:
        return getAlgorithm();

      }
      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 BLOB_ID:
        return isSetBlobId();
      case ALGORITHM:
        return isSetAlgorithm();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof digest_args)
        return this.equals((digest_args)that);
      return false;
    }

    public boolean equals(digest_args that) {
      if (that == null)
        return false;

      boolean this_present_blobId = true;
      boolean that_present_blobId = true;
      if (this_present_blobId || that_present_blobId) {
        if (!(this_present_blobId && that_present_blobId))
          return false;
        if (this.blobId != that.blobId)
          return false;
      }

      boolean this_present_algorithm = true && this.isSetAlgorithm();
      boolean that_present_algorithm = true && that.isSetAlgorithm();
      if (this_present_algorithm || that_present_algorithm) {
        if (!(this_present_algorithm && that_present_algorithm))
          return false;
        if (!this.algorithm.equals(that.algorithm))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(digest_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetBlobId()).compareTo(other.isSetBlobId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBlobId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blobId, other.blobId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAlgorithm()).compareTo(other.isSetAlgorithm());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAlgorithm()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.algorithm, other.algorithm);
        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("digest_args(");
      boolean first = true;

      sb.append("blobId:");
      sb.append(this.blobId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("algorithm:");
      if (this.algorithm == null) {
        sb.append("null");
      } else {
        sb.append(this.algorithm);
      }
      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 digest_argsStandardSchemeFactory implements SchemeFactory {
      public digest_argsStandardScheme getScheme() {
        return new digest_argsStandardScheme();
      }
    }

    private static class digest_argsStandardScheme extends StandardScheme<digest_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, digest_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: // BLOB_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.blobId = iprot.readI64();
                struct.setBlobIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ALGORITHM
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.algorithm = iprot.readString();
                struct.setAlgorithmIsSet(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, digest_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(BLOB_ID_FIELD_DESC);
        oprot.writeI64(struct.blobId);
        oprot.writeFieldEnd();
        if (struct.algorithm != null) {
          oprot.writeFieldBegin(ALGORITHM_FIELD_DESC);
          oprot.writeString(struct.algorithm);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class digest_argsTupleSchemeFactory implements SchemeFactory {
      public digest_argsTupleScheme getScheme() {
        return new digest_argsTupleScheme();
      }
    }

    private static class digest_argsTupleScheme extends TupleScheme<digest_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, digest_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetBlobId()) {
          optionals.set(0);
        }
        if (struct.isSetAlgorithm()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetBlobId()) {
          oprot.writeI64(struct.blobId);
        }
        if (struct.isSetAlgorithm()) {
          oprot.writeString(struct.algorithm);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, digest_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.blobId = iprot.readI64();
          struct.setBlobIdIsSet(true);
        }
        if (incoming.get(1)) {
          struct.algorithm = iprot.readString();
          struct.setAlgorithmIsSet(true);
        }
      }
    }

  }

  public static class digest_result implements org.apache.thrift.TBase<digest_result, digest_result._Fields>, java.io.Serializable, Cloneable, Comparable<digest_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("digest_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 NO_SUCH_BLOB_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("noSuchBlobException", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField IO_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("ioException", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new digest_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new digest_resultTupleSchemeFactory());
    }

    public String success; // required
    public RemoteNoSuchBlobException noSuchBlobException; // required
    public RemoteIOException ioException; // 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"),
      NO_SUCH_BLOB_EXCEPTION((short)1, "noSuchBlobException"),
      IO_EXCEPTION((short)2, "ioException");

      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: // NO_SUCH_BLOB_EXCEPTION
            return NO_SUCH_BLOB_EXCEPTION;
          case 2: // IO_EXCEPTION
            return IO_EXCEPTION;
          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.NO_SUCH_BLOB_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("noSuchBlobException", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.IO_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("ioException", 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(digest_result.class, metaDataMap);
    }

    public digest_result() {
    }

    public digest_result(
      String success,
      RemoteNoSuchBlobException noSuchBlobException,
      RemoteIOException ioException)
    {
      this();
      this.success = success;
      this.noSuchBlobException = noSuchBlobException;
      this.ioException = ioException;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public digest_result(digest_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetNoSuchBlobException()) {
        this.noSuchBlobException = new RemoteNoSuchBlobException(other.noSuchBlobException);
      }
      if (other.isSetIoException()) {
        this.ioException = new RemoteIOException(other.ioException);
      }
    }

    public digest_result deepCopy() {
      return new digest_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.noSuchBlobException = null;
      this.ioException = null;
    }

    public String getSuccess() {
      return this.success;
    }

    public digest_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 RemoteNoSuchBlobException getNoSuchBlobException() {
      return this.noSuchBlobException;
    }

    public digest_result setNoSuchBlobException(RemoteNoSuchBlobException noSuchBlobException) {
      this.noSuchBlobException = noSuchBlobException;
      return this;
    }

    public void unsetNoSuchBlobException() {
      this.noSuchBlobException = null;
    }

    /** Returns true if field noSuchBlobException is set (has been assigned a value) and false otherwise */
    public boolean isSetNoSuchBlobException() {
      return this.noSuchBlobException != null;
    }

    public void setNoSuchBlobExceptionIsSet(boolean value) {
      if (!value) {
        this.noSuchBlobException = null;
      }
    }

    public RemoteIOException getIoException() {
      return this.ioException;
    }

    public digest_result setIoException(RemoteIOException ioException) {
      this.ioException = ioException;
      return this;
    }

    public void unsetIoException() {
      this.ioException = null;
    }

    /** Returns true if field ioException is set (has been assigned a value) and false otherwise */
    public boolean isSetIoException() {
      return this.ioException != null;
    }

    public void setIoExceptionIsSet(boolean value) {
      if (!value) {
        this.ioException = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((String)value);
        }
        break;

      case NO_SUCH_BLOB_EXCEPTION:
        if (value == null) {
          unsetNoSuchBlobException();
        } else {
          setNoSuchBlobException((RemoteNoSuchBlobException)value);
        }
        break;

      case IO_EXCEPTION:
        if (value == null) {
          unsetIoException();
        } else {
          setIoException((RemoteIOException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case NO_SUCH_BLOB_EXCEPTION:
        return getNoSuchBlobException();

      case IO_EXCEPTION:
        return getIoException();

      }
      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 NO_SUCH_BLOB_EXCEPTION:
        return isSetNoSuchBlobException();
      case IO_EXCEPTION:
        return isSetIoException();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof digest_result)
        return this.equals((digest_result)that);
      return false;
    }

    public boolean equals(digest_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_noSuchBlobException = true && this.isSetNoSuchBlobException();
      boolean that_present_noSuchBlobException = true && that.isSetNoSuchBlobException();
      if (this_present_noSuchBlobException || that_present_noSuchBlobException) {
        if (!(this_present_noSuchBlobException && that_present_noSuchBlobException))
          return false;
        if (!this.noSuchBlobException.equals(that.noSuchBlobException))
          return false;
      }

      boolean this_present_ioException = true && this.isSetIoException();
      boolean that_present_ioException = true && that.isSetIoException();
      if (this_present_ioException || that_present_ioException) {
        if (!(this_present_ioException && that_present_ioException))
          return false;
        if (!this.ioException.equals(that.ioException))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(digest_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(isSetNoSuchBlobException()).compareTo(other.isSetNoSuchBlobException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNoSuchBlobException()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.noSuchBlobException, other.noSuchBlobException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetIoException()).compareTo(other.isSetIoException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetIoException()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ioException, other.ioException);
        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("digest_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("noSuchBlobException:");
      if (this.noSuchBlobException == null) {
        sb.append("null");
      } else {
        sb.append(this.noSuchBlobException);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ioException:");
      if (this.ioException == null) {
        sb.append("null");
      } else {
        sb.append(this.ioException);
      }
      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 digest_resultStandardSchemeFactory implements SchemeFactory {
      public digest_resultStandardScheme getScheme() {
        return new digest_resultStandardScheme();
      }
    }

    private static class digest_resultStandardScheme extends StandardScheme<digest_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, digest_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: // NO_SUCH_BLOB_EXCEPTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.noSuchBlobException = new RemoteNoSuchBlobException();
                struct.noSuchBlobException.read(iprot);
                struct.setNoSuchBlobExceptionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IO_EXCEPTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ioException = new RemoteIOException();
                struct.ioException.read(iprot);
                struct.setIoExceptionIsSet(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, digest_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.noSuchBlobException != null) {
          oprot.writeFieldBegin(NO_SUCH_BLOB_EXCEPTION_FIELD_DESC);
          struct.noSuchBlobException.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ioException != null) {
          oprot.writeFieldBegin(IO_EXCEPTION_FIELD_DESC);
          struct.ioException.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class digest_resultTupleSchemeFactory implements SchemeFactory {
      public digest_resultTupleScheme getScheme() {
        return new digest_resultTupleScheme();
      }
    }

    private static class digest_resultTupleScheme extends TupleScheme<digest_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, digest_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetNoSuchBlobException()) {
          optionals.set(1);
        }
        if (struct.isSetIoException()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          oprot.writeString(struct.success);
        }
        if (struct.isSetNoSuchBlobException()) {
          struct.noSuchBlobException.write(oprot);
        }
        if (struct.isSetIoException()) {
          struct.ioException.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, digest_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = iprot.readString();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.noSuchBlobException = new RemoteNoSuchBlobException();
          struct.noSuchBlobException.read(iprot);
          struct.setNoSuchBlobExceptionIsSet(true);
        }
        if (incoming.get(2)) {
          struct.ioException = new RemoteIOException();
          struct.ioException.read(iprot);
          struct.setIoExceptionIsSet(true);
        }
      }
    }

  }

  public static class read_args implements org.apache.thrift.TBase<read_args, read_args._Fields>, java.io.Serializable, Cloneable, Comparable<read_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("read_args");

    private static final org.apache.thrift.protocol.TField BLOB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blobId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("offset", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField LENGTH_FIELD_DESC = new org.apache.thrift.protocol.TField("length", org.apache.thrift.protocol.TType.I32, (short)3);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new read_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new read_argsTupleSchemeFactory());
    }

    public long blobId; // required
    public long offset; // required
    public int length; // 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 {
      BLOB_ID((short)1, "blobId"),
      OFFSET((short)2, "offset"),
      LENGTH((short)3, "length");

      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: // BLOB_ID
            return BLOB_ID;
          case 2: // OFFSET
            return OFFSET;
          case 3: // LENGTH
            return LENGTH;
          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 __BLOBID_ISSET_ID = 0;
    private static final int __OFFSET_ISSET_ID = 1;
    private static final int __LENGTH_ISSET_ID = 2;
    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.BLOB_ID, new org.apache.thrift.meta_data.FieldMetaData("blobId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "BlobId")));
      tmpMap.put(_Fields.OFFSET, new org.apache.thrift.meta_data.FieldMetaData("offset", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.LENGTH, new org.apache.thrift.meta_data.FieldMetaData("length", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(read_args.class, metaDataMap);
    }

    public read_args() {
    }

    public read_args(
      long blobId,
      long offset,
      int length)
    {
      this();
      this.blobId = blobId;
      setBlobIdIsSet(true);
      this.offset = offset;
      setOffsetIsSet(true);
      this.length = length;
      setLengthIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public read_args(read_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.blobId = other.blobId;
      this.offset = other.offset;
      this.length = other.length;
    }

    public read_args deepCopy() {
      return new read_args(this);
    }

    @Override
    public void clear() {
      setBlobIdIsSet(false);
      this.blobId = 0;
      setOffsetIsSet(false);
      this.offset = 0;
      setLengthIsSet(false);
      this.length = 0;
    }

    public long getBlobId() {
      return this.blobId;
    }

    public read_args setBlobId(long blobId) {
      this.blobId = blobId;
      setBlobIdIsSet(true);
      return this;
    }

    public void unsetBlobId() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOBID_ISSET_ID);
    }

    /** Returns true if field blobId is set (has been assigned a value) and false otherwise */
    public boolean isSetBlobId() {
      return EncodingUtils.testBit(__isset_bitfield, __BLOBID_ISSET_ID);
    }

    public void setBlobIdIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOBID_ISSET_ID, value);
    }

    public long getOffset() {
      return this.offset;
    }

    public read_args setOffset(long offset) {
      this.offset = offset;
      setOffsetIsSet(true);
      return this;
    }

    public void unsetOffset() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OFFSET_ISSET_ID);
    }

    /** Returns true if field offset is set (has been assigned a value) and false otherwise */
    public boolean isSetOffset() {
      return EncodingUtils.testBit(__isset_bitfield, __OFFSET_ISSET_ID);
    }

    public void setOffsetIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OFFSET_ISSET_ID, value);
    }

    public int getLength() {
      return this.length;
    }

    public read_args setLength(int length) {
      this.length = length;
      setLengthIsSet(true);
      return this;
    }

    public void unsetLength() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LENGTH_ISSET_ID);
    }

    /** Returns true if field length is set (has been assigned a value) and false otherwise */
    public boolean isSetLength() {
      return EncodingUtils.testBit(__isset_bitfield, __LENGTH_ISSET_ID);
    }

    public void setLengthIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LENGTH_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case BLOB_ID:
        if (value == null) {
          unsetBlobId();
        } else {
          setBlobId((Long)value);
        }
        break;

      case OFFSET:
        if (value == null) {
          unsetOffset();
        } else {
          setOffset((Long)value);
        }
        break;

      case LENGTH:
        if (value == null) {
          unsetLength();
        } else {
          setLength((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case BLOB_ID:
        return Long.valueOf(getBlobId());

      case OFFSET:
        return Long.valueOf(getOffset());

      case LENGTH:
        return Integer.valueOf(getLength());

      }
      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 BLOB_ID:
        return isSetBlobId();
      case OFFSET:
        return isSetOffset();
      case LENGTH:
        return isSetLength();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof read_args)
        return this.equals((read_args)that);
      return false;
    }

    public boolean equals(read_args that) {
      if (that == null)
        return false;

      boolean this_present_blobId = true;
      boolean that_present_blobId = true;
      if (this_present_blobId || that_present_blobId) {
        if (!(this_present_blobId && that_present_blobId))
          return false;
        if (this.blobId != that.blobId)
          return false;
      }

      boolean this_present_offset = true;
      boolean that_present_offset = true;
      if (this_present_offset || that_present_offset) {
        if (!(this_present_offset && that_present_offset))
          return false;
        if (this.offset != that.offset)
          return false;
      }

      boolean this_present_length = true;
      boolean that_present_length = true;
      if (this_present_length || that_present_length) {
        if (!(this_present_length && that_present_length))
          return false;
        if (this.length != that.length)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(read_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetBlobId()).compareTo(other.isSetBlobId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBlobId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blobId, other.blobId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetOffset()).compareTo(other.isSetOffset());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOffset()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.offset, other.offset);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetLength()).compareTo(other.isSetLength());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLength()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.length, other.length);
        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("read_args(");
      boolean first = true;

      sb.append("blobId:");
      sb.append(this.blobId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("offset:");
      sb.append(this.offset);
      first = false;
      if (!first) sb.append(", ");
      sb.append("length:");
      sb.append(this.length);
      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 read_argsStandardSchemeFactory implements SchemeFactory {
      public read_argsStandardScheme getScheme() {
        return new read_argsStandardScheme();
      }
    }

    private static class read_argsStandardScheme extends StandardScheme<read_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, read_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: // BLOB_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.blobId = iprot.readI64();
                struct.setBlobIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // OFFSET
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.offset = iprot.readI64();
                struct.setOffsetIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // LENGTH
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.length = iprot.readI32();
                struct.setLengthIsSet(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, read_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(BLOB_ID_FIELD_DESC);
        oprot.writeI64(struct.blobId);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(OFFSET_FIELD_DESC);
        oprot.writeI64(struct.offset);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(LENGTH_FIELD_DESC);
        oprot.writeI32(struct.length);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class read_argsTupleSchemeFactory implements SchemeFactory {
      public read_argsTupleScheme getScheme() {
        return new read_argsTupleScheme();
      }
    }

    private static class read_argsTupleScheme extends TupleScheme<read_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, read_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetBlobId()) {
          optionals.set(0);
        }
        if (struct.isSetOffset()) {
          optionals.set(1);
        }
        if (struct.isSetLength()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetBlobId()) {
          oprot.writeI64(struct.blobId);
        }
        if (struct.isSetOffset()) {
          oprot.writeI64(struct.offset);
        }
        if (struct.isSetLength()) {
          oprot.writeI32(struct.length);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, read_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.blobId = iprot.readI64();
          struct.setBlobIdIsSet(true);
        }
        if (incoming.get(1)) {
          struct.offset = iprot.readI64();
          struct.setOffsetIsSet(true);
        }
        if (incoming.get(2)) {
          struct.length = iprot.readI32();
          struct.setLengthIsSet(true);
        }
      }
    }

  }

  public static class read_result implements org.apache.thrift.TBase<read_result, read_result._Fields>, java.io.Serializable, Cloneable, Comparable<read_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("read_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 NO_SUCH_BLOB_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("noSuchBlobException", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField IO_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("ioException", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new read_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new read_resultTupleSchemeFactory());
    }

    public ByteBuffer success; // required
    public RemoteNoSuchBlobException noSuchBlobException; // required
    public RemoteIOException ioException; // 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"),
      NO_SUCH_BLOB_EXCEPTION((short)1, "noSuchBlobException"),
      IO_EXCEPTION((short)2, "ioException");

      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: // NO_SUCH_BLOB_EXCEPTION
            return NO_SUCH_BLOB_EXCEPTION;
          case 2: // IO_EXCEPTION
            return IO_EXCEPTION;
          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.NO_SUCH_BLOB_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("noSuchBlobException", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.IO_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("ioException", 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(read_result.class, metaDataMap);
    }

    public read_result() {
    }

    public read_result(
      ByteBuffer success,
      RemoteNoSuchBlobException noSuchBlobException,
      RemoteIOException ioException)
    {
      this();
      this.success = success;
      this.noSuchBlobException = noSuchBlobException;
      this.ioException = ioException;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public read_result(read_result other) {
      if (other.isSetSuccess()) {
        this.success = org.apache.thrift.TBaseHelper.copyBinary(other.success);
;
      }
      if (other.isSetNoSuchBlobException()) {
        this.noSuchBlobException = new RemoteNoSuchBlobException(other.noSuchBlobException);
      }
      if (other.isSetIoException()) {
        this.ioException = new RemoteIOException(other.ioException);
      }
    }

    public read_result deepCopy() {
      return new read_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.noSuchBlobException = null;
      this.ioException = null;
    }

    public byte[] getSuccess() {
      setSuccess(org.apache.thrift.TBaseHelper.rightSize(success));
      return success == null ? null : success.array();
    }

    public ByteBuffer bufferForSuccess() {
      return success;
    }

    public read_result setSuccess(byte[] success) {
      setSuccess(success == null ? (ByteBuffer)null : ByteBuffer.wrap(success));
      return this;
    }

    public read_result setSuccess(ByteBuffer 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 RemoteNoSuchBlobException getNoSuchBlobException() {
      return this.noSuchBlobException;
    }

    public read_result setNoSuchBlobException(RemoteNoSuchBlobException noSuchBlobException) {
      this.noSuchBlobException = noSuchBlobException;
      return this;
    }

    public void unsetNoSuchBlobException() {
      this.noSuchBlobException = null;
    }

    /** Returns true if field noSuchBlobException is set (has been assigned a value) and false otherwise */
    public boolean isSetNoSuchBlobException() {
      return this.noSuchBlobException != null;
    }

    public void setNoSuchBlobExceptionIsSet(boolean value) {
      if (!value) {
        this.noSuchBlobException = null;
      }
    }

    public RemoteIOException getIoException() {
      return this.ioException;
    }

    public read_result setIoException(RemoteIOException ioException) {
      this.ioException = ioException;
      return this;
    }

    public void unsetIoException() {
      this.ioException = null;
    }

    /** Returns true if field ioException is set (has been assigned a value) and false otherwise */
    public boolean isSetIoException() {
      return this.ioException != null;
    }

    public void setIoExceptionIsSet(boolean value) {
      if (!value) {
        this.ioException = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((ByteBuffer)value);
        }
        break;

      case NO_SUCH_BLOB_EXCEPTION:
        if (value == null) {
          unsetNoSuchBlobException();
        } else {
          setNoSuchBlobException((RemoteNoSuchBlobException)value);
        }
        break;

      case IO_EXCEPTION:
        if (value == null) {
          unsetIoException();
        } else {
          setIoException((RemoteIOException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case NO_SUCH_BLOB_EXCEPTION:
        return getNoSuchBlobException();

      case IO_EXCEPTION:
        return getIoException();

      }
      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 NO_SUCH_BLOB_EXCEPTION:
        return isSetNoSuchBlobException();
      case IO_EXCEPTION:
        return isSetIoException();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof read_result)
        return this.equals((read_result)that);
      return false;
    }

    public boolean equals(read_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_noSuchBlobException = true && this.isSetNoSuchBlobException();
      boolean that_present_noSuchBlobException = true && that.isSetNoSuchBlobException();
      if (this_present_noSuchBlobException || that_present_noSuchBlobException) {
        if (!(this_present_noSuchBlobException && that_present_noSuchBlobException))
          return false;
        if (!this.noSuchBlobException.equals(that.noSuchBlobException))
          return false;
      }

      boolean this_present_ioException = true && this.isSetIoException();
      boolean that_present_ioException = true && that.isSetIoException();
      if (this_present_ioException || that_present_ioException) {
        if (!(this_present_ioException && that_present_ioException))
          return false;
        if (!this.ioException.equals(that.ioException))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(read_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(isSetNoSuchBlobException()).compareTo(other.isSetNoSuchBlobException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNoSuchBlobException()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.noSuchBlobException, other.noSuchBlobException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetIoException()).compareTo(other.isSetIoException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetIoException()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ioException, other.ioException);
        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("read_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("noSuchBlobException:");
      if (this.noSuchBlobException == null) {
        sb.append("null");
      } else {
        sb.append(this.noSuchBlobException);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ioException:");
      if (this.ioException == null) {
        sb.append("null");
      } else {
        sb.append(this.ioException);
      }
      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 read_resultStandardSchemeFactory implements SchemeFactory {
      public read_resultStandardScheme getScheme() {
        return new read_resultStandardScheme();
      }
    }

    private static class read_resultStandardScheme extends StandardScheme<read_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, read_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: // NO_SUCH_BLOB_EXCEPTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.noSuchBlobException = new RemoteNoSuchBlobException();
                struct.noSuchBlobException.read(iprot);
                struct.setNoSuchBlobExceptionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IO_EXCEPTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ioException = new RemoteIOException();
                struct.ioException.read(iprot);
                struct.setIoExceptionIsSet(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, read_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.noSuchBlobException != null) {
          oprot.writeFieldBegin(NO_SUCH_BLOB_EXCEPTION_FIELD_DESC);
          struct.noSuchBlobException.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ioException != null) {
          oprot.writeFieldBegin(IO_EXCEPTION_FIELD_DESC);
          struct.ioException.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class read_resultTupleSchemeFactory implements SchemeFactory {
      public read_resultTupleScheme getScheme() {
        return new read_resultTupleScheme();
      }
    }

    private static class read_resultTupleScheme extends TupleScheme<read_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, read_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetNoSuchBlobException()) {
          optionals.set(1);
        }
        if (struct.isSetIoException()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          oprot.writeBinary(struct.success);
        }
        if (struct.isSetNoSuchBlobException()) {
          struct.noSuchBlobException.write(oprot);
        }
        if (struct.isSetIoException()) {
          struct.ioException.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, read_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = iprot.readBinary();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.noSuchBlobException = new RemoteNoSuchBlobException();
          struct.noSuchBlobException.read(iprot);
          struct.setNoSuchBlobExceptionIsSet(true);
        }
        if (incoming.get(2)) {
          struct.ioException = new RemoteIOException();
          struct.ioException.read(iprot);
          struct.setIoExceptionIsSet(true);
        }
      }
    }

  }

  public static class verify_args implements org.apache.thrift.TBase<verify_args, verify_args._Fields>, java.io.Serializable, Cloneable, Comparable<verify_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("verify_args");

    private static final org.apache.thrift.protocol.TField BLOB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blobId", 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 verify_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new verify_argsTupleSchemeFactory());
    }

    public long blobId; // 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 {
      BLOB_ID((short)1, "blobId");

      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: // BLOB_ID
            return BLOB_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __BLOBID_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.BLOB_ID, new org.apache.thrift.meta_data.FieldMetaData("blobId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "BlobId")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(verify_args.class, metaDataMap);
    }

    public verify_args() {
    }

    public verify_args(
      long blobId)
    {
      this();
      this.blobId = blobId;
      setBlobIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public verify_args(verify_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.blobId = other.blobId;
    }

    public verify_args deepCopy() {
      return new verify_args(this);
    }

    @Override
    public void clear() {
      setBlobIdIsSet(false);
      this.blobId = 0;
    }

    public long getBlobId() {
      return this.blobId;
    }

    public verify_args setBlobId(long blobId) {
      this.blobId = blobId;
      setBlobIdIsSet(true);
      return this;
    }

    public void unsetBlobId() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOBID_ISSET_ID);
    }

    /** Returns true if field blobId is set (has been assigned a value) and false otherwise */
    public boolean isSetBlobId() {
      return EncodingUtils.testBit(__isset_bitfield, __BLOBID_ISSET_ID);
    }

    public void setBlobIdIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOBID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case BLOB_ID:
        if (value == null) {
          unsetBlobId();
        } else {
          setBlobId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case BLOB_ID:
        return Long.valueOf(getBlobId());

      }
      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 BLOB_ID:
        return isSetBlobId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof verify_args)
        return this.equals((verify_args)that);
      return false;
    }

    public boolean equals(verify_args that) {
      if (that == null)
        return false;

      boolean this_present_blobId = true;
      boolean that_present_blobId = true;
      if (this_present_blobId || that_present_blobId) {
        if (!(this_present_blobId && that_present_blobId))
          return false;
        if (this.blobId != that.blobId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(verify_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetBlobId()).compareTo(other.isSetBlobId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBlobId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blobId, other.blobId);
        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("verify_args(");
      boolean first = true;

      sb.append("blobId:");
      sb.append(this.blobId);
      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 verify_argsStandardSchemeFactory implements SchemeFactory {
      public verify_argsStandardScheme getScheme() {
        return new verify_argsStandardScheme();
      }
    }

    private static class verify_argsStandardScheme extends StandardScheme<verify_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, verify_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: // BLOB_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.blobId = iprot.readI64();
                struct.setBlobIdIsSet(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, verify_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(BLOB_ID_FIELD_DESC);
        oprot.writeI64(struct.blobId);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class verify_argsTupleSchemeFactory implements SchemeFactory {
      public verify_argsTupleScheme getScheme() {
        return new verify_argsTupleScheme();
      }
    }

    private static class verify_argsTupleScheme extends TupleScheme<verify_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, verify_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetBlobId()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetBlobId()) {
          oprot.writeI64(struct.blobId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, verify_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.blobId = iprot.readI64();
          struct.setBlobIdIsSet(true);
        }
      }
    }

  }

  public static class verify_result implements org.apache.thrift.TBase<verify_result, verify_result._Fields>, java.io.Serializable, Cloneable, Comparable<verify_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("verify_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField NO_SUCH_BLOB_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("noSuchBlobException", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField IO_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("ioException", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new verify_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new verify_resultTupleSchemeFactory());
    }

    public List<String> success; // required
    public RemoteNoSuchBlobException noSuchBlobException; // required
    public RemoteIOException ioException; // 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"),
      NO_SUCH_BLOB_EXCEPTION((short)1, "noSuchBlobException"),
      IO_EXCEPTION((short)2, "ioException");

      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: // NO_SUCH_BLOB_EXCEPTION
            return NO_SUCH_BLOB_EXCEPTION;
          case 2: // IO_EXCEPTION
            return IO_EXCEPTION;
          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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      tmpMap.put(_Fields.NO_SUCH_BLOB_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("noSuchBlobException", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.IO_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("ioException", 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(verify_result.class, metaDataMap);
    }

    public verify_result() {
    }

    public verify_result(
      List<String> success,
      RemoteNoSuchBlobException noSuchBlobException,
      RemoteIOException ioException)
    {
      this();
      this.success = success;
      this.noSuchBlobException = noSuchBlobException;
      this.ioException = ioException;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public verify_result(verify_result other) {
      if (other.isSetSuccess()) {
        List<String> __this__success = new ArrayList<String>(other.success);
        this.success = __this__success;
      }
      if (other.isSetNoSuchBlobException()) {
        this.noSuchBlobException = new RemoteNoSuchBlobException(other.noSuchBlobException);
      }
      if (other.isSetIoException()) {
        this.ioException = new RemoteIOException(other.ioException);
      }
    }

    public verify_result deepCopy() {
      return new verify_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.noSuchBlobException = null;
      this.ioException = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<String> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(String elem) {
      if (this.success == null) {
        this.success = new ArrayList<String>();
      }
      this.success.add(elem);
    }

    public List<String> getSuccess() {
      return this.success;
    }

    public verify_result setSuccess(List<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 RemoteNoSuchBlobException getNoSuchBlobException() {
      return this.noSuchBlobException;
    }

    public verify_result setNoSuchBlobException(RemoteNoSuchBlobException noSuchBlobException) {
      this.noSuchBlobException = noSuchBlobException;
      return this;
    }

    public void unsetNoSuchBlobException() {
      this.noSuchBlobException = null;
    }

    /** Returns true if field noSuchBlobException is set (has been assigned a value) and false otherwise */
    public boolean isSetNoSuchBlobException() {
      return this.noSuchBlobException != null;
    }

    public void setNoSuchBlobExceptionIsSet(boolean value) {
      if (!value) {
        this.noSuchBlobException = null;
      }
    }

    public RemoteIOException getIoException() {
      return this.ioException;
    }

    public verify_result setIoException(RemoteIOException ioException) {
      this.ioException = ioException;
      return this;
    }

    public void unsetIoException() {
      this.ioException = null;
    }

    /** Returns true if field ioException is set (has been assigned a value) and false otherwise */
    public boolean isSetIoException() {
      return this.ioException != null;
    }

    public void setIoExceptionIsSet(boolean value) {
      if (!value) {
        this.ioException = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<String>)value);
        }
        break;

      case NO_SUCH_BLOB_EXCEPTION:
        if (value == null) {
          unsetNoSuchBlobException();
        } else {
          setNoSuchBlobException((RemoteNoSuchBlobException)value);
        }
        break;

      case IO_EXCEPTION:
        if (value == null) {
          unsetIoException();
        } else {
          setIoException((RemoteIOException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case NO_SUCH_BLOB_EXCEPTION:
        return getNoSuchBlobException();

      case IO_EXCEPTION:
        return getIoException();

      }
      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 NO_SUCH_BLOB_EXCEPTION:
        return isSetNoSuchBlobException();
      case IO_EXCEPTION:
        return isSetIoException();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof verify_result)
        return this.equals((verify_result)that);
      return false;
    }

    public boolean equals(verify_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_noSuchBlobException = true && this.isSetNoSuchBlobException();
      boolean that_present_noSuchBlobException = true && that.isSetNoSuchBlobException();
      if (this_present_noSuchBlobException || that_present_noSuchBlobException) {
        if (!(this_present_noSuchBlobException && that_present_noSuchBlobException))
          return false;
        if (!this.noSuchBlobException.equals(that.noSuchBlobException))
          return false;
      }

      boolean this_present_ioException = true && this.isSetIoException();
      boolean that_present_ioException = true && that.isSetIoException();
      if (this_present_ioException || that_present_ioException) {
        if (!(this_present_ioException && that_present_ioException))
          return false;
        if (!this.ioException.equals(that.ioException))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(verify_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(isSetNoSuchBlobException()).compareTo(other.isSetNoSuchBlobException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNoSuchBlobException()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.noSuchBlobException, other.noSuchBlobException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetIoException()).compareTo(other.isSetIoException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetIoException()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ioException, other.ioException);
        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("verify_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("noSuchBlobException:");
      if (this.noSuchBlobException == null) {
        sb.append("null");
      } else {
        sb.append(this.noSuchBlobException);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ioException:");
      if (this.ioException == null) {
        sb.append("null");
      } else {
        sb.append(this.ioException);
      }
      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 verify_resultStandardSchemeFactory implements SchemeFactory {
      public verify_resultStandardScheme getScheme() {
        return new verify_resultStandardScheme();
      }
    }

    private static class verify_resultStandardScheme extends StandardScheme<verify_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, verify_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.LIST) {
                {
                  org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
                  struct.success = new ArrayList<String>(_list0.size);
                  for (int _i1 = 0; _i1 < _list0.size; ++_i1)
                  {
                    String _elem2;
                    _elem2 = iprot.readString();
                    struct.success.add(_elem2);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // NO_SUCH_BLOB_EXCEPTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.noSuchBlobException = new RemoteNoSuchBlobException();
                struct.noSuchBlobException.read(iprot);
                struct.setNoSuchBlobExceptionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IO_EXCEPTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ioException = new RemoteIOException();
                struct.ioException.read(iprot);
                struct.setIoExceptionIsSet(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, verify_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
            for (String _iter3 : struct.success)
            {
              oprot.writeString(_iter3);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.noSuchBlobException != null) {
          oprot.writeFieldBegin(NO_SUCH_BLOB_EXCEPTION_FIELD_DESC);
          struct.noSuchBlobException.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ioException != null) {
          oprot.writeFieldBegin(IO_EXCEPTION_FIELD_DESC);
          struct.ioException.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class verify_resultTupleSchemeFactory implements SchemeFactory {
      public verify_resultTupleScheme getScheme() {
        return new verify_resultTupleScheme();
      }
    }

    private static class verify_resultTupleScheme extends TupleScheme<verify_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, verify_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetNoSuchBlobException()) {
          optionals.set(1);
        }
        if (struct.isSetIoException()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (String _iter4 : struct.success)
            {
              oprot.writeString(_iter4);
            }
          }
        }
        if (struct.isSetNoSuchBlobException()) {
          struct.noSuchBlobException.write(oprot);
        }
        if (struct.isSetIoException()) {
          struct.ioException.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, verify_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.success = new ArrayList<String>(_list5.size);
            for (int _i6 = 0; _i6 < _list5.size; ++_i6)
            {
              String _elem7;
              _elem7 = iprot.readString();
              struct.success.add(_elem7);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.noSuchBlobException = new RemoteNoSuchBlobException();
          struct.noSuchBlobException.read(iprot);
          struct.setNoSuchBlobExceptionIsSet(true);
        }
        if (incoming.get(2)) {
          struct.ioException = new RemoteIOException();
          struct.ioException.read(iprot);
          struct.setIoExceptionIsSet(true);
        }
      }
    }

  }

  public static class beginTx_args implements org.apache.thrift.TBase<beginTx_args, beginTx_args._Fields>, java.io.Serializable, Cloneable, Comparable<beginTx_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("beginTx_args");


    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new beginTx_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new beginTx_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(beginTx_args.class, metaDataMap);
    }

    public beginTx_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public beginTx_args(beginTx_args other) {
    }

    public beginTx_args deepCopy() {
      return new beginTx_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 beginTx_args)
        return this.equals((beginTx_args)that);
      return false;
    }

    public boolean equals(beginTx_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(beginTx_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("beginTx_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 beginTx_argsStandardSchemeFactory implements SchemeFactory {
      public beginTx_argsStandardScheme getScheme() {
        return new beginTx_argsStandardScheme();
      }
    }

    private static class beginTx_argsStandardScheme extends StandardScheme<beginTx_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, beginTx_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, beginTx_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class beginTx_argsTupleSchemeFactory implements SchemeFactory {
      public beginTx_argsTupleScheme getScheme() {
        return new beginTx_argsTupleScheme();
      }
    }

    private static class beginTx_argsTupleScheme extends TupleScheme<beginTx_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, beginTx_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, beginTx_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

  public static class beginTx_result implements org.apache.thrift.TBase<beginTx_result, beginTx_result._Fields>, java.io.Serializable, Cloneable, Comparable<beginTx_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("beginTx_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new beginTx_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new beginTx_resultTupleSchemeFactory());
    }

    public long success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_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.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.I64          , "BlobTxId")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(beginTx_result.class, metaDataMap);
    }

    public beginTx_result() {
    }

    public beginTx_result(
      long success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public beginTx_result(beginTx_result other) {
      __isset_bitfield = other.__isset_bitfield;
      this.success = other.success;
    }

    public beginTx_result deepCopy() {
      return new beginTx_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
    }

    public long getSuccess() {
      return this.success;
    }

    public beginTx_result setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
      return this;
    }

    public void unsetSuccess() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Long.valueOf(getSuccess());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof beginTx_result)
        return this.equals((beginTx_result)that);
      return false;
    }

    public boolean equals(beginTx_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(beginTx_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;
        }
      }
      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("beginTx_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    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 beginTx_resultStandardSchemeFactory implements SchemeFactory {
      public beginTx_resultStandardScheme getScheme() {
        return new beginTx_resultStandardScheme();
      }
    }

    private static class beginTx_resultStandardScheme extends StandardScheme<beginTx_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, beginTx_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.I64) {
                struct.success = iprot.readI64();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, beginTx_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.isSetSuccess()) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeI64(struct.success);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class beginTx_resultTupleSchemeFactory implements SchemeFactory {
      public beginTx_resultTupleScheme getScheme() {
        return new beginTx_resultTupleScheme();
      }
    }

    private static class beginTx_resultTupleScheme extends TupleScheme<beginTx_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, beginTx_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          oprot.writeI64(struct.success);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, beginTx_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = iprot.readI64();
          struct.setSuccessIsSet(true);
        }
      }
    }

  }

  public static class commitTx_args implements org.apache.thrift.TBase<commitTx_args, commitTx_args._Fields>, java.io.Serializable, Cloneable, Comparable<commitTx_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("commitTx_args");

    private static final org.apache.thrift.protocol.TField TX_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("txId", 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 commitTx_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new commitTx_argsTupleSchemeFactory());
    }

    public long txId; // 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 {
      TX_ID((short)1, "txId");

      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: // TX_ID
            return TX_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __TXID_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.TX_ID, new org.apache.thrift.meta_data.FieldMetaData("txId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "BlobTxId")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(commitTx_args.class, metaDataMap);
    }

    public commitTx_args() {
    }

    public commitTx_args(
      long txId)
    {
      this();
      this.txId = txId;
      setTxIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public commitTx_args(commitTx_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.txId = other.txId;
    }

    public commitTx_args deepCopy() {
      return new commitTx_args(this);
    }

    @Override
    public void clear() {
      setTxIdIsSet(false);
      this.txId = 0;
    }

    public long getTxId() {
      return this.txId;
    }

    public commitTx_args setTxId(long txId) {
      this.txId = txId;
      setTxIdIsSet(true);
      return this;
    }

    public void unsetTxId() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXID_ISSET_ID);
    }

    /** Returns true if field txId is set (has been assigned a value) and false otherwise */
    public boolean isSetTxId() {
      return EncodingUtils.testBit(__isset_bitfield, __TXID_ISSET_ID);
    }

    public void setTxIdIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case TX_ID:
        if (value == null) {
          unsetTxId();
        } else {
          setTxId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case TX_ID:
        return Long.valueOf(getTxId());

      }
      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 TX_ID:
        return isSetTxId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof commitTx_args)
        return this.equals((commitTx_args)that);
      return false;
    }

    public boolean equals(commitTx_args that) {
      if (that == null)
        return false;

      boolean this_present_txId = true;
      boolean that_present_txId = true;
      if (this_present_txId || that_present_txId) {
        if (!(this_present_txId && that_present_txId))
          return false;
        if (this.txId != that.txId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(commitTx_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetTxId()).compareTo(other.isSetTxId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTxId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txId, other.txId);
        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("commitTx_args(");
      boolean first = true;

      sb.append("txId:");
      sb.append(this.txId);
      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 commitTx_argsStandardSchemeFactory implements SchemeFactory {
      public commitTx_argsStandardScheme getScheme() {
        return new commitTx_argsStandardScheme();
      }
    }

    private static class commitTx_argsStandardScheme extends StandardScheme<commitTx_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, commitTx_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: // TX_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.txId = iprot.readI64();
                struct.setTxIdIsSet(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, commitTx_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(TX_ID_FIELD_DESC);
        oprot.writeI64(struct.txId);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class commitTx_argsTupleSchemeFactory implements SchemeFactory {
      public commitTx_argsTupleScheme getScheme() {
        return new commitTx_argsTupleScheme();
      }
    }

    private static class commitTx_argsTupleScheme extends TupleScheme<commitTx_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, commitTx_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetTxId()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetTxId()) {
          oprot.writeI64(struct.txId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, commitTx_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.txId = iprot.readI64();
          struct.setTxIdIsSet(true);
        }
      }
    }

  }

  public static class commitTx_result implements org.apache.thrift.TBase<commitTx_result, commitTx_result._Fields>, java.io.Serializable, Cloneable, Comparable<commitTx_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("commitTx_result");


    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new commitTx_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new commitTx_resultTupleSchemeFactory());
    }


    /** 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(commitTx_result.class, metaDataMap);
    }

    public commitTx_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public commitTx_result(commitTx_result other) {
    }

    public commitTx_result deepCopy() {
      return new commitTx_result(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 commitTx_result)
        return this.equals((commitTx_result)that);
      return false;
    }

    public boolean equals(commitTx_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(commitTx_result 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("commitTx_result(");
      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 commitTx_resultStandardSchemeFactory implements SchemeFactory {
      public commitTx_resultStandardScheme getScheme() {
        return new commitTx_resultStandardScheme();
      }
    }

    private static class commitTx_resultStandardScheme extends StandardScheme<commitTx_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, commitTx_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) {
            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, commitTx_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class commitTx_resultTupleSchemeFactory implements SchemeFactory {
      public commitTx_resultTupleScheme getScheme() {
        return new commitTx_resultTupleScheme();
      }
    }

    private static class commitTx_resultTupleScheme extends TupleScheme<commitTx_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, commitTx_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, commitTx_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

  public static class rollbackTx_args implements org.apache.thrift.TBase<rollbackTx_args, rollbackTx_args._Fields>, java.io.Serializable, Cloneable, Comparable<rollbackTx_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rollbackTx_args");

    private static final org.apache.thrift.protocol.TField TX_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("txId", 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 rollbackTx_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new rollbackTx_argsTupleSchemeFactory());
    }

    public long txId; // 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 {
      TX_ID((short)1, "txId");

      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: // TX_ID
            return TX_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __TXID_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.TX_ID, new org.apache.thrift.meta_data.FieldMetaData("txId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "BlobTxId")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(rollbackTx_args.class, metaDataMap);
    }

    public rollbackTx_args() {
    }

    public rollbackTx_args(
      long txId)
    {
      this();
      this.txId = txId;
      setTxIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public rollbackTx_args(rollbackTx_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.txId = other.txId;
    }

    public rollbackTx_args deepCopy() {
      return new rollbackTx_args(this);
    }

    @Override
    public void clear() {
      setTxIdIsSet(false);
      this.txId = 0;
    }

    public long getTxId() {
      return this.txId;
    }

    public rollbackTx_args setTxId(long txId) {
      this.txId = txId;
      setTxIdIsSet(true);
      return this;
    }

    public void unsetTxId() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXID_ISSET_ID);
    }

    /** Returns true if field txId is set (has been assigned a value) and false otherwise */
    public boolean isSetTxId() {
      return EncodingUtils.testBit(__isset_bitfield, __TXID_ISSET_ID);
    }

    public void setTxIdIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case TX_ID:
        if (value == null) {
          unsetTxId();
        } else {
          setTxId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case TX_ID:
        return Long.valueOf(getTxId());

      }
      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 TX_ID:
        return isSetTxId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof rollbackTx_args)
        return this.equals((rollbackTx_args)that);
      return false;
    }

    public boolean equals(rollbackTx_args that) {
      if (that == null)
        return false;

      boolean this_present_txId = true;
      boolean that_present_txId = true;
      if (this_present_txId || that_present_txId) {
        if (!(this_present_txId && that_present_txId))
          return false;
        if (this.txId != that.txId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(rollbackTx_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetTxId()).compareTo(other.isSetTxId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTxId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txId, other.txId);
        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("rollbackTx_args(");
      boolean first = true;

      sb.append("txId:");
      sb.append(this.txId);
      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 rollbackTx_argsStandardSchemeFactory implements SchemeFactory {
      public rollbackTx_argsStandardScheme getScheme() {
        return new rollbackTx_argsStandardScheme();
      }
    }

    private static class rollbackTx_argsStandardScheme extends StandardScheme<rollbackTx_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, rollbackTx_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: // TX_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.txId = iprot.readI64();
                struct.setTxIdIsSet(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, rollbackTx_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(TX_ID_FIELD_DESC);
        oprot.writeI64(struct.txId);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class rollbackTx_argsTupleSchemeFactory implements SchemeFactory {
      public rollbackTx_argsTupleScheme getScheme() {
        return new rollbackTx_argsTupleScheme();
      }
    }

    private static class rollbackTx_argsTupleScheme extends TupleScheme<rollbackTx_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, rollbackTx_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetTxId()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetTxId()) {
          oprot.writeI64(struct.txId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, rollbackTx_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.txId = iprot.readI64();
          struct.setTxIdIsSet(true);
        }
      }
    }

  }

  public static class rollbackTx_result implements org.apache.thrift.TBase<rollbackTx_result, rollbackTx_result._Fields>, java.io.Serializable, Cloneable, Comparable<rollbackTx_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rollbackTx_result");


    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new rollbackTx_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new rollbackTx_resultTupleSchemeFactory());
    }


    /** 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(rollbackTx_result.class, metaDataMap);
    }

    public rollbackTx_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public rollbackTx_result(rollbackTx_result other) {
    }

    public rollbackTx_result deepCopy() {
      return new rollbackTx_result(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 rollbackTx_result)
        return this.equals((rollbackTx_result)that);
      return false;
    }

    public boolean equals(rollbackTx_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(rollbackTx_result 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("rollbackTx_result(");
      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 rollbackTx_resultStandardSchemeFactory implements SchemeFactory {
      public rollbackTx_resultStandardScheme getScheme() {
        return new rollbackTx_resultStandardScheme();
      }
    }

    private static class rollbackTx_resultStandardScheme extends StandardScheme<rollbackTx_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, rollbackTx_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) {
            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, rollbackTx_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class rollbackTx_resultTupleSchemeFactory implements SchemeFactory {
      public rollbackTx_resultTupleScheme getScheme() {
        return new rollbackTx_resultTupleScheme();
      }
    }

    private static class rollbackTx_resultTupleScheme extends TupleScheme<rollbackTx_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, rollbackTx_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, rollbackTx_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

  public static class prepareTx_args implements org.apache.thrift.TBase<prepareTx_args, prepareTx_args._Fields>, java.io.Serializable, Cloneable, Comparable<prepareTx_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("prepareTx_args");

    private static final org.apache.thrift.protocol.TField TX_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("txId", 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 prepareTx_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new prepareTx_argsTupleSchemeFactory());
    }

    public long txId; // 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 {
      TX_ID((short)1, "txId");

      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: // TX_ID
            return TX_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __TXID_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.TX_ID, new org.apache.thrift.meta_data.FieldMetaData("txId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "BlobTxId")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(prepareTx_args.class, metaDataMap);
    }

    public prepareTx_args() {
    }

    public prepareTx_args(
      long txId)
    {
      this();
      this.txId = txId;
      setTxIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public prepareTx_args(prepareTx_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.txId = other.txId;
    }

    public prepareTx_args deepCopy() {
      return new prepareTx_args(this);
    }

    @Override
    public void clear() {
      setTxIdIsSet(false);
      this.txId = 0;
    }

    public long getTxId() {
      return this.txId;
    }

    public prepareTx_args setTxId(long txId) {
      this.txId = txId;
      setTxIdIsSet(true);
      return this;
    }

    public void unsetTxId() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXID_ISSET_ID);
    }

    /** Returns true if field txId is set (has been assigned a value) and false otherwise */
    public boolean isSetTxId() {
      return EncodingUtils.testBit(__isset_bitfield, __TXID_ISSET_ID);
    }

    public void setTxIdIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case TX_ID:
        if (value == null) {
          unsetTxId();
        } else {
          setTxId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case TX_ID:
        return Long.valueOf(getTxId());

      }
      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 TX_ID:
        return isSetTxId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof prepareTx_args)
        return this.equals((prepareTx_args)that);
      return false;
    }

    public boolean equals(prepareTx_args that) {
      if (that == null)
        return false;

      boolean this_present_txId = true;
      boolean that_present_txId = true;
      if (this_present_txId || that_present_txId) {
        if (!(this_present_txId && that_present_txId))
          return false;
        if (this.txId != that.txId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(prepareTx_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetTxId()).compareTo(other.isSetTxId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTxId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txId, other.txId);
        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("prepareTx_args(");
      boolean first = true;

      sb.append("txId:");
      sb.append(this.txId);
      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 prepareTx_argsStandardSchemeFactory implements SchemeFactory {
      public prepareTx_argsStandardScheme getScheme() {
        return new prepareTx_argsStandardScheme();
      }
    }

    private static class prepareTx_argsStandardScheme extends StandardScheme<prepareTx_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, prepareTx_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: // TX_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.txId = iprot.readI64();
                struct.setTxIdIsSet(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, prepareTx_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(TX_ID_FIELD_DESC);
        oprot.writeI64(struct.txId);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class prepareTx_argsTupleSchemeFactory implements SchemeFactory {
      public prepareTx_argsTupleScheme getScheme() {
        return new prepareTx_argsTupleScheme();
      }
    }

    private static class prepareTx_argsTupleScheme extends TupleScheme<prepareTx_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, prepareTx_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetTxId()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetTxId()) {
          oprot.writeI64(struct.txId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, prepareTx_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.txId = iprot.readI64();
          struct.setTxIdIsSet(true);
        }
      }
    }

  }

  public static class prepareTx_result implements org.apache.thrift.TBase<prepareTx_result, prepareTx_result._Fields>, java.io.Serializable, Cloneable, Comparable<prepareTx_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("prepareTx_result");


    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new prepareTx_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new prepareTx_resultTupleSchemeFactory());
    }


    /** 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(prepareTx_result.class, metaDataMap);
    }

    public prepareTx_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public prepareTx_result(prepareTx_result other) {
    }

    public prepareTx_result deepCopy() {
      return new prepareTx_result(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 prepareTx_result)
        return this.equals((prepareTx_result)that);
      return false;
    }

    public boolean equals(prepareTx_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(prepareTx_result 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("prepareTx_result(");
      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 prepareTx_resultStandardSchemeFactory implements SchemeFactory {
      public prepareTx_resultStandardScheme getScheme() {
        return new prepareTx_resultStandardScheme();
      }
    }

    private static class prepareTx_resultStandardScheme extends StandardScheme<prepareTx_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, prepareTx_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) {
            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, prepareTx_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class prepareTx_resultTupleSchemeFactory implements SchemeFactory {
      public prepareTx_resultTupleScheme getScheme() {
        return new prepareTx_resultTupleScheme();
      }
    }

    private static class prepareTx_resultTupleScheme extends TupleScheme<prepareTx_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, prepareTx_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, prepareTx_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

  public static class beginPut_args implements org.apache.thrift.TBase<beginPut_args, beginPut_args._Fields>, java.io.Serializable, Cloneable, Comparable<beginPut_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("beginPut_args");

    private static final org.apache.thrift.protocol.TField TX_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("txId", 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 beginPut_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new beginPut_argsTupleSchemeFactory());
    }

    public long txId; // 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 {
      TX_ID((short)1, "txId");

      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: // TX_ID
            return TX_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __TXID_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.TX_ID, new org.apache.thrift.meta_data.FieldMetaData("txId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "BlobTxId")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(beginPut_args.class, metaDataMap);
    }

    public beginPut_args() {
    }

    public beginPut_args(
      long txId)
    {
      this();
      this.txId = txId;
      setTxIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public beginPut_args(beginPut_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.txId = other.txId;
    }

    public beginPut_args deepCopy() {
      return new beginPut_args(this);
    }

    @Override
    public void clear() {
      setTxIdIsSet(false);
      this.txId = 0;
    }

    public long getTxId() {
      return this.txId;
    }

    public beginPut_args setTxId(long txId) {
      this.txId = txId;
      setTxIdIsSet(true);
      return this;
    }

    public void unsetTxId() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXID_ISSET_ID);
    }

    /** Returns true if field txId is set (has been assigned a value) and false otherwise */
    public boolean isSetTxId() {
      return EncodingUtils.testBit(__isset_bitfield, __TXID_ISSET_ID);
    }

    public void setTxIdIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case TX_ID:
        if (value == null) {
          unsetTxId();
        } else {
          setTxId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case TX_ID:
        return Long.valueOf(getTxId());

      }
      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 TX_ID:
        return isSetTxId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof beginPut_args)
        return this.equals((beginPut_args)that);
      return false;
    }

    public boolean equals(beginPut_args that) {
      if (that == null)
        return false;

      boolean this_present_txId = true;
      boolean that_present_txId = true;
      if (this_present_txId || that_present_txId) {
        if (!(this_present_txId && that_present_txId))
          return false;
        if (this.txId != that.txId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(beginPut_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetTxId()).compareTo(other.isSetTxId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTxId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txId, other.txId);
        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("beginPut_args(");
      boolean first = true;

      sb.append("txId:");
      sb.append(this.txId);
      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 beginPut_argsStandardSchemeFactory implements SchemeFactory {
      public beginPut_argsStandardScheme getScheme() {
        return new beginPut_argsStandardScheme();
      }
    }

    private static class beginPut_argsStandardScheme extends StandardScheme<beginPut_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, beginPut_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: // TX_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.txId = iprot.readI64();
                struct.setTxIdIsSet(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, beginPut_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(TX_ID_FIELD_DESC);
        oprot.writeI64(struct.txId);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class beginPut_argsTupleSchemeFactory implements SchemeFactory {
      public beginPut_argsTupleScheme getScheme() {
        return new beginPut_argsTupleScheme();
      }
    }

    private static class beginPut_argsTupleScheme extends TupleScheme<beginPut_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, beginPut_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetTxId()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetTxId()) {
          oprot.writeI64(struct.txId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, beginPut_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.txId = iprot.readI64();
          struct.setTxIdIsSet(true);
        }
      }
    }

  }

  public static class beginPut_result implements org.apache.thrift.TBase<beginPut_result, beginPut_result._Fields>, java.io.Serializable, Cloneable, Comparable<beginPut_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("beginPut_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new beginPut_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new beginPut_resultTupleSchemeFactory());
    }

    public long success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_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.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.I64          , "PutHandle")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(beginPut_result.class, metaDataMap);
    }

    public beginPut_result() {
    }

    public beginPut_result(
      long success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public beginPut_result(beginPut_result other) {
      __isset_bitfield = other.__isset_bitfield;
      this.success = other.success;
    }

    public beginPut_result deepCopy() {
      return new beginPut_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
    }

    public long getSuccess() {
      return this.success;
    }

    public beginPut_result setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
      return this;
    }

    public void unsetSuccess() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Long.valueOf(getSuccess());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof beginPut_result)
        return this.equals((beginPut_result)that);
      return false;
    }

    public boolean equals(beginPut_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(beginPut_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;
        }
      }
      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("beginPut_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    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 beginPut_resultStandardSchemeFactory implements SchemeFactory {
      public beginPut_resultStandardScheme getScheme() {
        return new beginPut_resultStandardScheme();
      }
    }

    private static class beginPut_resultStandardScheme extends StandardScheme<beginPut_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, beginPut_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.I64) {
                struct.success = iprot.readI64();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, beginPut_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.isSetSuccess()) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeI64(struct.success);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class beginPut_resultTupleSchemeFactory implements SchemeFactory {
      public beginPut_resultTupleScheme getScheme() {
        return new beginPut_resultTupleScheme();
      }
    }

    private static class beginPut_resultTupleScheme extends TupleScheme<beginPut_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, beginPut_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          oprot.writeI64(struct.success);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, beginPut_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = iprot.readI64();
          struct.setSuccessIsSet(true);
        }
      }
    }

  }

  public static class write_args implements org.apache.thrift.TBase<write_args, write_args._Fields>, java.io.Serializable, Cloneable, Comparable<write_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("write_args");

    private static final org.apache.thrift.protocol.TField HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("handle", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", 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 write_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new write_argsTupleSchemeFactory());
    }

    public long handle; // required
    public ByteBuffer data; // 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 {
      HANDLE((short)1, "handle"),
      DATA((short)2, "data");

      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: // HANDLE
            return HANDLE;
          case 2: // DATA
            return DATA;
          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 __HANDLE_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.HANDLE, new org.apache.thrift.meta_data.FieldMetaData("handle", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "PutHandle")));
      tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , true)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(write_args.class, metaDataMap);
    }

    public write_args() {
    }

    public write_args(
      long handle,
      ByteBuffer data)
    {
      this();
      this.handle = handle;
      setHandleIsSet(true);
      this.data = data;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public write_args(write_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.handle = other.handle;
      if (other.isSetData()) {
        this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data);
;
      }
    }

    public write_args deepCopy() {
      return new write_args(this);
    }

    @Override
    public void clear() {
      setHandleIsSet(false);
      this.handle = 0;
      this.data = null;
    }

    public long getHandle() {
      return this.handle;
    }

    public write_args setHandle(long handle) {
      this.handle = handle;
      setHandleIsSet(true);
      return this;
    }

    public void unsetHandle() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HANDLE_ISSET_ID);
    }

    /** Returns true if field handle is set (has been assigned a value) and false otherwise */
    public boolean isSetHandle() {
      return EncodingUtils.testBit(__isset_bitfield, __HANDLE_ISSET_ID);
    }

    public void setHandleIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HANDLE_ISSET_ID, value);
    }

    public byte[] getData() {
      setData(org.apache.thrift.TBaseHelper.rightSize(data));
      return data == null ? null : data.array();
    }

    public ByteBuffer bufferForData() {
      return data;
    }

    public write_args setData(byte[] data) {
      setData(data == null ? (ByteBuffer)null : ByteBuffer.wrap(data));
      return this;
    }

    public write_args setData(ByteBuffer data) {
      this.data = data;
      return this;
    }

    public void unsetData() {
      this.data = null;
    }

    /** Returns true if field data is set (has been assigned a value) and false otherwise */
    public boolean isSetData() {
      return this.data != null;
    }

    public void setDataIsSet(boolean value) {
      if (!value) {
        this.data = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case HANDLE:
        if (value == null) {
          unsetHandle();
        } else {
          setHandle((Long)value);
        }
        break;

      case DATA:
        if (value == null) {
          unsetData();
        } else {
          setData((ByteBuffer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case HANDLE:
        return Long.valueOf(getHandle());

      case DATA:
        return getData();

      }
      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 HANDLE:
        return isSetHandle();
      case DATA:
        return isSetData();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof write_args)
        return this.equals((write_args)that);
      return false;
    }

    public boolean equals(write_args that) {
      if (that == null)
        return false;

      boolean this_present_handle = true;
      boolean that_present_handle = true;
      if (this_present_handle || that_present_handle) {
        if (!(this_present_handle && that_present_handle))
          return false;
        if (this.handle != that.handle)
          return false;
      }

      boolean this_present_data = true && this.isSetData();
      boolean that_present_data = true && that.isSetData();
      if (this_present_data || that_present_data) {
        if (!(this_present_data && that_present_data))
          return false;
        if (!this.data.equals(that.data))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(write_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetHandle()).compareTo(other.isSetHandle());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetHandle()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.handle, other.handle);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetData()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data);
        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("write_args(");
      boolean first = true;

      sb.append("handle:");
      sb.append(this.handle);
      first = false;
      if (!first) sb.append(", ");
      sb.append("data:");
      if (this.data == null) {
        sb.append("null");
      } else {
        org.apache.thrift.TBaseHelper.toString(this.data, sb);
      }
      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 write_argsStandardSchemeFactory implements SchemeFactory {
      public write_argsStandardScheme getScheme() {
        return new write_argsStandardScheme();
      }
    }

    private static class write_argsStandardScheme extends StandardScheme<write_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, write_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: // HANDLE
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.handle = iprot.readI64();
                struct.setHandleIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // DATA
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.data = iprot.readBinary();
                struct.setDataIsSet(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, write_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(HANDLE_FIELD_DESC);
        oprot.writeI64(struct.handle);
        oprot.writeFieldEnd();
        if (struct.data != null) {
          oprot.writeFieldBegin(DATA_FIELD_DESC);
          oprot.writeBinary(struct.data);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class write_argsTupleSchemeFactory implements SchemeFactory {
      public write_argsTupleScheme getScheme() {
        return new write_argsTupleScheme();
      }
    }

    private static class write_argsTupleScheme extends TupleScheme<write_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, write_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetHandle()) {
          optionals.set(0);
        }
        if (struct.isSetData()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetHandle()) {
          oprot.writeI64(struct.handle);
        }
        if (struct.isSetData()) {
          oprot.writeBinary(struct.data);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, write_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.handle = iprot.readI64();
          struct.setHandleIsSet(true);
        }
        if (incoming.get(1)) {
          struct.data = iprot.readBinary();
          struct.setDataIsSet(true);
        }
      }
    }

  }

  public static class write_result implements org.apache.thrift.TBase<write_result, write_result._Fields>, java.io.Serializable, Cloneable, Comparable<write_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("write_result");


    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new write_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new write_resultTupleSchemeFactory());
    }


    /** 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(write_result.class, metaDataMap);
    }

    public write_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public write_result(write_result other) {
    }

    public write_result deepCopy() {
      return new write_result(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 write_result)
        return this.equals((write_result)that);
      return false;
    }

    public boolean equals(write_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(write_result 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("write_result(");
      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 write_resultStandardSchemeFactory implements SchemeFactory {
      public write_resultStandardScheme getScheme() {
        return new write_resultStandardScheme();
      }
    }

    private static class write_resultStandardScheme extends StandardScheme<write_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, write_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) {
            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, write_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class write_resultTupleSchemeFactory implements SchemeFactory {
      public write_resultTupleScheme getScheme() {
        return new write_resultTupleScheme();
      }
    }

    private static class write_resultTupleScheme extends TupleScheme<write_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, write_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, write_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

  public static class finishPut_args implements org.apache.thrift.TBase<finishPut_args, finishPut_args._Fields>, java.io.Serializable, Cloneable, Comparable<finishPut_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("finishPut_args");

    private static final org.apache.thrift.protocol.TField HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("handle", 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 finishPut_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new finishPut_argsTupleSchemeFactory());
    }

    public long handle; // 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 {
      HANDLE((short)1, "handle");

      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: // HANDLE
            return HANDLE;
          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 __HANDLE_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.HANDLE, new org.apache.thrift.meta_data.FieldMetaData("handle", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "PutHandle")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(finishPut_args.class, metaDataMap);
    }

    public finishPut_args() {
    }

    public finishPut_args(
      long handle)
    {
      this();
      this.handle = handle;
      setHandleIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public finishPut_args(finishPut_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.handle = other.handle;
    }

    public finishPut_args deepCopy() {
      return new finishPut_args(this);
    }

    @Override
    public void clear() {
      setHandleIsSet(false);
      this.handle = 0;
    }

    public long getHandle() {
      return this.handle;
    }

    public finishPut_args setHandle(long handle) {
      this.handle = handle;
      setHandleIsSet(true);
      return this;
    }

    public void unsetHandle() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HANDLE_ISSET_ID);
    }

    /** Returns true if field handle is set (has been assigned a value) and false otherwise */
    public boolean isSetHandle() {
      return EncodingUtils.testBit(__isset_bitfield, __HANDLE_ISSET_ID);
    }

    public void setHandleIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HANDLE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case HANDLE:
        if (value == null) {
          unsetHandle();
        } else {
          setHandle((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case HANDLE:
        return Long.valueOf(getHandle());

      }
      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 HANDLE:
        return isSetHandle();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof finishPut_args)
        return this.equals((finishPut_args)that);
      return false;
    }

    public boolean equals(finishPut_args that) {
      if (that == null)
        return false;

      boolean this_present_handle = true;
      boolean that_present_handle = true;
      if (this_present_handle || that_present_handle) {
        if (!(this_present_handle && that_present_handle))
          return false;
        if (this.handle != that.handle)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(finishPut_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetHandle()).compareTo(other.isSetHandle());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetHandle()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.handle, other.handle);
        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("finishPut_args(");
      boolean first = true;

      sb.append("handle:");
      sb.append(this.handle);
      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 finishPut_argsStandardSchemeFactory implements SchemeFactory {
      public finishPut_argsStandardScheme getScheme() {
        return new finishPut_argsStandardScheme();
      }
    }

    private static class finishPut_argsStandardScheme extends StandardScheme<finishPut_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, finishPut_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: // HANDLE
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.handle = iprot.readI64();
                struct.setHandleIsSet(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, finishPut_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(HANDLE_FIELD_DESC);
        oprot.writeI64(struct.handle);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class finishPut_argsTupleSchemeFactory implements SchemeFactory {
      public finishPut_argsTupleScheme getScheme() {
        return new finishPut_argsTupleScheme();
      }
    }

    private static class finishPut_argsTupleScheme extends TupleScheme<finishPut_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, finishPut_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetHandle()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetHandle()) {
          oprot.writeI64(struct.handle);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, finishPut_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.handle = iprot.readI64();
          struct.setHandleIsSet(true);
        }
      }
    }

  }

  public static class finishPut_result implements org.apache.thrift.TBase<finishPut_result, finishPut_result._Fields>, java.io.Serializable, Cloneable, Comparable<finishPut_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("finishPut_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new finishPut_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new finishPut_resultTupleSchemeFactory());
    }

    public long success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_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.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.I64          , "BlobId")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(finishPut_result.class, metaDataMap);
    }

    public finishPut_result() {
    }

    public finishPut_result(
      long success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public finishPut_result(finishPut_result other) {
      __isset_bitfield = other.__isset_bitfield;
      this.success = other.success;
    }

    public finishPut_result deepCopy() {
      return new finishPut_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
    }

    public long getSuccess() {
      return this.success;
    }

    public finishPut_result setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
      return this;
    }

    public void unsetSuccess() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Long.valueOf(getSuccess());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof finishPut_result)
        return this.equals((finishPut_result)that);
      return false;
    }

    public boolean equals(finishPut_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(finishPut_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;
        }
      }
      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("finishPut_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    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 finishPut_resultStandardSchemeFactory implements SchemeFactory {
      public finishPut_resultStandardScheme getScheme() {
        return new finishPut_resultStandardScheme();
      }
    }

    private static class finishPut_resultStandardScheme extends StandardScheme<finishPut_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, finishPut_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.I64) {
                struct.success = iprot.readI64();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, finishPut_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.isSetSuccess()) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeI64(struct.success);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class finishPut_resultTupleSchemeFactory implements SchemeFactory {
      public finishPut_resultTupleScheme getScheme() {
        return new finishPut_resultTupleScheme();
      }
    }

    private static class finishPut_resultTupleScheme extends TupleScheme<finishPut_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, finishPut_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          oprot.writeI64(struct.success);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, finishPut_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = iprot.readI64();
          struct.setSuccessIsSet(true);
        }
      }
    }

  }

}