/**
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package tachyon.thrift;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import 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 WorkerService {
public interface Iface {
public void accessBlock(long blockId) throws org.apache.thrift.TException;
public void addCheckpoint(long userId, int fileId) throws FileDoesNotExistException, SuspectedFileSizeException, FailedToCheckpointException, BlockInfoException, org.apache.thrift.TException;
public boolean asyncCheckpoint(int fileId) throws TachyonException, org.apache.thrift.TException;
public void cacheBlock(long userId, long blockId) throws FileDoesNotExistException, SuspectedFileSizeException, BlockInfoException, org.apache.thrift.TException;
public String getDataFolder() throws org.apache.thrift.TException;
public String getUserTempFolder(long userId) throws org.apache.thrift.TException;
public String getUserUnderfsTempFolder(long userId) throws org.apache.thrift.TException;
public void lockBlock(long blockId, long userId) throws org.apache.thrift.TException;
public void returnSpace(long userId, long returnedBytes) throws org.apache.thrift.TException;
public boolean requestSpace(long userId, long requestBytes) throws org.apache.thrift.TException;
public void unlockBlock(long blockId, long userId) throws org.apache.thrift.TException;
public void userHeartbeat(long userId) throws org.apache.thrift.TException;
}
public interface AsyncIface {
public void accessBlock(long blockId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.accessBlock_call> resultHandler) throws org.apache.thrift.TException;
public void addCheckpoint(long userId, int fileId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addCheckpoint_call> resultHandler) throws org.apache.thrift.TException;
public void asyncCheckpoint(int fileId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.asyncCheckpoint_call> resultHandler) throws org.apache.thrift.TException;
public void cacheBlock(long userId, long blockId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.cacheBlock_call> resultHandler) throws org.apache.thrift.TException;
public void getDataFolder(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getDataFolder_call> resultHandler) throws org.apache.thrift.TException;
public void getUserTempFolder(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUserTempFolder_call> resultHandler) throws org.apache.thrift.TException;
public void getUserUnderfsTempFolder(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUserUnderfsTempFolder_call> resultHandler) throws org.apache.thrift.TException;
public void lockBlock(long blockId, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.lockBlock_call> resultHandler) throws org.apache.thrift.TException;
public void returnSpace(long userId, long returnedBytes, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.returnSpace_call> resultHandler) throws org.apache.thrift.TException;
public void requestSpace(long userId, long requestBytes, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.requestSpace_call> resultHandler) throws org.apache.thrift.TException;
public void unlockBlock(long blockId, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unlockBlock_call> resultHandler) throws org.apache.thrift.TException;
public void userHeartbeat(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.userHeartbeat_call> resultHandler) throws org.apache.thrift.TException;
}
public static class Client extends org.apache.thrift.TServiceClient implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
return new Client(prot);
}
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(org.apache.thrift.protocol.TProtocol prot)
{
super(prot, prot);
}
public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
super(iprot, oprot);
}
public void accessBlock(long blockId) throws org.apache.thrift.TException
{
send_accessBlock(blockId);
recv_accessBlock();
}
public void send_accessBlock(long blockId) throws org.apache.thrift.TException
{
accessBlock_args args = new accessBlock_args();
args.setBlockId(blockId);
sendBase("accessBlock", args);
}
public void recv_accessBlock() throws org.apache.thrift.TException
{
accessBlock_result result = new accessBlock_result();
receiveBase(result, "accessBlock");
return;
}
public void addCheckpoint(long userId, int fileId) throws FileDoesNotExistException, SuspectedFileSizeException, FailedToCheckpointException, BlockInfoException, org.apache.thrift.TException
{
send_addCheckpoint(userId, fileId);
recv_addCheckpoint();
}
public void send_addCheckpoint(long userId, int fileId) throws org.apache.thrift.TException
{
addCheckpoint_args args = new addCheckpoint_args();
args.setUserId(userId);
args.setFileId(fileId);
sendBase("addCheckpoint", args);
}
public void recv_addCheckpoint() throws FileDoesNotExistException, SuspectedFileSizeException, FailedToCheckpointException, BlockInfoException, org.apache.thrift.TException
{
addCheckpoint_result result = new addCheckpoint_result();
receiveBase(result, "addCheckpoint");
if (result.eP != null) {
throw result.eP;
}
if (result.eS != null) {
throw result.eS;
}
if (result.eF != null) {
throw result.eF;
}
if (result.eB != null) {
throw result.eB;
}
return;
}
public boolean asyncCheckpoint(int fileId) throws TachyonException, org.apache.thrift.TException
{
send_asyncCheckpoint(fileId);
return recv_asyncCheckpoint();
}
public void send_asyncCheckpoint(int fileId) throws org.apache.thrift.TException
{
asyncCheckpoint_args args = new asyncCheckpoint_args();
args.setFileId(fileId);
sendBase("asyncCheckpoint", args);
}
public boolean recv_asyncCheckpoint() throws TachyonException, org.apache.thrift.TException
{
asyncCheckpoint_result result = new asyncCheckpoint_result();
receiveBase(result, "asyncCheckpoint");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "asyncCheckpoint failed: unknown result");
}
public void cacheBlock(long userId, long blockId) throws FileDoesNotExistException, SuspectedFileSizeException, BlockInfoException, org.apache.thrift.TException
{
send_cacheBlock(userId, blockId);
recv_cacheBlock();
}
public void send_cacheBlock(long userId, long blockId) throws org.apache.thrift.TException
{
cacheBlock_args args = new cacheBlock_args();
args.setUserId(userId);
args.setBlockId(blockId);
sendBase("cacheBlock", args);
}
public void recv_cacheBlock() throws FileDoesNotExistException, SuspectedFileSizeException, BlockInfoException, org.apache.thrift.TException
{
cacheBlock_result result = new cacheBlock_result();
receiveBase(result, "cacheBlock");
if (result.eP != null) {
throw result.eP;
}
if (result.eS != null) {
throw result.eS;
}
if (result.eB != null) {
throw result.eB;
}
return;
}
public String getDataFolder() throws org.apache.thrift.TException
{
send_getDataFolder();
return recv_getDataFolder();
}
public void send_getDataFolder() throws org.apache.thrift.TException
{
getDataFolder_args args = new getDataFolder_args();
sendBase("getDataFolder", args);
}
public String recv_getDataFolder() throws org.apache.thrift.TException
{
getDataFolder_result result = new getDataFolder_result();
receiveBase(result, "getDataFolder");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDataFolder failed: unknown result");
}
public String getUserTempFolder(long userId) throws org.apache.thrift.TException
{
send_getUserTempFolder(userId);
return recv_getUserTempFolder();
}
public void send_getUserTempFolder(long userId) throws org.apache.thrift.TException
{
getUserTempFolder_args args = new getUserTempFolder_args();
args.setUserId(userId);
sendBase("getUserTempFolder", args);
}
public String recv_getUserTempFolder() throws org.apache.thrift.TException
{
getUserTempFolder_result result = new getUserTempFolder_result();
receiveBase(result, "getUserTempFolder");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserTempFolder failed: unknown result");
}
public String getUserUnderfsTempFolder(long userId) throws org.apache.thrift.TException
{
send_getUserUnderfsTempFolder(userId);
return recv_getUserUnderfsTempFolder();
}
public void send_getUserUnderfsTempFolder(long userId) throws org.apache.thrift.TException
{
getUserUnderfsTempFolder_args args = new getUserUnderfsTempFolder_args();
args.setUserId(userId);
sendBase("getUserUnderfsTempFolder", args);
}
public String recv_getUserUnderfsTempFolder() throws org.apache.thrift.TException
{
getUserUnderfsTempFolder_result result = new getUserUnderfsTempFolder_result();
receiveBase(result, "getUserUnderfsTempFolder");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserUnderfsTempFolder failed: unknown result");
}
public void lockBlock(long blockId, long userId) throws org.apache.thrift.TException
{
send_lockBlock(blockId, userId);
recv_lockBlock();
}
public void send_lockBlock(long blockId, long userId) throws org.apache.thrift.TException
{
lockBlock_args args = new lockBlock_args();
args.setBlockId(blockId);
args.setUserId(userId);
sendBase("lockBlock", args);
}
public void recv_lockBlock() throws org.apache.thrift.TException
{
lockBlock_result result = new lockBlock_result();
receiveBase(result, "lockBlock");
return;
}
public void returnSpace(long userId, long returnedBytes) throws org.apache.thrift.TException
{
send_returnSpace(userId, returnedBytes);
recv_returnSpace();
}
public void send_returnSpace(long userId, long returnedBytes) throws org.apache.thrift.TException
{
returnSpace_args args = new returnSpace_args();
args.setUserId(userId);
args.setReturnedBytes(returnedBytes);
sendBase("returnSpace", args);
}
public void recv_returnSpace() throws org.apache.thrift.TException
{
returnSpace_result result = new returnSpace_result();
receiveBase(result, "returnSpace");
return;
}
public boolean requestSpace(long userId, long requestBytes) throws org.apache.thrift.TException
{
send_requestSpace(userId, requestBytes);
return recv_requestSpace();
}
public void send_requestSpace(long userId, long requestBytes) throws org.apache.thrift.TException
{
requestSpace_args args = new requestSpace_args();
args.setUserId(userId);
args.setRequestBytes(requestBytes);
sendBase("requestSpace", args);
}
public boolean recv_requestSpace() throws org.apache.thrift.TException
{
requestSpace_result result = new requestSpace_result();
receiveBase(result, "requestSpace");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestSpace failed: unknown result");
}
public void unlockBlock(long blockId, long userId) throws org.apache.thrift.TException
{
send_unlockBlock(blockId, userId);
recv_unlockBlock();
}
public void send_unlockBlock(long blockId, long userId) throws org.apache.thrift.TException
{
unlockBlock_args args = new unlockBlock_args();
args.setBlockId(blockId);
args.setUserId(userId);
sendBase("unlockBlock", args);
}
public void recv_unlockBlock() throws org.apache.thrift.TException
{
unlockBlock_result result = new unlockBlock_result();
receiveBase(result, "unlockBlock");
return;
}
public void userHeartbeat(long userId) throws org.apache.thrift.TException
{
send_userHeartbeat(userId);
recv_userHeartbeat();
}
public void send_userHeartbeat(long userId) throws org.apache.thrift.TException
{
userHeartbeat_args args = new userHeartbeat_args();
args.setUserId(userId);
sendBase("userHeartbeat", args);
}
public void recv_userHeartbeat() throws org.apache.thrift.TException
{
userHeartbeat_result result = new userHeartbeat_result();
receiveBase(result, "userHeartbeat");
return;
}
}
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 accessBlock(long blockId, org.apache.thrift.async.AsyncMethodCallback<accessBlock_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
accessBlock_call method_call = new accessBlock_call(blockId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class accessBlock_call extends org.apache.thrift.async.TAsyncMethodCall {
private long blockId;
public accessBlock_call(long blockId, org.apache.thrift.async.AsyncMethodCallback<accessBlock_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.blockId = blockId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("accessBlock", org.apache.thrift.protocol.TMessageType.CALL, 0));
accessBlock_args args = new accessBlock_args();
args.setBlockId(blockId);
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_accessBlock();
}
}
public void addCheckpoint(long userId, int fileId, org.apache.thrift.async.AsyncMethodCallback<addCheckpoint_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
addCheckpoint_call method_call = new addCheckpoint_call(userId, fileId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class addCheckpoint_call extends org.apache.thrift.async.TAsyncMethodCall {
private long userId;
private int fileId;
public addCheckpoint_call(long userId, int fileId, org.apache.thrift.async.AsyncMethodCallback<addCheckpoint_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userId = userId;
this.fileId = fileId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addCheckpoint", org.apache.thrift.protocol.TMessageType.CALL, 0));
addCheckpoint_args args = new addCheckpoint_args();
args.setUserId(userId);
args.setFileId(fileId);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws FileDoesNotExistException, SuspectedFileSizeException, FailedToCheckpointException, BlockInfoException, 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_addCheckpoint();
}
}
public void asyncCheckpoint(int fileId, org.apache.thrift.async.AsyncMethodCallback<asyncCheckpoint_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
asyncCheckpoint_call method_call = new asyncCheckpoint_call(fileId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class asyncCheckpoint_call extends org.apache.thrift.async.TAsyncMethodCall {
private int fileId;
public asyncCheckpoint_call(int fileId, org.apache.thrift.async.AsyncMethodCallback<asyncCheckpoint_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.fileId = fileId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("asyncCheckpoint", org.apache.thrift.protocol.TMessageType.CALL, 0));
asyncCheckpoint_args args = new asyncCheckpoint_args();
args.setFileId(fileId);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws TachyonException, 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_asyncCheckpoint();
}
}
public void cacheBlock(long userId, long blockId, org.apache.thrift.async.AsyncMethodCallback<cacheBlock_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
cacheBlock_call method_call = new cacheBlock_call(userId, blockId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class cacheBlock_call extends org.apache.thrift.async.TAsyncMethodCall {
private long userId;
private long blockId;
public cacheBlock_call(long userId, long blockId, org.apache.thrift.async.AsyncMethodCallback<cacheBlock_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userId = userId;
this.blockId = blockId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cacheBlock", org.apache.thrift.protocol.TMessageType.CALL, 0));
cacheBlock_args args = new cacheBlock_args();
args.setUserId(userId);
args.setBlockId(blockId);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws FileDoesNotExistException, SuspectedFileSizeException, BlockInfoException, 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_cacheBlock();
}
}
public void getDataFolder(org.apache.thrift.async.AsyncMethodCallback<getDataFolder_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getDataFolder_call method_call = new getDataFolder_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getDataFolder_call extends org.apache.thrift.async.TAsyncMethodCall {
public getDataFolder_call(org.apache.thrift.async.AsyncMethodCallback<getDataFolder_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getDataFolder", org.apache.thrift.protocol.TMessageType.CALL, 0));
getDataFolder_args args = new getDataFolder_args();
args.write(prot);
prot.writeMessageEnd();
}
public String getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getDataFolder();
}
}
public void getUserTempFolder(long userId, org.apache.thrift.async.AsyncMethodCallback<getUserTempFolder_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getUserTempFolder_call method_call = new getUserTempFolder_call(userId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getUserTempFolder_call extends org.apache.thrift.async.TAsyncMethodCall {
private long userId;
public getUserTempFolder_call(long userId, org.apache.thrift.async.AsyncMethodCallback<getUserTempFolder_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userId = userId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserTempFolder", org.apache.thrift.protocol.TMessageType.CALL, 0));
getUserTempFolder_args args = new getUserTempFolder_args();
args.setUserId(userId);
args.write(prot);
prot.writeMessageEnd();
}
public String getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getUserTempFolder();
}
}
public void getUserUnderfsTempFolder(long userId, org.apache.thrift.async.AsyncMethodCallback<getUserUnderfsTempFolder_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getUserUnderfsTempFolder_call method_call = new getUserUnderfsTempFolder_call(userId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getUserUnderfsTempFolder_call extends org.apache.thrift.async.TAsyncMethodCall {
private long userId;
public getUserUnderfsTempFolder_call(long userId, org.apache.thrift.async.AsyncMethodCallback<getUserUnderfsTempFolder_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userId = userId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserUnderfsTempFolder", org.apache.thrift.protocol.TMessageType.CALL, 0));
getUserUnderfsTempFolder_args args = new getUserUnderfsTempFolder_args();
args.setUserId(userId);
args.write(prot);
prot.writeMessageEnd();
}
public String getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getUserUnderfsTempFolder();
}
}
public void lockBlock(long blockId, long userId, org.apache.thrift.async.AsyncMethodCallback<lockBlock_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
lockBlock_call method_call = new lockBlock_call(blockId, userId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class lockBlock_call extends org.apache.thrift.async.TAsyncMethodCall {
private long blockId;
private long userId;
public lockBlock_call(long blockId, long userId, org.apache.thrift.async.AsyncMethodCallback<lockBlock_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.blockId = blockId;
this.userId = userId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("lockBlock", org.apache.thrift.protocol.TMessageType.CALL, 0));
lockBlock_args args = new lockBlock_args();
args.setBlockId(blockId);
args.setUserId(userId);
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_lockBlock();
}
}
public void returnSpace(long userId, long returnedBytes, org.apache.thrift.async.AsyncMethodCallback<returnSpace_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
returnSpace_call method_call = new returnSpace_call(userId, returnedBytes, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class returnSpace_call extends org.apache.thrift.async.TAsyncMethodCall {
private long userId;
private long returnedBytes;
public returnSpace_call(long userId, long returnedBytes, org.apache.thrift.async.AsyncMethodCallback<returnSpace_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userId = userId;
this.returnedBytes = returnedBytes;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("returnSpace", org.apache.thrift.protocol.TMessageType.CALL, 0));
returnSpace_args args = new returnSpace_args();
args.setUserId(userId);
args.setReturnedBytes(returnedBytes);
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_returnSpace();
}
}
public void requestSpace(long userId, long requestBytes, org.apache.thrift.async.AsyncMethodCallback<requestSpace_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
requestSpace_call method_call = new requestSpace_call(userId, requestBytes, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class requestSpace_call extends org.apache.thrift.async.TAsyncMethodCall {
private long userId;
private long requestBytes;
public requestSpace_call(long userId, long requestBytes, org.apache.thrift.async.AsyncMethodCallback<requestSpace_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userId = userId;
this.requestBytes = requestBytes;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requestSpace", org.apache.thrift.protocol.TMessageType.CALL, 0));
requestSpace_args args = new requestSpace_args();
args.setUserId(userId);
args.setRequestBytes(requestBytes);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_requestSpace();
}
}
public void unlockBlock(long blockId, long userId, org.apache.thrift.async.AsyncMethodCallback<unlockBlock_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
unlockBlock_call method_call = new unlockBlock_call(blockId, userId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class unlockBlock_call extends org.apache.thrift.async.TAsyncMethodCall {
private long blockId;
private long userId;
public unlockBlock_call(long blockId, long userId, org.apache.thrift.async.AsyncMethodCallback<unlockBlock_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.blockId = blockId;
this.userId = userId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unlockBlock", org.apache.thrift.protocol.TMessageType.CALL, 0));
unlockBlock_args args = new unlockBlock_args();
args.setBlockId(blockId);
args.setUserId(userId);
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_unlockBlock();
}
}
public void userHeartbeat(long userId, org.apache.thrift.async.AsyncMethodCallback<userHeartbeat_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
userHeartbeat_call method_call = new userHeartbeat_call(userId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class userHeartbeat_call extends org.apache.thrift.async.TAsyncMethodCall {
private long userId;
public userHeartbeat_call(long userId, org.apache.thrift.async.AsyncMethodCallback<userHeartbeat_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userId = userId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("userHeartbeat", org.apache.thrift.protocol.TMessageType.CALL, 0));
userHeartbeat_args args = new userHeartbeat_args();
args.setUserId(userId);
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_userHeartbeat();
}
}
}
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("accessBlock", new accessBlock());
processMap.put("addCheckpoint", new addCheckpoint());
processMap.put("asyncCheckpoint", new asyncCheckpoint());
processMap.put("cacheBlock", new cacheBlock());
processMap.put("getDataFolder", new getDataFolder());
processMap.put("getUserTempFolder", new getUserTempFolder());
processMap.put("getUserUnderfsTempFolder", new getUserUnderfsTempFolder());
processMap.put("lockBlock", new lockBlock());
processMap.put("returnSpace", new returnSpace());
processMap.put("requestSpace", new requestSpace());
processMap.put("unlockBlock", new unlockBlock());
processMap.put("userHeartbeat", new userHeartbeat());
return processMap;
}
public static class accessBlock<I extends Iface> extends org.apache.thrift.ProcessFunction<I, accessBlock_args> {
public accessBlock() {
super("accessBlock");
}
public accessBlock_args getEmptyArgsInstance() {
return new accessBlock_args();
}
protected boolean isOneway() {
return false;
}
public accessBlock_result getResult(I iface, accessBlock_args args) throws org.apache.thrift.TException {
accessBlock_result result = new accessBlock_result();
iface.accessBlock(args.blockId);
return result;
}
}
public static class addCheckpoint<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addCheckpoint_args> {
public addCheckpoint() {
super("addCheckpoint");
}
public addCheckpoint_args getEmptyArgsInstance() {
return new addCheckpoint_args();
}
protected boolean isOneway() {
return false;
}
public addCheckpoint_result getResult(I iface, addCheckpoint_args args) throws org.apache.thrift.TException {
addCheckpoint_result result = new addCheckpoint_result();
try {
iface.addCheckpoint(args.userId, args.fileId);
} catch (FileDoesNotExistException eP) {
result.eP = eP;
} catch (SuspectedFileSizeException eS) {
result.eS = eS;
} catch (FailedToCheckpointException eF) {
result.eF = eF;
} catch (BlockInfoException eB) {
result.eB = eB;
}
return result;
}
}
public static class asyncCheckpoint<I extends Iface> extends org.apache.thrift.ProcessFunction<I, asyncCheckpoint_args> {
public asyncCheckpoint() {
super("asyncCheckpoint");
}
public asyncCheckpoint_args getEmptyArgsInstance() {
return new asyncCheckpoint_args();
}
protected boolean isOneway() {
return false;
}
public asyncCheckpoint_result getResult(I iface, asyncCheckpoint_args args) throws org.apache.thrift.TException {
asyncCheckpoint_result result = new asyncCheckpoint_result();
try {
result.success = iface.asyncCheckpoint(args.fileId);
result.setSuccessIsSet(true);
} catch (TachyonException e) {
result.e = e;
}
return result;
}
}
public static class cacheBlock<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cacheBlock_args> {
public cacheBlock() {
super("cacheBlock");
}
public cacheBlock_args getEmptyArgsInstance() {
return new cacheBlock_args();
}
protected boolean isOneway() {
return false;
}
public cacheBlock_result getResult(I iface, cacheBlock_args args) throws org.apache.thrift.TException {
cacheBlock_result result = new cacheBlock_result();
try {
iface.cacheBlock(args.userId, args.blockId);
} catch (FileDoesNotExistException eP) {
result.eP = eP;
} catch (SuspectedFileSizeException eS) {
result.eS = eS;
} catch (BlockInfoException eB) {
result.eB = eB;
}
return result;
}
}
public static class getDataFolder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getDataFolder_args> {
public getDataFolder() {
super("getDataFolder");
}
public getDataFolder_args getEmptyArgsInstance() {
return new getDataFolder_args();
}
protected boolean isOneway() {
return false;
}
public getDataFolder_result getResult(I iface, getDataFolder_args args) throws org.apache.thrift.TException {
getDataFolder_result result = new getDataFolder_result();
result.success = iface.getDataFolder();
return result;
}
}
public static class getUserTempFolder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserTempFolder_args> {
public getUserTempFolder() {
super("getUserTempFolder");
}
public getUserTempFolder_args getEmptyArgsInstance() {
return new getUserTempFolder_args();
}
protected boolean isOneway() {
return false;
}
public getUserTempFolder_result getResult(I iface, getUserTempFolder_args args) throws org.apache.thrift.TException {
getUserTempFolder_result result = new getUserTempFolder_result();
result.success = iface.getUserTempFolder(args.userId);
return result;
}
}
public static class getUserUnderfsTempFolder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserUnderfsTempFolder_args> {
public getUserUnderfsTempFolder() {
super("getUserUnderfsTempFolder");
}
public getUserUnderfsTempFolder_args getEmptyArgsInstance() {
return new getUserUnderfsTempFolder_args();
}
protected boolean isOneway() {
return false;
}
public getUserUnderfsTempFolder_result getResult(I iface, getUserUnderfsTempFolder_args args) throws org.apache.thrift.TException {
getUserUnderfsTempFolder_result result = new getUserUnderfsTempFolder_result();
result.success = iface.getUserUnderfsTempFolder(args.userId);
return result;
}
}
public static class lockBlock<I extends Iface> extends org.apache.thrift.ProcessFunction<I, lockBlock_args> {
public lockBlock() {
super("lockBlock");
}
public lockBlock_args getEmptyArgsInstance() {
return new lockBlock_args();
}
protected boolean isOneway() {
return false;
}
public lockBlock_result getResult(I iface, lockBlock_args args) throws org.apache.thrift.TException {
lockBlock_result result = new lockBlock_result();
iface.lockBlock(args.blockId, args.userId);
return result;
}
}
public static class returnSpace<I extends Iface> extends org.apache.thrift.ProcessFunction<I, returnSpace_args> {
public returnSpace() {
super("returnSpace");
}
public returnSpace_args getEmptyArgsInstance() {
return new returnSpace_args();
}
protected boolean isOneway() {
return false;
}
public returnSpace_result getResult(I iface, returnSpace_args args) throws org.apache.thrift.TException {
returnSpace_result result = new returnSpace_result();
iface.returnSpace(args.userId, args.returnedBytes);
return result;
}
}
public static class requestSpace<I extends Iface> extends org.apache.thrift.ProcessFunction<I, requestSpace_args> {
public requestSpace() {
super("requestSpace");
}
public requestSpace_args getEmptyArgsInstance() {
return new requestSpace_args();
}
protected boolean isOneway() {
return false;
}
public requestSpace_result getResult(I iface, requestSpace_args args) throws org.apache.thrift.TException {
requestSpace_result result = new requestSpace_result();
result.success = iface.requestSpace(args.userId, args.requestBytes);
result.setSuccessIsSet(true);
return result;
}
}
public static class unlockBlock<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unlockBlock_args> {
public unlockBlock() {
super("unlockBlock");
}
public unlockBlock_args getEmptyArgsInstance() {
return new unlockBlock_args();
}
protected boolean isOneway() {
return false;
}
public unlockBlock_result getResult(I iface, unlockBlock_args args) throws org.apache.thrift.TException {
unlockBlock_result result = new unlockBlock_result();
iface.unlockBlock(args.blockId, args.userId);
return result;
}
}
public static class userHeartbeat<I extends Iface> extends org.apache.thrift.ProcessFunction<I, userHeartbeat_args> {
public userHeartbeat() {
super("userHeartbeat");
}
public userHeartbeat_args getEmptyArgsInstance() {
return new userHeartbeat_args();
}
protected boolean isOneway() {
return false;
}
public userHeartbeat_result getResult(I iface, userHeartbeat_args args) throws org.apache.thrift.TException {
userHeartbeat_result result = new userHeartbeat_result();
iface.userHeartbeat(args.userId);
return result;
}
}
}
public static class accessBlock_args implements org.apache.thrift.TBase<accessBlock_args, accessBlock_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("accessBlock_args");
private static final org.apache.thrift.protocol.TField BLOCK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockId", 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 accessBlock_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new accessBlock_argsTupleSchemeFactory());
}
public long blockId; // 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 {
BLOCK_ID((short)1, "blockId");
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: // BLOCK_ID
return BLOCK_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 __BLOCKID_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.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(accessBlock_args.class, metaDataMap);
}
public accessBlock_args() {
}
public accessBlock_args(
long blockId)
{
this();
this.blockId = blockId;
setBlockIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public accessBlock_args(accessBlock_args other) {
__isset_bitfield = other.__isset_bitfield;
this.blockId = other.blockId;
}
public accessBlock_args deepCopy() {
return new accessBlock_args(this);
}
@Override
public void clear() {
setBlockIdIsSet(false);
this.blockId = 0;
}
public long getBlockId() {
return this.blockId;
}
public accessBlock_args setBlockId(long blockId) {
this.blockId = blockId;
setBlockIdIsSet(true);
return this;
}
public void unsetBlockId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKID_ISSET_ID);
}
/** Returns true if field blockId is set (has been assigned a value) and false otherwise */
public boolean isSetBlockId() {
return EncodingUtils.testBit(__isset_bitfield, __BLOCKID_ISSET_ID);
}
public void setBlockIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case BLOCK_ID:
if (value == null) {
unsetBlockId();
} else {
setBlockId((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case BLOCK_ID:
return Long.valueOf(getBlockId());
}
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 BLOCK_ID:
return isSetBlockId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof accessBlock_args)
return this.equals((accessBlock_args)that);
return false;
}
public boolean equals(accessBlock_args that) {
if (that == null)
return false;
boolean this_present_blockId = true;
boolean that_present_blockId = true;
if (this_present_blockId || that_present_blockId) {
if (!(this_present_blockId && that_present_blockId))
return false;
if (this.blockId != that.blockId)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(accessBlock_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
accessBlock_args typedOther = (accessBlock_args)other;
lastComparison = Boolean.valueOf(isSetBlockId()).compareTo(typedOther.isSetBlockId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBlockId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockId, typedOther.blockId);
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("accessBlock_args(");
boolean first = true;
sb.append("blockId:");
sb.append(this.blockId);
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 accessBlock_argsStandardSchemeFactory implements SchemeFactory {
public accessBlock_argsStandardScheme getScheme() {
return new accessBlock_argsStandardScheme();
}
}
private static class accessBlock_argsStandardScheme extends StandardScheme<accessBlock_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, accessBlock_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: // BLOCK_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.blockId = iprot.readI64();
struct.setBlockIdIsSet(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, accessBlock_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(BLOCK_ID_FIELD_DESC);
oprot.writeI64(struct.blockId);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class accessBlock_argsTupleSchemeFactory implements SchemeFactory {
public accessBlock_argsTupleScheme getScheme() {
return new accessBlock_argsTupleScheme();
}
}
private static class accessBlock_argsTupleScheme extends TupleScheme<accessBlock_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, accessBlock_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetBlockId()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetBlockId()) {
oprot.writeI64(struct.blockId);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, accessBlock_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.blockId = iprot.readI64();
struct.setBlockIdIsSet(true);
}
}
}
}
public static class accessBlock_result implements org.apache.thrift.TBase<accessBlock_result, accessBlock_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("accessBlock_result");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new accessBlock_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new accessBlock_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(accessBlock_result.class, metaDataMap);
}
public accessBlock_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public accessBlock_result(accessBlock_result other) {
}
public accessBlock_result deepCopy() {
return new accessBlock_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 accessBlock_result)
return this.equals((accessBlock_result)that);
return false;
}
public boolean equals(accessBlock_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(accessBlock_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
accessBlock_result typedOther = (accessBlock_result)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("accessBlock_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 accessBlock_resultStandardSchemeFactory implements SchemeFactory {
public accessBlock_resultStandardScheme getScheme() {
return new accessBlock_resultStandardScheme();
}
}
private static class accessBlock_resultStandardScheme extends StandardScheme<accessBlock_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, accessBlock_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, accessBlock_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class accessBlock_resultTupleSchemeFactory implements SchemeFactory {
public accessBlock_resultTupleScheme getScheme() {
return new accessBlock_resultTupleScheme();
}
}
private static class accessBlock_resultTupleScheme extends TupleScheme<accessBlock_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, accessBlock_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, accessBlock_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class addCheckpoint_args implements org.apache.thrift.TBase<addCheckpoint_args, addCheckpoint_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addCheckpoint_args");
private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField FILE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fileId", org.apache.thrift.protocol.TType.I32, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new addCheckpoint_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new addCheckpoint_argsTupleSchemeFactory());
}
public long userId; // required
public int fileId; // 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 {
USER_ID((short)1, "userId"),
FILE_ID((short)2, "fileId");
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: // USER_ID
return USER_ID;
case 2: // FILE_ID
return FILE_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 __USERID_ISSET_ID = 0;
private static final int __FILEID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.FILE_ID, new org.apache.thrift.meta_data.FieldMetaData("fileId", 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(addCheckpoint_args.class, metaDataMap);
}
public addCheckpoint_args() {
}
public addCheckpoint_args(
long userId,
int fileId)
{
this();
this.userId = userId;
setUserIdIsSet(true);
this.fileId = fileId;
setFileIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public addCheckpoint_args(addCheckpoint_args other) {
__isset_bitfield = other.__isset_bitfield;
this.userId = other.userId;
this.fileId = other.fileId;
}
public addCheckpoint_args deepCopy() {
return new addCheckpoint_args(this);
}
@Override
public void clear() {
setUserIdIsSet(false);
this.userId = 0;
setFileIdIsSet(false);
this.fileId = 0;
}
public long getUserId() {
return this.userId;
}
public addCheckpoint_args setUserId(long userId) {
this.userId = userId;
setUserIdIsSet(true);
return this;
}
public void unsetUserId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USERID_ISSET_ID);
}
/** Returns true if field userId is set (has been assigned a value) and false otherwise */
public boolean isSetUserId() {
return EncodingUtils.testBit(__isset_bitfield, __USERID_ISSET_ID);
}
public void setUserIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USERID_ISSET_ID, value);
}
public int getFileId() {
return this.fileId;
}
public addCheckpoint_args setFileId(int fileId) {
this.fileId = fileId;
setFileIdIsSet(true);
return this;
}
public void unsetFileId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID);
}
/** Returns true if field fileId is set (has been assigned a value) and false otherwise */
public boolean isSetFileId() {
return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID);
}
public void setFileIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case USER_ID:
if (value == null) {
unsetUserId();
} else {
setUserId((Long)value);
}
break;
case FILE_ID:
if (value == null) {
unsetFileId();
} else {
setFileId((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case USER_ID:
return Long.valueOf(getUserId());
case FILE_ID:
return Integer.valueOf(getFileId());
}
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 USER_ID:
return isSetUserId();
case FILE_ID:
return isSetFileId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof addCheckpoint_args)
return this.equals((addCheckpoint_args)that);
return false;
}
public boolean equals(addCheckpoint_args that) {
if (that == null)
return false;
boolean this_present_userId = true;
boolean that_present_userId = true;
if (this_present_userId || that_present_userId) {
if (!(this_present_userId && that_present_userId))
return false;
if (this.userId != that.userId)
return false;
}
boolean this_present_fileId = true;
boolean that_present_fileId = true;
if (this_present_fileId || that_present_fileId) {
if (!(this_present_fileId && that_present_fileId))
return false;
if (this.fileId != that.fileId)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(addCheckpoint_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
addCheckpoint_args typedOther = (addCheckpoint_args)other;
lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUserId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetFileId()).compareTo(typedOther.isSetFileId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFileId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, typedOther.fileId);
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("addCheckpoint_args(");
boolean first = true;
sb.append("userId:");
sb.append(this.userId);
first = false;
if (!first) sb.append(", ");
sb.append("fileId:");
sb.append(this.fileId);
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 addCheckpoint_argsStandardSchemeFactory implements SchemeFactory {
public addCheckpoint_argsStandardScheme getScheme() {
return new addCheckpoint_argsStandardScheme();
}
}
private static class addCheckpoint_argsStandardScheme extends StandardScheme<addCheckpoint_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, addCheckpoint_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: // USER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.userId = iprot.readI64();
struct.setUserIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // FILE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.fileId = iprot.readI32();
struct.setFileIdIsSet(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, addCheckpoint_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(USER_ID_FIELD_DESC);
oprot.writeI64(struct.userId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(FILE_ID_FIELD_DESC);
oprot.writeI32(struct.fileId);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class addCheckpoint_argsTupleSchemeFactory implements SchemeFactory {
public addCheckpoint_argsTupleScheme getScheme() {
return new addCheckpoint_argsTupleScheme();
}
}
private static class addCheckpoint_argsTupleScheme extends TupleScheme<addCheckpoint_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, addCheckpoint_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetUserId()) {
optionals.set(0);
}
if (struct.isSetFileId()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetUserId()) {
oprot.writeI64(struct.userId);
}
if (struct.isSetFileId()) {
oprot.writeI32(struct.fileId);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, addCheckpoint_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userId = iprot.readI64();
struct.setUserIdIsSet(true);
}
if (incoming.get(1)) {
struct.fileId = iprot.readI32();
struct.setFileIdIsSet(true);
}
}
}
}
public static class addCheckpoint_result implements org.apache.thrift.TBase<addCheckpoint_result, addCheckpoint_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addCheckpoint_result");
private static final org.apache.thrift.protocol.TField E_P_FIELD_DESC = new org.apache.thrift.protocol.TField("eP", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField E_S_FIELD_DESC = new org.apache.thrift.protocol.TField("eS", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField E_F_FIELD_DESC = new org.apache.thrift.protocol.TField("eF", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField E_B_FIELD_DESC = new org.apache.thrift.protocol.TField("eB", org.apache.thrift.protocol.TType.STRUCT, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new addCheckpoint_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new addCheckpoint_resultTupleSchemeFactory());
}
public FileDoesNotExistException eP; // required
public SuspectedFileSizeException eS; // required
public FailedToCheckpointException eF; // required
public BlockInfoException eB; // 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 {
E_P((short)1, "eP"),
E_S((short)2, "eS"),
E_F((short)3, "eF"),
E_B((short)4, "eB");
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: // E_P
return E_P;
case 2: // E_S
return E_S;
case 3: // E_F
return E_F;
case 4: // E_B
return E_B;
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.E_P, new org.apache.thrift.meta_data.FieldMetaData("eP", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.E_S, new org.apache.thrift.meta_data.FieldMetaData("eS", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.E_F, new org.apache.thrift.meta_data.FieldMetaData("eF", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.E_B, new org.apache.thrift.meta_data.FieldMetaData("eB", 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(addCheckpoint_result.class, metaDataMap);
}
public addCheckpoint_result() {
}
public addCheckpoint_result(
FileDoesNotExistException eP,
SuspectedFileSizeException eS,
FailedToCheckpointException eF,
BlockInfoException eB)
{
this();
this.eP = eP;
this.eS = eS;
this.eF = eF;
this.eB = eB;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public addCheckpoint_result(addCheckpoint_result other) {
if (other.isSetEP()) {
this.eP = new FileDoesNotExistException(other.eP);
}
if (other.isSetES()) {
this.eS = new SuspectedFileSizeException(other.eS);
}
if (other.isSetEF()) {
this.eF = new FailedToCheckpointException(other.eF);
}
if (other.isSetEB()) {
this.eB = new BlockInfoException(other.eB);
}
}
public addCheckpoint_result deepCopy() {
return new addCheckpoint_result(this);
}
@Override
public void clear() {
this.eP = null;
this.eS = null;
this.eF = null;
this.eB = null;
}
public FileDoesNotExistException getEP() {
return this.eP;
}
public addCheckpoint_result setEP(FileDoesNotExistException eP) {
this.eP = eP;
return this;
}
public void unsetEP() {
this.eP = null;
}
/** Returns true if field eP is set (has been assigned a value) and false otherwise */
public boolean isSetEP() {
return this.eP != null;
}
public void setEPIsSet(boolean value) {
if (!value) {
this.eP = null;
}
}
public SuspectedFileSizeException getES() {
return this.eS;
}
public addCheckpoint_result setES(SuspectedFileSizeException eS) {
this.eS = eS;
return this;
}
public void unsetES() {
this.eS = null;
}
/** Returns true if field eS is set (has been assigned a value) and false otherwise */
public boolean isSetES() {
return this.eS != null;
}
public void setESIsSet(boolean value) {
if (!value) {
this.eS = null;
}
}
public FailedToCheckpointException getEF() {
return this.eF;
}
public addCheckpoint_result setEF(FailedToCheckpointException eF) {
this.eF = eF;
return this;
}
public void unsetEF() {
this.eF = null;
}
/** Returns true if field eF is set (has been assigned a value) and false otherwise */
public boolean isSetEF() {
return this.eF != null;
}
public void setEFIsSet(boolean value) {
if (!value) {
this.eF = null;
}
}
public BlockInfoException getEB() {
return this.eB;
}
public addCheckpoint_result setEB(BlockInfoException eB) {
this.eB = eB;
return this;
}
public void unsetEB() {
this.eB = null;
}
/** Returns true if field eB is set (has been assigned a value) and false otherwise */
public boolean isSetEB() {
return this.eB != null;
}
public void setEBIsSet(boolean value) {
if (!value) {
this.eB = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case E_P:
if (value == null) {
unsetEP();
} else {
setEP((FileDoesNotExistException)value);
}
break;
case E_S:
if (value == null) {
unsetES();
} else {
setES((SuspectedFileSizeException)value);
}
break;
case E_F:
if (value == null) {
unsetEF();
} else {
setEF((FailedToCheckpointException)value);
}
break;
case E_B:
if (value == null) {
unsetEB();
} else {
setEB((BlockInfoException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case E_P:
return getEP();
case E_S:
return getES();
case E_F:
return getEF();
case E_B:
return getEB();
}
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 E_P:
return isSetEP();
case E_S:
return isSetES();
case E_F:
return isSetEF();
case E_B:
return isSetEB();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof addCheckpoint_result)
return this.equals((addCheckpoint_result)that);
return false;
}
public boolean equals(addCheckpoint_result that) {
if (that == null)
return false;
boolean this_present_eP = true && this.isSetEP();
boolean that_present_eP = true && that.isSetEP();
if (this_present_eP || that_present_eP) {
if (!(this_present_eP && that_present_eP))
return false;
if (!this.eP.equals(that.eP))
return false;
}
boolean this_present_eS = true && this.isSetES();
boolean that_present_eS = true && that.isSetES();
if (this_present_eS || that_present_eS) {
if (!(this_present_eS && that_present_eS))
return false;
if (!this.eS.equals(that.eS))
return false;
}
boolean this_present_eF = true && this.isSetEF();
boolean that_present_eF = true && that.isSetEF();
if (this_present_eF || that_present_eF) {
if (!(this_present_eF && that_present_eF))
return false;
if (!this.eF.equals(that.eF))
return false;
}
boolean this_present_eB = true && this.isSetEB();
boolean that_present_eB = true && that.isSetEB();
if (this_present_eB || that_present_eB) {
if (!(this_present_eB && that_present_eB))
return false;
if (!this.eB.equals(that.eB))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(addCheckpoint_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
addCheckpoint_result typedOther = (addCheckpoint_result)other;
lastComparison = Boolean.valueOf(isSetEP()).compareTo(typedOther.isSetEP());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEP()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eP, typedOther.eP);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetES()).compareTo(typedOther.isSetES());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetES()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eS, typedOther.eS);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetEF()).compareTo(typedOther.isSetEF());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEF()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eF, typedOther.eF);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetEB()).compareTo(typedOther.isSetEB());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEB()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eB, typedOther.eB);
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("addCheckpoint_result(");
boolean first = true;
sb.append("eP:");
if (this.eP == null) {
sb.append("null");
} else {
sb.append(this.eP);
}
first = false;
if (!first) sb.append(", ");
sb.append("eS:");
if (this.eS == null) {
sb.append("null");
} else {
sb.append(this.eS);
}
first = false;
if (!first) sb.append(", ");
sb.append("eF:");
if (this.eF == null) {
sb.append("null");
} else {
sb.append(this.eF);
}
first = false;
if (!first) sb.append(", ");
sb.append("eB:");
if (this.eB == null) {
sb.append("null");
} else {
sb.append(this.eB);
}
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 addCheckpoint_resultStandardSchemeFactory implements SchemeFactory {
public addCheckpoint_resultStandardScheme getScheme() {
return new addCheckpoint_resultStandardScheme();
}
}
private static class addCheckpoint_resultStandardScheme extends StandardScheme<addCheckpoint_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, addCheckpoint_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 1: // E_P
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.eP = new FileDoesNotExistException();
struct.eP.read(iprot);
struct.setEPIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // E_S
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.eS = new SuspectedFileSizeException();
struct.eS.read(iprot);
struct.setESIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // E_F
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.eF = new FailedToCheckpointException();
struct.eF.read(iprot);
struct.setEFIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // E_B
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.eB = new BlockInfoException();
struct.eB.read(iprot);
struct.setEBIsSet(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, addCheckpoint_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.eP != null) {
oprot.writeFieldBegin(E_P_FIELD_DESC);
struct.eP.write(oprot);
oprot.writeFieldEnd();
}
if (struct.eS != null) {
oprot.writeFieldBegin(E_S_FIELD_DESC);
struct.eS.write(oprot);
oprot.writeFieldEnd();
}
if (struct.eF != null) {
oprot.writeFieldBegin(E_F_FIELD_DESC);
struct.eF.write(oprot);
oprot.writeFieldEnd();
}
if (struct.eB != null) {
oprot.writeFieldBegin(E_B_FIELD_DESC);
struct.eB.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class addCheckpoint_resultTupleSchemeFactory implements SchemeFactory {
public addCheckpoint_resultTupleScheme getScheme() {
return new addCheckpoint_resultTupleScheme();
}
}
private static class addCheckpoint_resultTupleScheme extends TupleScheme<addCheckpoint_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, addCheckpoint_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetEP()) {
optionals.set(0);
}
if (struct.isSetES()) {
optionals.set(1);
}
if (struct.isSetEF()) {
optionals.set(2);
}
if (struct.isSetEB()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetEP()) {
struct.eP.write(oprot);
}
if (struct.isSetES()) {
struct.eS.write(oprot);
}
if (struct.isSetEF()) {
struct.eF.write(oprot);
}
if (struct.isSetEB()) {
struct.eB.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, addCheckpoint_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.eP = new FileDoesNotExistException();
struct.eP.read(iprot);
struct.setEPIsSet(true);
}
if (incoming.get(1)) {
struct.eS = new SuspectedFileSizeException();
struct.eS.read(iprot);
struct.setESIsSet(true);
}
if (incoming.get(2)) {
struct.eF = new FailedToCheckpointException();
struct.eF.read(iprot);
struct.setEFIsSet(true);
}
if (incoming.get(3)) {
struct.eB = new BlockInfoException();
struct.eB.read(iprot);
struct.setEBIsSet(true);
}
}
}
}
public static class asyncCheckpoint_args implements org.apache.thrift.TBase<asyncCheckpoint_args, asyncCheckpoint_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("asyncCheckpoint_args");
private static final org.apache.thrift.protocol.TField FILE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fileId", org.apache.thrift.protocol.TType.I32, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new asyncCheckpoint_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new asyncCheckpoint_argsTupleSchemeFactory());
}
public int fileId; // 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 {
FILE_ID((short)1, "fileId");
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: // FILE_ID
return FILE_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 __FILEID_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.FILE_ID, new org.apache.thrift.meta_data.FieldMetaData("fileId", 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(asyncCheckpoint_args.class, metaDataMap);
}
public asyncCheckpoint_args() {
}
public asyncCheckpoint_args(
int fileId)
{
this();
this.fileId = fileId;
setFileIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public asyncCheckpoint_args(asyncCheckpoint_args other) {
__isset_bitfield = other.__isset_bitfield;
this.fileId = other.fileId;
}
public asyncCheckpoint_args deepCopy() {
return new asyncCheckpoint_args(this);
}
@Override
public void clear() {
setFileIdIsSet(false);
this.fileId = 0;
}
public int getFileId() {
return this.fileId;
}
public asyncCheckpoint_args setFileId(int fileId) {
this.fileId = fileId;
setFileIdIsSet(true);
return this;
}
public void unsetFileId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID);
}
/** Returns true if field fileId is set (has been assigned a value) and false otherwise */
public boolean isSetFileId() {
return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID);
}
public void setFileIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case FILE_ID:
if (value == null) {
unsetFileId();
} else {
setFileId((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case FILE_ID:
return Integer.valueOf(getFileId());
}
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 FILE_ID:
return isSetFileId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof asyncCheckpoint_args)
return this.equals((asyncCheckpoint_args)that);
return false;
}
public boolean equals(asyncCheckpoint_args that) {
if (that == null)
return false;
boolean this_present_fileId = true;
boolean that_present_fileId = true;
if (this_present_fileId || that_present_fileId) {
if (!(this_present_fileId && that_present_fileId))
return false;
if (this.fileId != that.fileId)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(asyncCheckpoint_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
asyncCheckpoint_args typedOther = (asyncCheckpoint_args)other;
lastComparison = Boolean.valueOf(isSetFileId()).compareTo(typedOther.isSetFileId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFileId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, typedOther.fileId);
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("asyncCheckpoint_args(");
boolean first = true;
sb.append("fileId:");
sb.append(this.fileId);
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 asyncCheckpoint_argsStandardSchemeFactory implements SchemeFactory {
public asyncCheckpoint_argsStandardScheme getScheme() {
return new asyncCheckpoint_argsStandardScheme();
}
}
private static class asyncCheckpoint_argsStandardScheme extends StandardScheme<asyncCheckpoint_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, asyncCheckpoint_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: // FILE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.fileId = iprot.readI32();
struct.setFileIdIsSet(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, asyncCheckpoint_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(FILE_ID_FIELD_DESC);
oprot.writeI32(struct.fileId);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class asyncCheckpoint_argsTupleSchemeFactory implements SchemeFactory {
public asyncCheckpoint_argsTupleScheme getScheme() {
return new asyncCheckpoint_argsTupleScheme();
}
}
private static class asyncCheckpoint_argsTupleScheme extends TupleScheme<asyncCheckpoint_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, asyncCheckpoint_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetFileId()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetFileId()) {
oprot.writeI32(struct.fileId);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, asyncCheckpoint_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.fileId = iprot.readI32();
struct.setFileIdIsSet(true);
}
}
}
}
public static class asyncCheckpoint_result implements org.apache.thrift.TBase<asyncCheckpoint_result, asyncCheckpoint_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("asyncCheckpoint_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new asyncCheckpoint_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new asyncCheckpoint_resultTupleSchemeFactory());
}
public boolean success; // required
public TachyonException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
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.BOOL)));
tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(asyncCheckpoint_result.class, metaDataMap);
}
public asyncCheckpoint_result() {
}
public asyncCheckpoint_result(
boolean success,
TachyonException e)
{
this();
this.success = success;
setSuccessIsSet(true);
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public asyncCheckpoint_result(asyncCheckpoint_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetE()) {
this.e = new TachyonException(other.e);
}
}
public asyncCheckpoint_result deepCopy() {
return new asyncCheckpoint_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.e = null;
}
public boolean isSuccess() {
return this.success;
}
public asyncCheckpoint_result setSuccess(boolean 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 TachyonException getE() {
return this.e;
}
public asyncCheckpoint_result setE(TachyonException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((TachyonException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Boolean.valueOf(isSuccess());
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof asyncCheckpoint_result)
return this.equals((asyncCheckpoint_result)that);
return false;
}
public boolean equals(asyncCheckpoint_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;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(asyncCheckpoint_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
asyncCheckpoint_result typedOther = (asyncCheckpoint_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("asyncCheckpoint_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
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 asyncCheckpoint_resultStandardSchemeFactory implements SchemeFactory {
public asyncCheckpoint_resultStandardScheme getScheme() {
return new asyncCheckpoint_resultStandardScheme();
}
}
private static class asyncCheckpoint_resultStandardScheme extends StandardScheme<asyncCheckpoint_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, asyncCheckpoint_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.BOOL) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new TachyonException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, asyncCheckpoint_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class asyncCheckpoint_resultTupleSchemeFactory implements SchemeFactory {
public asyncCheckpoint_resultTupleScheme getScheme() {
return new asyncCheckpoint_resultTupleScheme();
}
}
private static class asyncCheckpoint_resultTupleScheme extends TupleScheme<asyncCheckpoint_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, asyncCheckpoint_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, asyncCheckpoint_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new TachyonException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class cacheBlock_args implements org.apache.thrift.TBase<cacheBlock_args, cacheBlock_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cacheBlock_args");
private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField BLOCK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockId", org.apache.thrift.protocol.TType.I64, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new cacheBlock_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new cacheBlock_argsTupleSchemeFactory());
}
public long userId; // required
public long blockId; // 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 {
USER_ID((short)1, "userId"),
BLOCK_ID((short)2, "blockId");
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: // USER_ID
return USER_ID;
case 2: // BLOCK_ID
return BLOCK_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 __USERID_ISSET_ID = 0;
private static final int __BLOCKID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cacheBlock_args.class, metaDataMap);
}
public cacheBlock_args() {
}
public cacheBlock_args(
long userId,
long blockId)
{
this();
this.userId = userId;
setUserIdIsSet(true);
this.blockId = blockId;
setBlockIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public cacheBlock_args(cacheBlock_args other) {
__isset_bitfield = other.__isset_bitfield;
this.userId = other.userId;
this.blockId = other.blockId;
}
public cacheBlock_args deepCopy() {
return new cacheBlock_args(this);
}
@Override
public void clear() {
setUserIdIsSet(false);
this.userId = 0;
setBlockIdIsSet(false);
this.blockId = 0;
}
public long getUserId() {
return this.userId;
}
public cacheBlock_args setUserId(long userId) {
this.userId = userId;
setUserIdIsSet(true);
return this;
}
public void unsetUserId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USERID_ISSET_ID);
}
/** Returns true if field userId is set (has been assigned a value) and false otherwise */
public boolean isSetUserId() {
return EncodingUtils.testBit(__isset_bitfield, __USERID_ISSET_ID);
}
public void setUserIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USERID_ISSET_ID, value);
}
public long getBlockId() {
return this.blockId;
}
public cacheBlock_args setBlockId(long blockId) {
this.blockId = blockId;
setBlockIdIsSet(true);
return this;
}
public void unsetBlockId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKID_ISSET_ID);
}
/** Returns true if field blockId is set (has been assigned a value) and false otherwise */
public boolean isSetBlockId() {
return EncodingUtils.testBit(__isset_bitfield, __BLOCKID_ISSET_ID);
}
public void setBlockIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case USER_ID:
if (value == null) {
unsetUserId();
} else {
setUserId((Long)value);
}
break;
case BLOCK_ID:
if (value == null) {
unsetBlockId();
} else {
setBlockId((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case USER_ID:
return Long.valueOf(getUserId());
case BLOCK_ID:
return Long.valueOf(getBlockId());
}
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 USER_ID:
return isSetUserId();
case BLOCK_ID:
return isSetBlockId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof cacheBlock_args)
return this.equals((cacheBlock_args)that);
return false;
}
public boolean equals(cacheBlock_args that) {
if (that == null)
return false;
boolean this_present_userId = true;
boolean that_present_userId = true;
if (this_present_userId || that_present_userId) {
if (!(this_present_userId && that_present_userId))
return false;
if (this.userId != that.userId)
return false;
}
boolean this_present_blockId = true;
boolean that_present_blockId = true;
if (this_present_blockId || that_present_blockId) {
if (!(this_present_blockId && that_present_blockId))
return false;
if (this.blockId != that.blockId)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(cacheBlock_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
cacheBlock_args typedOther = (cacheBlock_args)other;
lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUserId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetBlockId()).compareTo(typedOther.isSetBlockId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBlockId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockId, typedOther.blockId);
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("cacheBlock_args(");
boolean first = true;
sb.append("userId:");
sb.append(this.userId);
first = false;
if (!first) sb.append(", ");
sb.append("blockId:");
sb.append(this.blockId);
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 cacheBlock_argsStandardSchemeFactory implements SchemeFactory {
public cacheBlock_argsStandardScheme getScheme() {
return new cacheBlock_argsStandardScheme();
}
}
private static class cacheBlock_argsStandardScheme extends StandardScheme<cacheBlock_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, cacheBlock_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: // USER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.userId = iprot.readI64();
struct.setUserIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // BLOCK_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.blockId = iprot.readI64();
struct.setBlockIdIsSet(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, cacheBlock_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(USER_ID_FIELD_DESC);
oprot.writeI64(struct.userId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(BLOCK_ID_FIELD_DESC);
oprot.writeI64(struct.blockId);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class cacheBlock_argsTupleSchemeFactory implements SchemeFactory {
public cacheBlock_argsTupleScheme getScheme() {
return new cacheBlock_argsTupleScheme();
}
}
private static class cacheBlock_argsTupleScheme extends TupleScheme<cacheBlock_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, cacheBlock_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetUserId()) {
optionals.set(0);
}
if (struct.isSetBlockId()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetUserId()) {
oprot.writeI64(struct.userId);
}
if (struct.isSetBlockId()) {
oprot.writeI64(struct.blockId);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, cacheBlock_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userId = iprot.readI64();
struct.setUserIdIsSet(true);
}
if (incoming.get(1)) {
struct.blockId = iprot.readI64();
struct.setBlockIdIsSet(true);
}
}
}
}
public static class cacheBlock_result implements org.apache.thrift.TBase<cacheBlock_result, cacheBlock_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cacheBlock_result");
private static final org.apache.thrift.protocol.TField E_P_FIELD_DESC = new org.apache.thrift.protocol.TField("eP", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField E_S_FIELD_DESC = new org.apache.thrift.protocol.TField("eS", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField E_B_FIELD_DESC = new org.apache.thrift.protocol.TField("eB", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new cacheBlock_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new cacheBlock_resultTupleSchemeFactory());
}
public FileDoesNotExistException eP; // required
public SuspectedFileSizeException eS; // required
public BlockInfoException eB; // 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 {
E_P((short)1, "eP"),
E_S((short)2, "eS"),
E_B((short)3, "eB");
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: // E_P
return E_P;
case 2: // E_S
return E_S;
case 3: // E_B
return E_B;
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.E_P, new org.apache.thrift.meta_data.FieldMetaData("eP", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.E_S, new org.apache.thrift.meta_data.FieldMetaData("eS", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.E_B, new org.apache.thrift.meta_data.FieldMetaData("eB", 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(cacheBlock_result.class, metaDataMap);
}
public cacheBlock_result() {
}
public cacheBlock_result(
FileDoesNotExistException eP,
SuspectedFileSizeException eS,
BlockInfoException eB)
{
this();
this.eP = eP;
this.eS = eS;
this.eB = eB;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public cacheBlock_result(cacheBlock_result other) {
if (other.isSetEP()) {
this.eP = new FileDoesNotExistException(other.eP);
}
if (other.isSetES()) {
this.eS = new SuspectedFileSizeException(other.eS);
}
if (other.isSetEB()) {
this.eB = new BlockInfoException(other.eB);
}
}
public cacheBlock_result deepCopy() {
return new cacheBlock_result(this);
}
@Override
public void clear() {
this.eP = null;
this.eS = null;
this.eB = null;
}
public FileDoesNotExistException getEP() {
return this.eP;
}
public cacheBlock_result setEP(FileDoesNotExistException eP) {
this.eP = eP;
return this;
}
public void unsetEP() {
this.eP = null;
}
/** Returns true if field eP is set (has been assigned a value) and false otherwise */
public boolean isSetEP() {
return this.eP != null;
}
public void setEPIsSet(boolean value) {
if (!value) {
this.eP = null;
}
}
public SuspectedFileSizeException getES() {
return this.eS;
}
public cacheBlock_result setES(SuspectedFileSizeException eS) {
this.eS = eS;
return this;
}
public void unsetES() {
this.eS = null;
}
/** Returns true if field eS is set (has been assigned a value) and false otherwise */
public boolean isSetES() {
return this.eS != null;
}
public void setESIsSet(boolean value) {
if (!value) {
this.eS = null;
}
}
public BlockInfoException getEB() {
return this.eB;
}
public cacheBlock_result setEB(BlockInfoException eB) {
this.eB = eB;
return this;
}
public void unsetEB() {
this.eB = null;
}
/** Returns true if field eB is set (has been assigned a value) and false otherwise */
public boolean isSetEB() {
return this.eB != null;
}
public void setEBIsSet(boolean value) {
if (!value) {
this.eB = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case E_P:
if (value == null) {
unsetEP();
} else {
setEP((FileDoesNotExistException)value);
}
break;
case E_S:
if (value == null) {
unsetES();
} else {
setES((SuspectedFileSizeException)value);
}
break;
case E_B:
if (value == null) {
unsetEB();
} else {
setEB((BlockInfoException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case E_P:
return getEP();
case E_S:
return getES();
case E_B:
return getEB();
}
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 E_P:
return isSetEP();
case E_S:
return isSetES();
case E_B:
return isSetEB();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof cacheBlock_result)
return this.equals((cacheBlock_result)that);
return false;
}
public boolean equals(cacheBlock_result that) {
if (that == null)
return false;
boolean this_present_eP = true && this.isSetEP();
boolean that_present_eP = true && that.isSetEP();
if (this_present_eP || that_present_eP) {
if (!(this_present_eP && that_present_eP))
return false;
if (!this.eP.equals(that.eP))
return false;
}
boolean this_present_eS = true && this.isSetES();
boolean that_present_eS = true && that.isSetES();
if (this_present_eS || that_present_eS) {
if (!(this_present_eS && that_present_eS))
return false;
if (!this.eS.equals(that.eS))
return false;
}
boolean this_present_eB = true && this.isSetEB();
boolean that_present_eB = true && that.isSetEB();
if (this_present_eB || that_present_eB) {
if (!(this_present_eB && that_present_eB))
return false;
if (!this.eB.equals(that.eB))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(cacheBlock_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
cacheBlock_result typedOther = (cacheBlock_result)other;
lastComparison = Boolean.valueOf(isSetEP()).compareTo(typedOther.isSetEP());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEP()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eP, typedOther.eP);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetES()).compareTo(typedOther.isSetES());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetES()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eS, typedOther.eS);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetEB()).compareTo(typedOther.isSetEB());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEB()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eB, typedOther.eB);
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("cacheBlock_result(");
boolean first = true;
sb.append("eP:");
if (this.eP == null) {
sb.append("null");
} else {
sb.append(this.eP);
}
first = false;
if (!first) sb.append(", ");
sb.append("eS:");
if (this.eS == null) {
sb.append("null");
} else {
sb.append(this.eS);
}
first = false;
if (!first) sb.append(", ");
sb.append("eB:");
if (this.eB == null) {
sb.append("null");
} else {
sb.append(this.eB);
}
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 cacheBlock_resultStandardSchemeFactory implements SchemeFactory {
public cacheBlock_resultStandardScheme getScheme() {
return new cacheBlock_resultStandardScheme();
}
}
private static class cacheBlock_resultStandardScheme extends StandardScheme<cacheBlock_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, cacheBlock_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 1: // E_P
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.eP = new FileDoesNotExistException();
struct.eP.read(iprot);
struct.setEPIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // E_S
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.eS = new SuspectedFileSizeException();
struct.eS.read(iprot);
struct.setESIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // E_B
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.eB = new BlockInfoException();
struct.eB.read(iprot);
struct.setEBIsSet(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, cacheBlock_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.eP != null) {
oprot.writeFieldBegin(E_P_FIELD_DESC);
struct.eP.write(oprot);
oprot.writeFieldEnd();
}
if (struct.eS != null) {
oprot.writeFieldBegin(E_S_FIELD_DESC);
struct.eS.write(oprot);
oprot.writeFieldEnd();
}
if (struct.eB != null) {
oprot.writeFieldBegin(E_B_FIELD_DESC);
struct.eB.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class cacheBlock_resultTupleSchemeFactory implements SchemeFactory {
public cacheBlock_resultTupleScheme getScheme() {
return new cacheBlock_resultTupleScheme();
}
}
private static class cacheBlock_resultTupleScheme extends TupleScheme<cacheBlock_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, cacheBlock_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetEP()) {
optionals.set(0);
}
if (struct.isSetES()) {
optionals.set(1);
}
if (struct.isSetEB()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetEP()) {
struct.eP.write(oprot);
}
if (struct.isSetES()) {
struct.eS.write(oprot);
}
if (struct.isSetEB()) {
struct.eB.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, cacheBlock_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.eP = new FileDoesNotExistException();
struct.eP.read(iprot);
struct.setEPIsSet(true);
}
if (incoming.get(1)) {
struct.eS = new SuspectedFileSizeException();
struct.eS.read(iprot);
struct.setESIsSet(true);
}
if (incoming.get(2)) {
struct.eB = new BlockInfoException();
struct.eB.read(iprot);
struct.setEBIsSet(true);
}
}
}
}
public static class getDataFolder_args implements org.apache.thrift.TBase<getDataFolder_args, getDataFolder_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getDataFolder_args");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getDataFolder_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getDataFolder_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(getDataFolder_args.class, metaDataMap);
}
public getDataFolder_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getDataFolder_args(getDataFolder_args other) {
}
public getDataFolder_args deepCopy() {
return new getDataFolder_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 getDataFolder_args)
return this.equals((getDataFolder_args)that);
return false;
}
public boolean equals(getDataFolder_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getDataFolder_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getDataFolder_args typedOther = (getDataFolder_args)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getDataFolder_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 getDataFolder_argsStandardSchemeFactory implements SchemeFactory {
public getDataFolder_argsStandardScheme getScheme() {
return new getDataFolder_argsStandardScheme();
}
}
private static class getDataFolder_argsStandardScheme extends StandardScheme<getDataFolder_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getDataFolder_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, getDataFolder_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getDataFolder_argsTupleSchemeFactory implements SchemeFactory {
public getDataFolder_argsTupleScheme getScheme() {
return new getDataFolder_argsTupleScheme();
}
}
private static class getDataFolder_argsTupleScheme extends TupleScheme<getDataFolder_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getDataFolder_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getDataFolder_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class getDataFolder_result implements org.apache.thrift.TBase<getDataFolder_result, getDataFolder_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getDataFolder_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getDataFolder_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getDataFolder_resultTupleSchemeFactory());
}
public String success; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getDataFolder_result.class, metaDataMap);
}
public getDataFolder_result() {
}
public getDataFolder_result(
String success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getDataFolder_result(getDataFolder_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
}
public getDataFolder_result deepCopy() {
return new getDataFolder_result(this);
}
@Override
public void clear() {
this.success = null;
}
public String getSuccess() {
return this.success;
}
public getDataFolder_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 void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getDataFolder_result)
return this.equals((getDataFolder_result)that);
return false;
}
public boolean equals(getDataFolder_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getDataFolder_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getDataFolder_result typedOther = (getDataFolder_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getDataFolder_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
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 getDataFolder_resultStandardSchemeFactory implements SchemeFactory {
public getDataFolder_resultStandardScheme getScheme() {
return new getDataFolder_resultStandardScheme();
}
}
private static class getDataFolder_resultStandardScheme extends StandardScheme<getDataFolder_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getDataFolder_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;
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, getDataFolder_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();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getDataFolder_resultTupleSchemeFactory implements SchemeFactory {
public getDataFolder_resultTupleScheme getScheme() {
return new getDataFolder_resultTupleScheme();
}
}
private static class getDataFolder_resultTupleScheme extends TupleScheme<getDataFolder_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getDataFolder_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.writeString(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getDataFolder_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
}
}
}
}
public static class getUserTempFolder_args implements org.apache.thrift.TBase<getUserTempFolder_args, getUserTempFolder_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserTempFolder_args");
private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", 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 getUserTempFolder_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getUserTempFolder_argsTupleSchemeFactory());
}
public long userId; // 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 {
USER_ID((short)1, "userId");
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: // USER_ID
return USER_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 __USERID_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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserTempFolder_args.class, metaDataMap);
}
public getUserTempFolder_args() {
}
public getUserTempFolder_args(
long userId)
{
this();
this.userId = userId;
setUserIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getUserTempFolder_args(getUserTempFolder_args other) {
__isset_bitfield = other.__isset_bitfield;
this.userId = other.userId;
}
public getUserTempFolder_args deepCopy() {
return new getUserTempFolder_args(this);
}
@Override
public void clear() {
setUserIdIsSet(false);
this.userId = 0;
}
public long getUserId() {
return this.userId;
}
public getUserTempFolder_args setUserId(long userId) {
this.userId = userId;
setUserIdIsSet(true);
return this;
}
public void unsetUserId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USERID_ISSET_ID);
}
/** Returns true if field userId is set (has been assigned a value) and false otherwise */
public boolean isSetUserId() {
return EncodingUtils.testBit(__isset_bitfield, __USERID_ISSET_ID);
}
public void setUserIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USERID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case USER_ID:
if (value == null) {
unsetUserId();
} else {
setUserId((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case USER_ID:
return Long.valueOf(getUserId());
}
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 USER_ID:
return isSetUserId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getUserTempFolder_args)
return this.equals((getUserTempFolder_args)that);
return false;
}
public boolean equals(getUserTempFolder_args that) {
if (that == null)
return false;
boolean this_present_userId = true;
boolean that_present_userId = true;
if (this_present_userId || that_present_userId) {
if (!(this_present_userId && that_present_userId))
return false;
if (this.userId != that.userId)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getUserTempFolder_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getUserTempFolder_args typedOther = (getUserTempFolder_args)other;
lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUserId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
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("getUserTempFolder_args(");
boolean first = true;
sb.append("userId:");
sb.append(this.userId);
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 getUserTempFolder_argsStandardSchemeFactory implements SchemeFactory {
public getUserTempFolder_argsStandardScheme getScheme() {
return new getUserTempFolder_argsStandardScheme();
}
}
private static class getUserTempFolder_argsStandardScheme extends StandardScheme<getUserTempFolder_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getUserTempFolder_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: // USER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.userId = iprot.readI64();
struct.setUserIdIsSet(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, getUserTempFolder_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(USER_ID_FIELD_DESC);
oprot.writeI64(struct.userId);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getUserTempFolder_argsTupleSchemeFactory implements SchemeFactory {
public getUserTempFolder_argsTupleScheme getScheme() {
return new getUserTempFolder_argsTupleScheme();
}
}
private static class getUserTempFolder_argsTupleScheme extends TupleScheme<getUserTempFolder_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUserTempFolder_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetUserId()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetUserId()) {
oprot.writeI64(struct.userId);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUserTempFolder_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.userId = iprot.readI64();
struct.setUserIdIsSet(true);
}
}
}
}
public static class getUserTempFolder_result implements org.apache.thrift.TBase<getUserTempFolder_result, getUserTempFolder_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserTempFolder_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getUserTempFolder_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getUserTempFolder_resultTupleSchemeFactory());
}
public String success; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserTempFolder_result.class, metaDataMap);
}
public getUserTempFolder_result() {
}
public getUserTempFolder_result(
String success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getUserTempFolder_result(getUserTempFolder_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
}
public getUserTempFolder_result deepCopy() {
return new getUserTempFolder_result(this);
}
@Override
public void clear() {
this.success = null;
}
public String getSuccess() {
return this.success;
}
public getUserTempFolder_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 void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getUserTempFolder_result)
return this.equals((getUserTempFolder_result)that);
return false;
}
public boolean equals(getUserTempFolder_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getUserTempFolder_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getUserTempFolder_result typedOther = (getUserTempFolder_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getUserTempFolder_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
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 getUserTempFolder_resultStandardSchemeFactory implements SchemeFactory {
public getUserTempFolder_resultStandardScheme getScheme() {
return new getUserTempFolder_resultStandardScheme();
}
}
private static class getUserTempFolder_resultStandardScheme extends StandardScheme<getUserTempFolder_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getUserTempFolder_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;
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, getUserTempFolder_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();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getUserTempFolder_resultTupleSchemeFactory implements SchemeFactory {
public getUserTempFolder_resultTupleScheme getScheme() {
return new getUserTempFolder_resultTupleScheme();
}
}
private static class getUserTempFolder_resultTupleScheme extends TupleScheme<getUserTempFolder_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUserTempFolder_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.writeString(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUserTempFolder_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
}
}
}
}
public static class getUserUnderfsTempFolder_args implements org.apache.thrift.TBase<getUserUnderfsTempFolder_args, getUserUnderfsTempFolder_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserUnderfsTempFolder_args");
private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", 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 getUserUnderfsTempFolder_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getUserUnderfsTempFolder_argsTupleSchemeFactory());
}
public long userId; // 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 {
USER_ID((short)1, "userId");
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: // USER_ID
return USER_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 __USERID_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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserUnderfsTempFolder_args.class, metaDataMap);
}
public getUserUnderfsTempFolder_args() {
}
public getUserUnderfsTempFolder_args(
long userId)
{
this();
this.userId = userId;
setUserIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getUserUnderfsTempFolder_args(getUserUnderfsTempFolder_args other) {
__isset_bitfield = other.__isset_bitfield;
this.userId = other.userId;
}
public getUserUnderfsTempFolder_args deepCopy() {
return new getUserUnderfsTempFolder_args(this);
}
@Override
public void clear() {
setUserIdIsSet(false);
this.userId = 0;
}
public long getUserId() {
return this.userId;
}
public getUserUnderfsTempFolder_args setUserId(long userId) {
this.userId = userId;
setUserIdIsSet(true);
return this;
}
public void unsetUserId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USERID_ISSET_ID);
}
/** Returns true if field userId is set (has been assigned a value) and false otherwise */
public boolean isSetUserId() {
return EncodingUtils.testBit(__isset_bitfield, __USERID_ISSET_ID);
}
public void setUserIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USERID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case USER_ID:
if (value == null) {
unsetUserId();
} else {
setUserId((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case USER_ID:
return Long.valueOf(getUserId());
}
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 USER_ID:
return isSetUserId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getUserUnderfsTempFolder_args)
return this.equals((getUserUnderfsTempFolder_args)that);
return false;
}
public boolean equals(getUserUnderfsTempFolder_args that) {
if (that == null)
return false;
boolean this_present_userId = true;
boolean that_present_userId = true;
if (this_present_userId || that_present_userId) {
if (!(this_present_userId && that_present_userId))
return false;
if (this.userId != that.userId)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getUserUnderfsTempFolder_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getUserUnderfsTempFolder_args typedOther = (getUserUnderfsTempFolder_args)other;
lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUserId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
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("getUserUnderfsTempFolder_args(");
boolean first = true;
sb.append("userId:");
sb.append(this.userId);
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 getUserUnderfsTempFolder_argsStandardSchemeFactory implements SchemeFactory {
public getUserUnderfsTempFolder_argsStandardScheme getScheme() {
return new getUserUnderfsTempFolder_argsStandardScheme();
}
}
private static class getUserUnderfsTempFolder_argsStandardScheme extends StandardScheme<getUserUnderfsTempFolder_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getUserUnderfsTempFolder_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: // USER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.userId = iprot.readI64();
struct.setUserIdIsSet(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, getUserUnderfsTempFolder_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(USER_ID_FIELD_DESC);
oprot.writeI64(struct.userId);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getUserUnderfsTempFolder_argsTupleSchemeFactory implements SchemeFactory {
public getUserUnderfsTempFolder_argsTupleScheme getScheme() {
return new getUserUnderfsTempFolder_argsTupleScheme();
}
}
private static class getUserUnderfsTempFolder_argsTupleScheme extends TupleScheme<getUserUnderfsTempFolder_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUserUnderfsTempFolder_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetUserId()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetUserId()) {
oprot.writeI64(struct.userId);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUserUnderfsTempFolder_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.userId = iprot.readI64();
struct.setUserIdIsSet(true);
}
}
}
}
public static class getUserUnderfsTempFolder_result implements org.apache.thrift.TBase<getUserUnderfsTempFolder_result, getUserUnderfsTempFolder_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserUnderfsTempFolder_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getUserUnderfsTempFolder_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getUserUnderfsTempFolder_resultTupleSchemeFactory());
}
public String success; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserUnderfsTempFolder_result.class, metaDataMap);
}
public getUserUnderfsTempFolder_result() {
}
public getUserUnderfsTempFolder_result(
String success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getUserUnderfsTempFolder_result(getUserUnderfsTempFolder_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
}
public getUserUnderfsTempFolder_result deepCopy() {
return new getUserUnderfsTempFolder_result(this);
}
@Override
public void clear() {
this.success = null;
}
public String getSuccess() {
return this.success;
}
public getUserUnderfsTempFolder_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 void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getUserUnderfsTempFolder_result)
return this.equals((getUserUnderfsTempFolder_result)that);
return false;
}
public boolean equals(getUserUnderfsTempFolder_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getUserUnderfsTempFolder_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getUserUnderfsTempFolder_result typedOther = (getUserUnderfsTempFolder_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getUserUnderfsTempFolder_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
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 getUserUnderfsTempFolder_resultStandardSchemeFactory implements SchemeFactory {
public getUserUnderfsTempFolder_resultStandardScheme getScheme() {
return new getUserUnderfsTempFolder_resultStandardScheme();
}
}
private static class getUserUnderfsTempFolder_resultStandardScheme extends StandardScheme<getUserUnderfsTempFolder_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getUserUnderfsTempFolder_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;
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, getUserUnderfsTempFolder_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();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getUserUnderfsTempFolder_resultTupleSchemeFactory implements SchemeFactory {
public getUserUnderfsTempFolder_resultTupleScheme getScheme() {
return new getUserUnderfsTempFolder_resultTupleScheme();
}
}
private static class getUserUnderfsTempFolder_resultTupleScheme extends TupleScheme<getUserUnderfsTempFolder_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUserUnderfsTempFolder_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.writeString(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUserUnderfsTempFolder_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
}
}
}
}
public static class lockBlock_args implements org.apache.thrift.TBase<lockBlock_args, lockBlock_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("lockBlock_args");
private static final org.apache.thrift.protocol.TField BLOCK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new lockBlock_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new lockBlock_argsTupleSchemeFactory());
}
public long blockId; // required
public long userId; // 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 {
BLOCK_ID((short)1, "blockId"),
USER_ID((short)2, "userId");
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: // BLOCK_ID
return BLOCK_ID;
case 2: // USER_ID
return USER_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 __BLOCKID_ISSET_ID = 0;
private static final int __USERID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(lockBlock_args.class, metaDataMap);
}
public lockBlock_args() {
}
public lockBlock_args(
long blockId,
long userId)
{
this();
this.blockId = blockId;
setBlockIdIsSet(true);
this.userId = userId;
setUserIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public lockBlock_args(lockBlock_args other) {
__isset_bitfield = other.__isset_bitfield;
this.blockId = other.blockId;
this.userId = other.userId;
}
public lockBlock_args deepCopy() {
return new lockBlock_args(this);
}
@Override
public void clear() {
setBlockIdIsSet(false);
this.blockId = 0;
setUserIdIsSet(false);
this.userId = 0;
}
public long getBlockId() {
return this.blockId;
}
public lockBlock_args setBlockId(long blockId) {
this.blockId = blockId;
setBlockIdIsSet(true);
return this;
}
public void unsetBlockId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKID_ISSET_ID);
}
/** Returns true if field blockId is set (has been assigned a value) and false otherwise */
public boolean isSetBlockId() {
return EncodingUtils.testBit(__isset_bitfield, __BLOCKID_ISSET_ID);
}
public void setBlockIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKID_ISSET_ID, value);
}
public long getUserId() {
return this.userId;
}
public lockBlock_args setUserId(long userId) {
this.userId = userId;
setUserIdIsSet(true);
return this;
}
public void unsetUserId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USERID_ISSET_ID);
}
/** Returns true if field userId is set (has been assigned a value) and false otherwise */
public boolean isSetUserId() {
return EncodingUtils.testBit(__isset_bitfield, __USERID_ISSET_ID);
}
public void setUserIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USERID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case BLOCK_ID:
if (value == null) {
unsetBlockId();
} else {
setBlockId((Long)value);
}
break;
case USER_ID:
if (value == null) {
unsetUserId();
} else {
setUserId((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case BLOCK_ID:
return Long.valueOf(getBlockId());
case USER_ID:
return Long.valueOf(getUserId());
}
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 BLOCK_ID:
return isSetBlockId();
case USER_ID:
return isSetUserId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof lockBlock_args)
return this.equals((lockBlock_args)that);
return false;
}
public boolean equals(lockBlock_args that) {
if (that == null)
return false;
boolean this_present_blockId = true;
boolean that_present_blockId = true;
if (this_present_blockId || that_present_blockId) {
if (!(this_present_blockId && that_present_blockId))
return false;
if (this.blockId != that.blockId)
return false;
}
boolean this_present_userId = true;
boolean that_present_userId = true;
if (this_present_userId || that_present_userId) {
if (!(this_present_userId && that_present_userId))
return false;
if (this.userId != that.userId)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(lockBlock_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lockBlock_args typedOther = (lockBlock_args)other;
lastComparison = Boolean.valueOf(isSetBlockId()).compareTo(typedOther.isSetBlockId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBlockId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockId, typedOther.blockId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUserId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
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("lockBlock_args(");
boolean first = true;
sb.append("blockId:");
sb.append(this.blockId);
first = false;
if (!first) sb.append(", ");
sb.append("userId:");
sb.append(this.userId);
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 lockBlock_argsStandardSchemeFactory implements SchemeFactory {
public lockBlock_argsStandardScheme getScheme() {
return new lockBlock_argsStandardScheme();
}
}
private static class lockBlock_argsStandardScheme extends StandardScheme<lockBlock_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, lockBlock_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: // BLOCK_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.blockId = iprot.readI64();
struct.setBlockIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // USER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.userId = iprot.readI64();
struct.setUserIdIsSet(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, lockBlock_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(BLOCK_ID_FIELD_DESC);
oprot.writeI64(struct.blockId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(USER_ID_FIELD_DESC);
oprot.writeI64(struct.userId);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class lockBlock_argsTupleSchemeFactory implements SchemeFactory {
public lockBlock_argsTupleScheme getScheme() {
return new lockBlock_argsTupleScheme();
}
}
private static class lockBlock_argsTupleScheme extends TupleScheme<lockBlock_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, lockBlock_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetBlockId()) {
optionals.set(0);
}
if (struct.isSetUserId()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetBlockId()) {
oprot.writeI64(struct.blockId);
}
if (struct.isSetUserId()) {
oprot.writeI64(struct.userId);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, lockBlock_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.blockId = iprot.readI64();
struct.setBlockIdIsSet(true);
}
if (incoming.get(1)) {
struct.userId = iprot.readI64();
struct.setUserIdIsSet(true);
}
}
}
}
public static class lockBlock_result implements org.apache.thrift.TBase<lockBlock_result, lockBlock_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("lockBlock_result");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new lockBlock_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new lockBlock_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(lockBlock_result.class, metaDataMap);
}
public lockBlock_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public lockBlock_result(lockBlock_result other) {
}
public lockBlock_result deepCopy() {
return new lockBlock_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 lockBlock_result)
return this.equals((lockBlock_result)that);
return false;
}
public boolean equals(lockBlock_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(lockBlock_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lockBlock_result typedOther = (lockBlock_result)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("lockBlock_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 lockBlock_resultStandardSchemeFactory implements SchemeFactory {
public lockBlock_resultStandardScheme getScheme() {
return new lockBlock_resultStandardScheme();
}
}
private static class lockBlock_resultStandardScheme extends StandardScheme<lockBlock_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, lockBlock_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, lockBlock_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class lockBlock_resultTupleSchemeFactory implements SchemeFactory {
public lockBlock_resultTupleScheme getScheme() {
return new lockBlock_resultTupleScheme();
}
}
private static class lockBlock_resultTupleScheme extends TupleScheme<lockBlock_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, lockBlock_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, lockBlock_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class returnSpace_args implements org.apache.thrift.TBase<returnSpace_args, returnSpace_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("returnSpace_args");
private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField RETURNED_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("returnedBytes", org.apache.thrift.protocol.TType.I64, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new returnSpace_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new returnSpace_argsTupleSchemeFactory());
}
public long userId; // required
public long returnedBytes; // 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 {
USER_ID((short)1, "userId"),
RETURNED_BYTES((short)2, "returnedBytes");
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: // USER_ID
return USER_ID;
case 2: // RETURNED_BYTES
return RETURNED_BYTES;
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 __USERID_ISSET_ID = 0;
private static final int __RETURNEDBYTES_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.RETURNED_BYTES, new org.apache.thrift.meta_data.FieldMetaData("returnedBytes", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(returnSpace_args.class, metaDataMap);
}
public returnSpace_args() {
}
public returnSpace_args(
long userId,
long returnedBytes)
{
this();
this.userId = userId;
setUserIdIsSet(true);
this.returnedBytes = returnedBytes;
setReturnedBytesIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public returnSpace_args(returnSpace_args other) {
__isset_bitfield = other.__isset_bitfield;
this.userId = other.userId;
this.returnedBytes = other.returnedBytes;
}
public returnSpace_args deepCopy() {
return new returnSpace_args(this);
}
@Override
public void clear() {
setUserIdIsSet(false);
this.userId = 0;
setReturnedBytesIsSet(false);
this.returnedBytes = 0;
}
public long getUserId() {
return this.userId;
}
public returnSpace_args setUserId(long userId) {
this.userId = userId;
setUserIdIsSet(true);
return this;
}
public void unsetUserId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USERID_ISSET_ID);
}
/** Returns true if field userId is set (has been assigned a value) and false otherwise */
public boolean isSetUserId() {
return EncodingUtils.testBit(__isset_bitfield, __USERID_ISSET_ID);
}
public void setUserIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USERID_ISSET_ID, value);
}
public long getReturnedBytes() {
return this.returnedBytes;
}
public returnSpace_args setReturnedBytes(long returnedBytes) {
this.returnedBytes = returnedBytes;
setReturnedBytesIsSet(true);
return this;
}
public void unsetReturnedBytes() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RETURNEDBYTES_ISSET_ID);
}
/** Returns true if field returnedBytes is set (has been assigned a value) and false otherwise */
public boolean isSetReturnedBytes() {
return EncodingUtils.testBit(__isset_bitfield, __RETURNEDBYTES_ISSET_ID);
}
public void setReturnedBytesIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RETURNEDBYTES_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case USER_ID:
if (value == null) {
unsetUserId();
} else {
setUserId((Long)value);
}
break;
case RETURNED_BYTES:
if (value == null) {
unsetReturnedBytes();
} else {
setReturnedBytes((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case USER_ID:
return Long.valueOf(getUserId());
case RETURNED_BYTES:
return Long.valueOf(getReturnedBytes());
}
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 USER_ID:
return isSetUserId();
case RETURNED_BYTES:
return isSetReturnedBytes();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof returnSpace_args)
return this.equals((returnSpace_args)that);
return false;
}
public boolean equals(returnSpace_args that) {
if (that == null)
return false;
boolean this_present_userId = true;
boolean that_present_userId = true;
if (this_present_userId || that_present_userId) {
if (!(this_present_userId && that_present_userId))
return false;
if (this.userId != that.userId)
return false;
}
boolean this_present_returnedBytes = true;
boolean that_present_returnedBytes = true;
if (this_present_returnedBytes || that_present_returnedBytes) {
if (!(this_present_returnedBytes && that_present_returnedBytes))
return false;
if (this.returnedBytes != that.returnedBytes)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(returnSpace_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
returnSpace_args typedOther = (returnSpace_args)other;
lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUserId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetReturnedBytes()).compareTo(typedOther.isSetReturnedBytes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReturnedBytes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.returnedBytes, typedOther.returnedBytes);
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("returnSpace_args(");
boolean first = true;
sb.append("userId:");
sb.append(this.userId);
first = false;
if (!first) sb.append(", ");
sb.append("returnedBytes:");
sb.append(this.returnedBytes);
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 returnSpace_argsStandardSchemeFactory implements SchemeFactory {
public returnSpace_argsStandardScheme getScheme() {
return new returnSpace_argsStandardScheme();
}
}
private static class returnSpace_argsStandardScheme extends StandardScheme<returnSpace_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, returnSpace_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: // USER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.userId = iprot.readI64();
struct.setUserIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // RETURNED_BYTES
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.returnedBytes = iprot.readI64();
struct.setReturnedBytesIsSet(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, returnSpace_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(USER_ID_FIELD_DESC);
oprot.writeI64(struct.userId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(RETURNED_BYTES_FIELD_DESC);
oprot.writeI64(struct.returnedBytes);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class returnSpace_argsTupleSchemeFactory implements SchemeFactory {
public returnSpace_argsTupleScheme getScheme() {
return new returnSpace_argsTupleScheme();
}
}
private static class returnSpace_argsTupleScheme extends TupleScheme<returnSpace_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, returnSpace_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetUserId()) {
optionals.set(0);
}
if (struct.isSetReturnedBytes()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetUserId()) {
oprot.writeI64(struct.userId);
}
if (struct.isSetReturnedBytes()) {
oprot.writeI64(struct.returnedBytes);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, returnSpace_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userId = iprot.readI64();
struct.setUserIdIsSet(true);
}
if (incoming.get(1)) {
struct.returnedBytes = iprot.readI64();
struct.setReturnedBytesIsSet(true);
}
}
}
}
public static class returnSpace_result implements org.apache.thrift.TBase<returnSpace_result, returnSpace_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("returnSpace_result");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new returnSpace_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new returnSpace_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(returnSpace_result.class, metaDataMap);
}
public returnSpace_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public returnSpace_result(returnSpace_result other) {
}
public returnSpace_result deepCopy() {
return new returnSpace_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 returnSpace_result)
return this.equals((returnSpace_result)that);
return false;
}
public boolean equals(returnSpace_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(returnSpace_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
returnSpace_result typedOther = (returnSpace_result)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("returnSpace_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 returnSpace_resultStandardSchemeFactory implements SchemeFactory {
public returnSpace_resultStandardScheme getScheme() {
return new returnSpace_resultStandardScheme();
}
}
private static class returnSpace_resultStandardScheme extends StandardScheme<returnSpace_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, returnSpace_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, returnSpace_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class returnSpace_resultTupleSchemeFactory implements SchemeFactory {
public returnSpace_resultTupleScheme getScheme() {
return new returnSpace_resultTupleScheme();
}
}
private static class returnSpace_resultTupleScheme extends TupleScheme<returnSpace_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, returnSpace_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, returnSpace_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class requestSpace_args implements org.apache.thrift.TBase<requestSpace_args, requestSpace_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestSpace_args");
private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField REQUEST_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("requestBytes", org.apache.thrift.protocol.TType.I64, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new requestSpace_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new requestSpace_argsTupleSchemeFactory());
}
public long userId; // required
public long requestBytes; // 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 {
USER_ID((short)1, "userId"),
REQUEST_BYTES((short)2, "requestBytes");
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: // USER_ID
return USER_ID;
case 2: // REQUEST_BYTES
return REQUEST_BYTES;
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 __USERID_ISSET_ID = 0;
private static final int __REQUESTBYTES_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.REQUEST_BYTES, new org.apache.thrift.meta_data.FieldMetaData("requestBytes", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestSpace_args.class, metaDataMap);
}
public requestSpace_args() {
}
public requestSpace_args(
long userId,
long requestBytes)
{
this();
this.userId = userId;
setUserIdIsSet(true);
this.requestBytes = requestBytes;
setRequestBytesIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public requestSpace_args(requestSpace_args other) {
__isset_bitfield = other.__isset_bitfield;
this.userId = other.userId;
this.requestBytes = other.requestBytes;
}
public requestSpace_args deepCopy() {
return new requestSpace_args(this);
}
@Override
public void clear() {
setUserIdIsSet(false);
this.userId = 0;
setRequestBytesIsSet(false);
this.requestBytes = 0;
}
public long getUserId() {
return this.userId;
}
public requestSpace_args setUserId(long userId) {
this.userId = userId;
setUserIdIsSet(true);
return this;
}
public void unsetUserId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USERID_ISSET_ID);
}
/** Returns true if field userId is set (has been assigned a value) and false otherwise */
public boolean isSetUserId() {
return EncodingUtils.testBit(__isset_bitfield, __USERID_ISSET_ID);
}
public void setUserIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USERID_ISSET_ID, value);
}
public long getRequestBytes() {
return this.requestBytes;
}
public requestSpace_args setRequestBytes(long requestBytes) {
this.requestBytes = requestBytes;
setRequestBytesIsSet(true);
return this;
}
public void unsetRequestBytes() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTBYTES_ISSET_ID);
}
/** Returns true if field requestBytes is set (has been assigned a value) and false otherwise */
public boolean isSetRequestBytes() {
return EncodingUtils.testBit(__isset_bitfield, __REQUESTBYTES_ISSET_ID);
}
public void setRequestBytesIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTBYTES_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case USER_ID:
if (value == null) {
unsetUserId();
} else {
setUserId((Long)value);
}
break;
case REQUEST_BYTES:
if (value == null) {
unsetRequestBytes();
} else {
setRequestBytes((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case USER_ID:
return Long.valueOf(getUserId());
case REQUEST_BYTES:
return Long.valueOf(getRequestBytes());
}
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 USER_ID:
return isSetUserId();
case REQUEST_BYTES:
return isSetRequestBytes();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof requestSpace_args)
return this.equals((requestSpace_args)that);
return false;
}
public boolean equals(requestSpace_args that) {
if (that == null)
return false;
boolean this_present_userId = true;
boolean that_present_userId = true;
if (this_present_userId || that_present_userId) {
if (!(this_present_userId && that_present_userId))
return false;
if (this.userId != that.userId)
return false;
}
boolean this_present_requestBytes = true;
boolean that_present_requestBytes = true;
if (this_present_requestBytes || that_present_requestBytes) {
if (!(this_present_requestBytes && that_present_requestBytes))
return false;
if (this.requestBytes != that.requestBytes)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(requestSpace_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
requestSpace_args typedOther = (requestSpace_args)other;
lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUserId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRequestBytes()).compareTo(typedOther.isSetRequestBytes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRequestBytes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestBytes, typedOther.requestBytes);
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("requestSpace_args(");
boolean first = true;
sb.append("userId:");
sb.append(this.userId);
first = false;
if (!first) sb.append(", ");
sb.append("requestBytes:");
sb.append(this.requestBytes);
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 requestSpace_argsStandardSchemeFactory implements SchemeFactory {
public requestSpace_argsStandardScheme getScheme() {
return new requestSpace_argsStandardScheme();
}
}
private static class requestSpace_argsStandardScheme extends StandardScheme<requestSpace_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, requestSpace_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: // USER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.userId = iprot.readI64();
struct.setUserIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // REQUEST_BYTES
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.requestBytes = iprot.readI64();
struct.setRequestBytesIsSet(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, requestSpace_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(USER_ID_FIELD_DESC);
oprot.writeI64(struct.userId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(REQUEST_BYTES_FIELD_DESC);
oprot.writeI64(struct.requestBytes);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class requestSpace_argsTupleSchemeFactory implements SchemeFactory {
public requestSpace_argsTupleScheme getScheme() {
return new requestSpace_argsTupleScheme();
}
}
private static class requestSpace_argsTupleScheme extends TupleScheme<requestSpace_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, requestSpace_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetUserId()) {
optionals.set(0);
}
if (struct.isSetRequestBytes()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetUserId()) {
oprot.writeI64(struct.userId);
}
if (struct.isSetRequestBytes()) {
oprot.writeI64(struct.requestBytes);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, requestSpace_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userId = iprot.readI64();
struct.setUserIdIsSet(true);
}
if (incoming.get(1)) {
struct.requestBytes = iprot.readI64();
struct.setRequestBytesIsSet(true);
}
}
}
}
public static class requestSpace_result implements org.apache.thrift.TBase<requestSpace_result, requestSpace_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestSpace_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new requestSpace_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new requestSpace_resultTupleSchemeFactory());
}
public boolean 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.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestSpace_result.class, metaDataMap);
}
public requestSpace_result() {
}
public requestSpace_result(
boolean success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public requestSpace_result(requestSpace_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
}
public requestSpace_result deepCopy() {
return new requestSpace_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
}
public boolean isSuccess() {
return this.success;
}
public requestSpace_result setSuccess(boolean 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((Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Boolean.valueOf(isSuccess());
}
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 requestSpace_result)
return this.equals((requestSpace_result)that);
return false;
}
public boolean equals(requestSpace_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;
}
public int compareTo(requestSpace_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
requestSpace_result typedOther = (requestSpace_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("requestSpace_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 requestSpace_resultStandardSchemeFactory implements SchemeFactory {
public requestSpace_resultStandardScheme getScheme() {
return new requestSpace_resultStandardScheme();
}
}
private static class requestSpace_resultStandardScheme extends StandardScheme<requestSpace_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, requestSpace_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.BOOL) {
struct.success = iprot.readBool();
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, requestSpace_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class requestSpace_resultTupleSchemeFactory implements SchemeFactory {
public requestSpace_resultTupleScheme getScheme() {
return new requestSpace_resultTupleScheme();
}
}
private static class requestSpace_resultTupleScheme extends TupleScheme<requestSpace_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, requestSpace_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.writeBool(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, requestSpace_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
}
}
}
public static class unlockBlock_args implements org.apache.thrift.TBase<unlockBlock_args, unlockBlock_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unlockBlock_args");
private static final org.apache.thrift.protocol.TField BLOCK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new unlockBlock_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new unlockBlock_argsTupleSchemeFactory());
}
public long blockId; // required
public long userId; // 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 {
BLOCK_ID((short)1, "blockId"),
USER_ID((short)2, "userId");
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: // BLOCK_ID
return BLOCK_ID;
case 2: // USER_ID
return USER_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 __BLOCKID_ISSET_ID = 0;
private static final int __USERID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.BLOCK_ID, new org.apache.thrift.meta_data.FieldMetaData("blockId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unlockBlock_args.class, metaDataMap);
}
public unlockBlock_args() {
}
public unlockBlock_args(
long blockId,
long userId)
{
this();
this.blockId = blockId;
setBlockIdIsSet(true);
this.userId = userId;
setUserIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public unlockBlock_args(unlockBlock_args other) {
__isset_bitfield = other.__isset_bitfield;
this.blockId = other.blockId;
this.userId = other.userId;
}
public unlockBlock_args deepCopy() {
return new unlockBlock_args(this);
}
@Override
public void clear() {
setBlockIdIsSet(false);
this.blockId = 0;
setUserIdIsSet(false);
this.userId = 0;
}
public long getBlockId() {
return this.blockId;
}
public unlockBlock_args setBlockId(long blockId) {
this.blockId = blockId;
setBlockIdIsSet(true);
return this;
}
public void unsetBlockId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKID_ISSET_ID);
}
/** Returns true if field blockId is set (has been assigned a value) and false otherwise */
public boolean isSetBlockId() {
return EncodingUtils.testBit(__isset_bitfield, __BLOCKID_ISSET_ID);
}
public void setBlockIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKID_ISSET_ID, value);
}
public long getUserId() {
return this.userId;
}
public unlockBlock_args setUserId(long userId) {
this.userId = userId;
setUserIdIsSet(true);
return this;
}
public void unsetUserId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USERID_ISSET_ID);
}
/** Returns true if field userId is set (has been assigned a value) and false otherwise */
public boolean isSetUserId() {
return EncodingUtils.testBit(__isset_bitfield, __USERID_ISSET_ID);
}
public void setUserIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USERID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case BLOCK_ID:
if (value == null) {
unsetBlockId();
} else {
setBlockId((Long)value);
}
break;
case USER_ID:
if (value == null) {
unsetUserId();
} else {
setUserId((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case BLOCK_ID:
return Long.valueOf(getBlockId());
case USER_ID:
return Long.valueOf(getUserId());
}
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 BLOCK_ID:
return isSetBlockId();
case USER_ID:
return isSetUserId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof unlockBlock_args)
return this.equals((unlockBlock_args)that);
return false;
}
public boolean equals(unlockBlock_args that) {
if (that == null)
return false;
boolean this_present_blockId = true;
boolean that_present_blockId = true;
if (this_present_blockId || that_present_blockId) {
if (!(this_present_blockId && that_present_blockId))
return false;
if (this.blockId != that.blockId)
return false;
}
boolean this_present_userId = true;
boolean that_present_userId = true;
if (this_present_userId || that_present_userId) {
if (!(this_present_userId && that_present_userId))
return false;
if (this.userId != that.userId)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(unlockBlock_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
unlockBlock_args typedOther = (unlockBlock_args)other;
lastComparison = Boolean.valueOf(isSetBlockId()).compareTo(typedOther.isSetBlockId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBlockId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockId, typedOther.blockId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUserId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
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("unlockBlock_args(");
boolean first = true;
sb.append("blockId:");
sb.append(this.blockId);
first = false;
if (!first) sb.append(", ");
sb.append("userId:");
sb.append(this.userId);
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 unlockBlock_argsStandardSchemeFactory implements SchemeFactory {
public unlockBlock_argsStandardScheme getScheme() {
return new unlockBlock_argsStandardScheme();
}
}
private static class unlockBlock_argsStandardScheme extends StandardScheme<unlockBlock_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, unlockBlock_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: // BLOCK_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.blockId = iprot.readI64();
struct.setBlockIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // USER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.userId = iprot.readI64();
struct.setUserIdIsSet(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, unlockBlock_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(BLOCK_ID_FIELD_DESC);
oprot.writeI64(struct.blockId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(USER_ID_FIELD_DESC);
oprot.writeI64(struct.userId);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class unlockBlock_argsTupleSchemeFactory implements SchemeFactory {
public unlockBlock_argsTupleScheme getScheme() {
return new unlockBlock_argsTupleScheme();
}
}
private static class unlockBlock_argsTupleScheme extends TupleScheme<unlockBlock_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, unlockBlock_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetBlockId()) {
optionals.set(0);
}
if (struct.isSetUserId()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetBlockId()) {
oprot.writeI64(struct.blockId);
}
if (struct.isSetUserId()) {
oprot.writeI64(struct.userId);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, unlockBlock_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.blockId = iprot.readI64();
struct.setBlockIdIsSet(true);
}
if (incoming.get(1)) {
struct.userId = iprot.readI64();
struct.setUserIdIsSet(true);
}
}
}
}
public static class unlockBlock_result implements org.apache.thrift.TBase<unlockBlock_result, unlockBlock_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unlockBlock_result");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new unlockBlock_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new unlockBlock_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(unlockBlock_result.class, metaDataMap);
}
public unlockBlock_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public unlockBlock_result(unlockBlock_result other) {
}
public unlockBlock_result deepCopy() {
return new unlockBlock_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 unlockBlock_result)
return this.equals((unlockBlock_result)that);
return false;
}
public boolean equals(unlockBlock_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(unlockBlock_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
unlockBlock_result typedOther = (unlockBlock_result)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("unlockBlock_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 unlockBlock_resultStandardSchemeFactory implements SchemeFactory {
public unlockBlock_resultStandardScheme getScheme() {
return new unlockBlock_resultStandardScheme();
}
}
private static class unlockBlock_resultStandardScheme extends StandardScheme<unlockBlock_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, unlockBlock_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, unlockBlock_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class unlockBlock_resultTupleSchemeFactory implements SchemeFactory {
public unlockBlock_resultTupleScheme getScheme() {
return new unlockBlock_resultTupleScheme();
}
}
private static class unlockBlock_resultTupleScheme extends TupleScheme<unlockBlock_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, unlockBlock_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, unlockBlock_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class userHeartbeat_args implements org.apache.thrift.TBase<userHeartbeat_args, userHeartbeat_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("userHeartbeat_args");
private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", 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 userHeartbeat_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new userHeartbeat_argsTupleSchemeFactory());
}
public long userId; // 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 {
USER_ID((short)1, "userId");
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: // USER_ID
return USER_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 __USERID_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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(userHeartbeat_args.class, metaDataMap);
}
public userHeartbeat_args() {
}
public userHeartbeat_args(
long userId)
{
this();
this.userId = userId;
setUserIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public userHeartbeat_args(userHeartbeat_args other) {
__isset_bitfield = other.__isset_bitfield;
this.userId = other.userId;
}
public userHeartbeat_args deepCopy() {
return new userHeartbeat_args(this);
}
@Override
public void clear() {
setUserIdIsSet(false);
this.userId = 0;
}
public long getUserId() {
return this.userId;
}
public userHeartbeat_args setUserId(long userId) {
this.userId = userId;
setUserIdIsSet(true);
return this;
}
public void unsetUserId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USERID_ISSET_ID);
}
/** Returns true if field userId is set (has been assigned a value) and false otherwise */
public boolean isSetUserId() {
return EncodingUtils.testBit(__isset_bitfield, __USERID_ISSET_ID);
}
public void setUserIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USERID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case USER_ID:
if (value == null) {
unsetUserId();
} else {
setUserId((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case USER_ID:
return Long.valueOf(getUserId());
}
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 USER_ID:
return isSetUserId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof userHeartbeat_args)
return this.equals((userHeartbeat_args)that);
return false;
}
public boolean equals(userHeartbeat_args that) {
if (that == null)
return false;
boolean this_present_userId = true;
boolean that_present_userId = true;
if (this_present_userId || that_present_userId) {
if (!(this_present_userId && that_present_userId))
return false;
if (this.userId != that.userId)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(userHeartbeat_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
userHeartbeat_args typedOther = (userHeartbeat_args)other;
lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUserId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
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("userHeartbeat_args(");
boolean first = true;
sb.append("userId:");
sb.append(this.userId);
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 userHeartbeat_argsStandardSchemeFactory implements SchemeFactory {
public userHeartbeat_argsStandardScheme getScheme() {
return new userHeartbeat_argsStandardScheme();
}
}
private static class userHeartbeat_argsStandardScheme extends StandardScheme<userHeartbeat_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, userHeartbeat_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: // USER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.userId = iprot.readI64();
struct.setUserIdIsSet(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, userHeartbeat_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(USER_ID_FIELD_DESC);
oprot.writeI64(struct.userId);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class userHeartbeat_argsTupleSchemeFactory implements SchemeFactory {
public userHeartbeat_argsTupleScheme getScheme() {
return new userHeartbeat_argsTupleScheme();
}
}
private static class userHeartbeat_argsTupleScheme extends TupleScheme<userHeartbeat_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, userHeartbeat_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetUserId()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetUserId()) {
oprot.writeI64(struct.userId);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, userHeartbeat_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.userId = iprot.readI64();
struct.setUserIdIsSet(true);
}
}
}
}
public static class userHeartbeat_result implements org.apache.thrift.TBase<userHeartbeat_result, userHeartbeat_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("userHeartbeat_result");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new userHeartbeat_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new userHeartbeat_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(userHeartbeat_result.class, metaDataMap);
}
public userHeartbeat_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public userHeartbeat_result(userHeartbeat_result other) {
}
public userHeartbeat_result deepCopy() {
return new userHeartbeat_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 userHeartbeat_result)
return this.equals((userHeartbeat_result)that);
return false;
}
public boolean equals(userHeartbeat_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(userHeartbeat_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
userHeartbeat_result typedOther = (userHeartbeat_result)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("userHeartbeat_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 userHeartbeat_resultStandardSchemeFactory implements SchemeFactory {
public userHeartbeat_resultStandardScheme getScheme() {
return new userHeartbeat_resultStandardScheme();
}
}
private static class userHeartbeat_resultStandardScheme extends StandardScheme<userHeartbeat_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, userHeartbeat_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, userHeartbeat_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class userHeartbeat_resultTupleSchemeFactory implements SchemeFactory {
public userHeartbeat_resultTupleScheme getScheme() {
return new userHeartbeat_resultTupleScheme();
}
}
private static class userHeartbeat_resultTupleScheme extends TupleScheme<userHeartbeat_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, userHeartbeat_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, userHeartbeat_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
}