/**
* Autogenerated by Thrift Compiler (0.7.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package org.apache.hadoop.thriftfs.api;
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 ThriftHadoopFileSystem {
public interface Iface {
public void setInactivityTimeoutPeriod(long periodInSeconds) throws org.apache.thrift.TException;
public void shutdown(int status) throws org.apache.thrift.TException;
public ThriftHandle create(Pathname path) throws ThriftIOException, org.apache.thrift.TException;
public ThriftHandle createFile(Pathname path, short mode, boolean overwrite, int bufferSize, short block_replication, long blocksize) throws ThriftIOException, org.apache.thrift.TException;
public ThriftHandle open(Pathname path) throws ThriftIOException, org.apache.thrift.TException;
public ThriftHandle append(Pathname path) throws ThriftIOException, org.apache.thrift.TException;
public boolean write(ThriftHandle handle, String data) throws ThriftIOException, org.apache.thrift.TException;
public String read(ThriftHandle handle, long offset, int size) throws ThriftIOException, org.apache.thrift.TException;
public boolean close(ThriftHandle out) throws ThriftIOException, org.apache.thrift.TException;
public boolean rm(Pathname path, boolean recursive) throws ThriftIOException, org.apache.thrift.TException;
public boolean rename(Pathname path, Pathname dest) throws ThriftIOException, org.apache.thrift.TException;
public boolean mkdirs(Pathname path) throws ThriftIOException, org.apache.thrift.TException;
public boolean exists(Pathname path) throws ThriftIOException, org.apache.thrift.TException;
public FileStatus stat(Pathname path) throws ThriftIOException, org.apache.thrift.TException;
public List<FileStatus> listStatus(Pathname path) throws ThriftIOException, org.apache.thrift.TException;
public void chmod(Pathname path, short mode) throws ThriftIOException, org.apache.thrift.TException;
public void chown(Pathname path, String owner, String group) throws ThriftIOException, org.apache.thrift.TException;
public void setReplication(Pathname path, short replication) throws ThriftIOException, org.apache.thrift.TException;
public List<BlockLocation> getFileBlockLocations(Pathname path, long start, long length) throws ThriftIOException, org.apache.thrift.TException;
public boolean hardLink(Pathname src, Pathname dest) throws ThriftIOException, org.apache.thrift.TException;
public void concat(Pathname target, List<Pathname> srcs, boolean restricted) throws ThriftIOException, org.apache.thrift.TException;
public void reportBadBlocks(List<TLocatedBlock> blocks) throws ThriftIOException, org.apache.thrift.TException;
/**
* The following methods are typically used by native C++ hdfs client and
* are not used by hdfs applications themselves
*/
public int getDataTransferProtocolVersion() throws ThriftIOException, org.apache.thrift.TException;
public void renewLease(String clientName) throws ThriftIOException, org.apache.thrift.TException;
public void recoverLease(Pathname path, String clientName) throws ThriftIOException, org.apache.thrift.TException;
public void closeRecoverLease(Pathname path, String clientName, boolean discardLastBlock) throws ThriftIOException, org.apache.thrift.TException;
public void abandonBlock(TBlock block, Pathname pathname, String clientName) throws ThriftIOException, org.apache.thrift.TException;
public void abandonFile(Pathname pathname, String clientName) throws ThriftIOException, org.apache.thrift.TException;
public TLocatedBlock addBlock(Pathname pathname, String clientName, long startOffset, TBlock lastBlock, List<TDatanodeID> excludedNodes, List<TDatanodeID> favouredNodes) throws ThriftIOException, org.apache.thrift.TException;
public TLocatedBlock addFirstBlock(Pathname pathname, String clientName, List<TDatanodeID> excludedNodes, List<TDatanodeID> favouredNodes) throws ThriftIOException, org.apache.thrift.TException;
public boolean complete(Pathname pathname, String clientName, long fileLen, TBlock lastBlock) throws ThriftIOException, org.apache.thrift.TException;
}
public interface AsyncIface {
public void setInactivityTimeoutPeriod(long periodInSeconds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.setInactivityTimeoutPeriod_call> resultHandler) throws org.apache.thrift.TException;
public void shutdown(int status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.shutdown_call> resultHandler) throws org.apache.thrift.TException;
public void create(Pathname path, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.create_call> resultHandler) throws org.apache.thrift.TException;
public void createFile(Pathname path, short mode, boolean overwrite, int bufferSize, short block_replication, long blocksize, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createFile_call> resultHandler) throws org.apache.thrift.TException;
public void open(Pathname path, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.open_call> resultHandler) throws org.apache.thrift.TException;
public void append(Pathname path, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.append_call> resultHandler) throws org.apache.thrift.TException;
public void write(ThriftHandle handle, String data, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.write_call> resultHandler) throws org.apache.thrift.TException;
public void read(ThriftHandle handle, long offset, int size, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.read_call> resultHandler) throws org.apache.thrift.TException;
public void close(ThriftHandle out, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.close_call> resultHandler) throws org.apache.thrift.TException;
public void rm(Pathname path, boolean recursive, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.rm_call> resultHandler) throws org.apache.thrift.TException;
public void rename(Pathname path, Pathname dest, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.rename_call> resultHandler) throws org.apache.thrift.TException;
public void mkdirs(Pathname path, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.mkdirs_call> resultHandler) throws org.apache.thrift.TException;
public void exists(Pathname path, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.exists_call> resultHandler) throws org.apache.thrift.TException;
public void stat(Pathname path, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.stat_call> resultHandler) throws org.apache.thrift.TException;
public void listStatus(Pathname path, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.listStatus_call> resultHandler) throws org.apache.thrift.TException;
public void chmod(Pathname path, short mode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.chmod_call> resultHandler) throws org.apache.thrift.TException;
public void chown(Pathname path, String owner, String group, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.chown_call> resultHandler) throws org.apache.thrift.TException;
public void setReplication(Pathname path, short replication, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.setReplication_call> resultHandler) throws org.apache.thrift.TException;
public void getFileBlockLocations(Pathname path, long start, long length, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getFileBlockLocations_call> resultHandler) throws org.apache.thrift.TException;
public void hardLink(Pathname src, Pathname dest, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.hardLink_call> resultHandler) throws org.apache.thrift.TException;
public void concat(Pathname target, List<Pathname> srcs, boolean restricted, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.concat_call> resultHandler) throws org.apache.thrift.TException;
public void reportBadBlocks(List<TLocatedBlock> blocks, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.reportBadBlocks_call> resultHandler) throws org.apache.thrift.TException;
public void getDataTransferProtocolVersion(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getDataTransferProtocolVersion_call> resultHandler) throws org.apache.thrift.TException;
public void renewLease(String clientName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.renewLease_call> resultHandler) throws org.apache.thrift.TException;
public void recoverLease(Pathname path, String clientName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.recoverLease_call> resultHandler) throws org.apache.thrift.TException;
public void closeRecoverLease(Pathname path, String clientName, boolean discardLastBlock, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closeRecoverLease_call> resultHandler) throws org.apache.thrift.TException;
public void abandonBlock(TBlock block, Pathname pathname, String clientName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.abandonBlock_call> resultHandler) throws org.apache.thrift.TException;
public void abandonFile(Pathname pathname, String clientName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.abandonFile_call> resultHandler) throws org.apache.thrift.TException;
public void addBlock(Pathname pathname, String clientName, long startOffset, TBlock lastBlock, List<TDatanodeID> excludedNodes, List<TDatanodeID> favouredNodes, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addBlock_call> resultHandler) throws org.apache.thrift.TException;
public void addFirstBlock(Pathname pathname, String clientName, List<TDatanodeID> excludedNodes, List<TDatanodeID> favouredNodes, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addFirstBlock_call> resultHandler) throws org.apache.thrift.TException;
public void complete(Pathname pathname, String clientName, long fileLen, TBlock lastBlock, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.complete_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 setInactivityTimeoutPeriod(long periodInSeconds) throws org.apache.thrift.TException
{
send_setInactivityTimeoutPeriod(periodInSeconds);
recv_setInactivityTimeoutPeriod();
}
public void send_setInactivityTimeoutPeriod(long periodInSeconds) throws org.apache.thrift.TException
{
setInactivityTimeoutPeriod_args args = new setInactivityTimeoutPeriod_args();
args.setPeriodInSeconds(periodInSeconds);
sendBase("setInactivityTimeoutPeriod", args);
}
public void recv_setInactivityTimeoutPeriod() throws org.apache.thrift.TException
{
setInactivityTimeoutPeriod_result result = new setInactivityTimeoutPeriod_result();
receiveBase(result, "setInactivityTimeoutPeriod");
return;
}
public void shutdown(int status) throws org.apache.thrift.TException
{
send_shutdown(status);
recv_shutdown();
}
public void send_shutdown(int status) throws org.apache.thrift.TException
{
shutdown_args args = new shutdown_args();
args.setStatus(status);
sendBase("shutdown", args);
}
public void recv_shutdown() throws org.apache.thrift.TException
{
shutdown_result result = new shutdown_result();
receiveBase(result, "shutdown");
return;
}
public ThriftHandle create(Pathname path) throws ThriftIOException, org.apache.thrift.TException
{
send_create(path);
return recv_create();
}
public void send_create(Pathname path) throws org.apache.thrift.TException
{
create_args args = new create_args();
args.setPath(path);
sendBase("create", args);
}
public ThriftHandle recv_create() throws ThriftIOException, org.apache.thrift.TException
{
create_result result = new create_result();
receiveBase(result, "create");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "create failed: unknown result");
}
public ThriftHandle createFile(Pathname path, short mode, boolean overwrite, int bufferSize, short block_replication, long blocksize) throws ThriftIOException, org.apache.thrift.TException
{
send_createFile(path, mode, overwrite, bufferSize, block_replication, blocksize);
return recv_createFile();
}
public void send_createFile(Pathname path, short mode, boolean overwrite, int bufferSize, short block_replication, long blocksize) throws org.apache.thrift.TException
{
createFile_args args = new createFile_args();
args.setPath(path);
args.setMode(mode);
args.setOverwrite(overwrite);
args.setBufferSize(bufferSize);
args.setBlock_replication(block_replication);
args.setBlocksize(blocksize);
sendBase("createFile", args);
}
public ThriftHandle recv_createFile() throws ThriftIOException, org.apache.thrift.TException
{
createFile_result result = new createFile_result();
receiveBase(result, "createFile");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createFile failed: unknown result");
}
public ThriftHandle open(Pathname path) throws ThriftIOException, org.apache.thrift.TException
{
send_open(path);
return recv_open();
}
public void send_open(Pathname path) throws org.apache.thrift.TException
{
open_args args = new open_args();
args.setPath(path);
sendBase("open", args);
}
public ThriftHandle recv_open() throws ThriftIOException, org.apache.thrift.TException
{
open_result result = new open_result();
receiveBase(result, "open");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "open failed: unknown result");
}
public ThriftHandle append(Pathname path) throws ThriftIOException, org.apache.thrift.TException
{
send_append(path);
return recv_append();
}
public void send_append(Pathname path) throws org.apache.thrift.TException
{
append_args args = new append_args();
args.setPath(path);
sendBase("append", args);
}
public ThriftHandle recv_append() throws ThriftIOException, org.apache.thrift.TException
{
append_result result = new append_result();
receiveBase(result, "append");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "append failed: unknown result");
}
public boolean write(ThriftHandle handle, String data) throws ThriftIOException, org.apache.thrift.TException
{
send_write(handle, data);
return recv_write();
}
public void send_write(ThriftHandle handle, String data) throws org.apache.thrift.TException
{
write_args args = new write_args();
args.setHandle(handle);
args.setData(data);
sendBase("write", args);
}
public boolean recv_write() throws ThriftIOException, org.apache.thrift.TException
{
write_result result = new write_result();
receiveBase(result, "write");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "write failed: unknown result");
}
public String read(ThriftHandle handle, long offset, int size) throws ThriftIOException, org.apache.thrift.TException
{
send_read(handle, offset, size);
return recv_read();
}
public void send_read(ThriftHandle handle, long offset, int size) throws org.apache.thrift.TException
{
read_args args = new read_args();
args.setHandle(handle);
args.setOffset(offset);
args.setSize(size);
sendBase("read", args);
}
public String recv_read() throws ThriftIOException, org.apache.thrift.TException
{
read_result result = new read_result();
receiveBase(result, "read");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "read failed: unknown result");
}
public boolean close(ThriftHandle out) throws ThriftIOException, org.apache.thrift.TException
{
send_close(out);
return recv_close();
}
public void send_close(ThriftHandle out) throws org.apache.thrift.TException
{
close_args args = new close_args();
args.setOut(out);
sendBase("close", args);
}
public boolean recv_close() throws ThriftIOException, org.apache.thrift.TException
{
close_result result = new close_result();
receiveBase(result, "close");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "close failed: unknown result");
}
public boolean rm(Pathname path, boolean recursive) throws ThriftIOException, org.apache.thrift.TException
{
send_rm(path, recursive);
return recv_rm();
}
public void send_rm(Pathname path, boolean recursive) throws org.apache.thrift.TException
{
rm_args args = new rm_args();
args.setPath(path);
args.setRecursive(recursive);
sendBase("rm", args);
}
public boolean recv_rm() throws ThriftIOException, org.apache.thrift.TException
{
rm_result result = new rm_result();
receiveBase(result, "rm");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "rm failed: unknown result");
}
public boolean rename(Pathname path, Pathname dest) throws ThriftIOException, org.apache.thrift.TException
{
send_rename(path, dest);
return recv_rename();
}
public void send_rename(Pathname path, Pathname dest) throws org.apache.thrift.TException
{
rename_args args = new rename_args();
args.setPath(path);
args.setDest(dest);
sendBase("rename", args);
}
public boolean recv_rename() throws ThriftIOException, org.apache.thrift.TException
{
rename_result result = new rename_result();
receiveBase(result, "rename");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "rename failed: unknown result");
}
public boolean mkdirs(Pathname path) throws ThriftIOException, org.apache.thrift.TException
{
send_mkdirs(path);
return recv_mkdirs();
}
public void send_mkdirs(Pathname path) throws org.apache.thrift.TException
{
mkdirs_args args = new mkdirs_args();
args.setPath(path);
sendBase("mkdirs", args);
}
public boolean recv_mkdirs() throws ThriftIOException, org.apache.thrift.TException
{
mkdirs_result result = new mkdirs_result();
receiveBase(result, "mkdirs");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "mkdirs failed: unknown result");
}
public boolean exists(Pathname path) throws ThriftIOException, org.apache.thrift.TException
{
send_exists(path);
return recv_exists();
}
public void send_exists(Pathname path) throws org.apache.thrift.TException
{
exists_args args = new exists_args();
args.setPath(path);
sendBase("exists", args);
}
public boolean recv_exists() throws ThriftIOException, org.apache.thrift.TException
{
exists_result result = new exists_result();
receiveBase(result, "exists");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "exists failed: unknown result");
}
public FileStatus stat(Pathname path) throws ThriftIOException, org.apache.thrift.TException
{
send_stat(path);
return recv_stat();
}
public void send_stat(Pathname path) throws org.apache.thrift.TException
{
stat_args args = new stat_args();
args.setPath(path);
sendBase("stat", args);
}
public FileStatus recv_stat() throws ThriftIOException, org.apache.thrift.TException
{
stat_result result = new stat_result();
receiveBase(result, "stat");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "stat failed: unknown result");
}
public List<FileStatus> listStatus(Pathname path) throws ThriftIOException, org.apache.thrift.TException
{
send_listStatus(path);
return recv_listStatus();
}
public void send_listStatus(Pathname path) throws org.apache.thrift.TException
{
listStatus_args args = new listStatus_args();
args.setPath(path);
sendBase("listStatus", args);
}
public List<FileStatus> recv_listStatus() throws ThriftIOException, org.apache.thrift.TException
{
listStatus_result result = new listStatus_result();
receiveBase(result, "listStatus");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listStatus failed: unknown result");
}
public void chmod(Pathname path, short mode) throws ThriftIOException, org.apache.thrift.TException
{
send_chmod(path, mode);
recv_chmod();
}
public void send_chmod(Pathname path, short mode) throws org.apache.thrift.TException
{
chmod_args args = new chmod_args();
args.setPath(path);
args.setMode(mode);
sendBase("chmod", args);
}
public void recv_chmod() throws ThriftIOException, org.apache.thrift.TException
{
chmod_result result = new chmod_result();
receiveBase(result, "chmod");
if (result.ouch != null) {
throw result.ouch;
}
return;
}
public void chown(Pathname path, String owner, String group) throws ThriftIOException, org.apache.thrift.TException
{
send_chown(path, owner, group);
recv_chown();
}
public void send_chown(Pathname path, String owner, String group) throws org.apache.thrift.TException
{
chown_args args = new chown_args();
args.setPath(path);
args.setOwner(owner);
args.setGroup(group);
sendBase("chown", args);
}
public void recv_chown() throws ThriftIOException, org.apache.thrift.TException
{
chown_result result = new chown_result();
receiveBase(result, "chown");
if (result.ouch != null) {
throw result.ouch;
}
return;
}
public void setReplication(Pathname path, short replication) throws ThriftIOException, org.apache.thrift.TException
{
send_setReplication(path, replication);
recv_setReplication();
}
public void send_setReplication(Pathname path, short replication) throws org.apache.thrift.TException
{
setReplication_args args = new setReplication_args();
args.setPath(path);
args.setReplication(replication);
sendBase("setReplication", args);
}
public void recv_setReplication() throws ThriftIOException, org.apache.thrift.TException
{
setReplication_result result = new setReplication_result();
receiveBase(result, "setReplication");
if (result.ouch != null) {
throw result.ouch;
}
return;
}
public List<BlockLocation> getFileBlockLocations(Pathname path, long start, long length) throws ThriftIOException, org.apache.thrift.TException
{
send_getFileBlockLocations(path, start, length);
return recv_getFileBlockLocations();
}
public void send_getFileBlockLocations(Pathname path, long start, long length) throws org.apache.thrift.TException
{
getFileBlockLocations_args args = new getFileBlockLocations_args();
args.setPath(path);
args.setStart(start);
args.setLength(length);
sendBase("getFileBlockLocations", args);
}
public List<BlockLocation> recv_getFileBlockLocations() throws ThriftIOException, org.apache.thrift.TException
{
getFileBlockLocations_result result = new getFileBlockLocations_result();
receiveBase(result, "getFileBlockLocations");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getFileBlockLocations failed: unknown result");
}
public boolean hardLink(Pathname src, Pathname dest) throws ThriftIOException, org.apache.thrift.TException
{
send_hardLink(src, dest);
return recv_hardLink();
}
public void send_hardLink(Pathname src, Pathname dest) throws org.apache.thrift.TException
{
hardLink_args args = new hardLink_args();
args.setSrc(src);
args.setDest(dest);
sendBase("hardLink", args);
}
public boolean recv_hardLink() throws ThriftIOException, org.apache.thrift.TException
{
hardLink_result result = new hardLink_result();
receiveBase(result, "hardLink");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "hardLink failed: unknown result");
}
public void concat(Pathname target, List<Pathname> srcs, boolean restricted) throws ThriftIOException, org.apache.thrift.TException
{
send_concat(target, srcs, restricted);
recv_concat();
}
public void send_concat(Pathname target, List<Pathname> srcs, boolean restricted) throws org.apache.thrift.TException
{
concat_args args = new concat_args();
args.setTarget(target);
args.setSrcs(srcs);
args.setRestricted(restricted);
sendBase("concat", args);
}
public void recv_concat() throws ThriftIOException, org.apache.thrift.TException
{
concat_result result = new concat_result();
receiveBase(result, "concat");
if (result.ouch != null) {
throw result.ouch;
}
return;
}
public void reportBadBlocks(List<TLocatedBlock> blocks) throws ThriftIOException, org.apache.thrift.TException
{
send_reportBadBlocks(blocks);
recv_reportBadBlocks();
}
public void send_reportBadBlocks(List<TLocatedBlock> blocks) throws org.apache.thrift.TException
{
reportBadBlocks_args args = new reportBadBlocks_args();
args.setBlocks(blocks);
sendBase("reportBadBlocks", args);
}
public void recv_reportBadBlocks() throws ThriftIOException, org.apache.thrift.TException
{
reportBadBlocks_result result = new reportBadBlocks_result();
receiveBase(result, "reportBadBlocks");
if (result.ouch != null) {
throw result.ouch;
}
return;
}
public int getDataTransferProtocolVersion() throws ThriftIOException, org.apache.thrift.TException
{
send_getDataTransferProtocolVersion();
return recv_getDataTransferProtocolVersion();
}
public void send_getDataTransferProtocolVersion() throws org.apache.thrift.TException
{
getDataTransferProtocolVersion_args args = new getDataTransferProtocolVersion_args();
sendBase("getDataTransferProtocolVersion", args);
}
public int recv_getDataTransferProtocolVersion() throws ThriftIOException, org.apache.thrift.TException
{
getDataTransferProtocolVersion_result result = new getDataTransferProtocolVersion_result();
receiveBase(result, "getDataTransferProtocolVersion");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDataTransferProtocolVersion failed: unknown result");
}
public void renewLease(String clientName) throws ThriftIOException, org.apache.thrift.TException
{
send_renewLease(clientName);
recv_renewLease();
}
public void send_renewLease(String clientName) throws org.apache.thrift.TException
{
renewLease_args args = new renewLease_args();
args.setClientName(clientName);
sendBase("renewLease", args);
}
public void recv_renewLease() throws ThriftIOException, org.apache.thrift.TException
{
renewLease_result result = new renewLease_result();
receiveBase(result, "renewLease");
if (result.ouch != null) {
throw result.ouch;
}
return;
}
public void recoverLease(Pathname path, String clientName) throws ThriftIOException, org.apache.thrift.TException
{
send_recoverLease(path, clientName);
recv_recoverLease();
}
public void send_recoverLease(Pathname path, String clientName) throws org.apache.thrift.TException
{
recoverLease_args args = new recoverLease_args();
args.setPath(path);
args.setClientName(clientName);
sendBase("recoverLease", args);
}
public void recv_recoverLease() throws ThriftIOException, org.apache.thrift.TException
{
recoverLease_result result = new recoverLease_result();
receiveBase(result, "recoverLease");
if (result.ouch != null) {
throw result.ouch;
}
return;
}
public void closeRecoverLease(Pathname path, String clientName, boolean discardLastBlock) throws ThriftIOException, org.apache.thrift.TException
{
send_closeRecoverLease(path, clientName, discardLastBlock);
recv_closeRecoverLease();
}
public void send_closeRecoverLease(Pathname path, String clientName, boolean discardLastBlock) throws org.apache.thrift.TException
{
closeRecoverLease_args args = new closeRecoverLease_args();
args.setPath(path);
args.setClientName(clientName);
args.setDiscardLastBlock(discardLastBlock);
sendBase("closeRecoverLease", args);
}
public void recv_closeRecoverLease() throws ThriftIOException, org.apache.thrift.TException
{
closeRecoverLease_result result = new closeRecoverLease_result();
receiveBase(result, "closeRecoverLease");
if (result.ouch != null) {
throw result.ouch;
}
return;
}
public void abandonBlock(TBlock block, Pathname pathname, String clientName) throws ThriftIOException, org.apache.thrift.TException
{
send_abandonBlock(block, pathname, clientName);
recv_abandonBlock();
}
public void send_abandonBlock(TBlock block, Pathname pathname, String clientName) throws org.apache.thrift.TException
{
abandonBlock_args args = new abandonBlock_args();
args.setBlock(block);
args.setPathname(pathname);
args.setClientName(clientName);
sendBase("abandonBlock", args);
}
public void recv_abandonBlock() throws ThriftIOException, org.apache.thrift.TException
{
abandonBlock_result result = new abandonBlock_result();
receiveBase(result, "abandonBlock");
if (result.ouch != null) {
throw result.ouch;
}
return;
}
public void abandonFile(Pathname pathname, String clientName) throws ThriftIOException, org.apache.thrift.TException
{
send_abandonFile(pathname, clientName);
recv_abandonFile();
}
public void send_abandonFile(Pathname pathname, String clientName) throws org.apache.thrift.TException
{
abandonFile_args args = new abandonFile_args();
args.setPathname(pathname);
args.setClientName(clientName);
sendBase("abandonFile", args);
}
public void recv_abandonFile() throws ThriftIOException, org.apache.thrift.TException
{
abandonFile_result result = new abandonFile_result();
receiveBase(result, "abandonFile");
if (result.ouch != null) {
throw result.ouch;
}
return;
}
public TLocatedBlock addBlock(Pathname pathname, String clientName, long startOffset, TBlock lastBlock, List<TDatanodeID> excludedNodes, List<TDatanodeID> favouredNodes) throws ThriftIOException, org.apache.thrift.TException
{
send_addBlock(pathname, clientName, startOffset, lastBlock, excludedNodes, favouredNodes);
return recv_addBlock();
}
public void send_addBlock(Pathname pathname, String clientName, long startOffset, TBlock lastBlock, List<TDatanodeID> excludedNodes, List<TDatanodeID> favouredNodes) throws org.apache.thrift.TException
{
addBlock_args args = new addBlock_args();
args.setPathname(pathname);
args.setClientName(clientName);
args.setStartOffset(startOffset);
args.setLastBlock(lastBlock);
args.setExcludedNodes(excludedNodes);
args.setFavouredNodes(favouredNodes);
sendBase("addBlock", args);
}
public TLocatedBlock recv_addBlock() throws ThriftIOException, org.apache.thrift.TException
{
addBlock_result result = new addBlock_result();
receiveBase(result, "addBlock");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addBlock failed: unknown result");
}
public TLocatedBlock addFirstBlock(Pathname pathname, String clientName, List<TDatanodeID> excludedNodes, List<TDatanodeID> favouredNodes) throws ThriftIOException, org.apache.thrift.TException
{
send_addFirstBlock(pathname, clientName, excludedNodes, favouredNodes);
return recv_addFirstBlock();
}
public void send_addFirstBlock(Pathname pathname, String clientName, List<TDatanodeID> excludedNodes, List<TDatanodeID> favouredNodes) throws org.apache.thrift.TException
{
addFirstBlock_args args = new addFirstBlock_args();
args.setPathname(pathname);
args.setClientName(clientName);
args.setExcludedNodes(excludedNodes);
args.setFavouredNodes(favouredNodes);
sendBase("addFirstBlock", args);
}
public TLocatedBlock recv_addFirstBlock() throws ThriftIOException, org.apache.thrift.TException
{
addFirstBlock_result result = new addFirstBlock_result();
receiveBase(result, "addFirstBlock");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addFirstBlock failed: unknown result");
}
public boolean complete(Pathname pathname, String clientName, long fileLen, TBlock lastBlock) throws ThriftIOException, org.apache.thrift.TException
{
send_complete(pathname, clientName, fileLen, lastBlock);
return recv_complete();
}
public void send_complete(Pathname pathname, String clientName, long fileLen, TBlock lastBlock) throws org.apache.thrift.TException
{
complete_args args = new complete_args();
args.setPathname(pathname);
args.setClientName(clientName);
args.setFileLen(fileLen);
args.setLastBlock(lastBlock);
sendBase("complete", args);
}
public boolean recv_complete() throws ThriftIOException, org.apache.thrift.TException
{
complete_result result = new complete_result();
receiveBase(result, "complete");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ouch != null) {
throw result.ouch;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "complete failed: unknown result");
}
}
public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
private org.apache.thrift.async.TAsyncClientManager clientManager;
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void setInactivityTimeoutPeriod(long periodInSeconds, org.apache.thrift.async.AsyncMethodCallback<setInactivityTimeoutPeriod_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
setInactivityTimeoutPeriod_call method_call = new setInactivityTimeoutPeriod_call(periodInSeconds, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class setInactivityTimeoutPeriod_call extends org.apache.thrift.async.TAsyncMethodCall {
private long periodInSeconds;
public setInactivityTimeoutPeriod_call(long periodInSeconds, org.apache.thrift.async.AsyncMethodCallback<setInactivityTimeoutPeriod_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.periodInSeconds = periodInSeconds;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setInactivityTimeoutPeriod", org.apache.thrift.protocol.TMessageType.CALL, 0));
setInactivityTimeoutPeriod_args args = new setInactivityTimeoutPeriod_args();
args.setPeriodInSeconds(periodInSeconds);
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_setInactivityTimeoutPeriod();
}
}
public void shutdown(int status, org.apache.thrift.async.AsyncMethodCallback<shutdown_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
shutdown_call method_call = new shutdown_call(status, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class shutdown_call extends org.apache.thrift.async.TAsyncMethodCall {
private int status;
public shutdown_call(int status, org.apache.thrift.async.AsyncMethodCallback<shutdown_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.status = status;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("shutdown", org.apache.thrift.protocol.TMessageType.CALL, 0));
shutdown_args args = new shutdown_args();
args.setStatus(status);
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_shutdown();
}
}
public void create(Pathname path, org.apache.thrift.async.AsyncMethodCallback<create_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
create_call method_call = new create_call(path, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class create_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname path;
public create_call(Pathname path, org.apache.thrift.async.AsyncMethodCallback<create_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.path = path;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create", org.apache.thrift.protocol.TMessageType.CALL, 0));
create_args args = new create_args();
args.setPath(path);
args.write(prot);
prot.writeMessageEnd();
}
public ThriftHandle getResult() throws ThriftIOException, 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_create();
}
}
public void createFile(Pathname path, short mode, boolean overwrite, int bufferSize, short block_replication, long blocksize, org.apache.thrift.async.AsyncMethodCallback<createFile_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
createFile_call method_call = new createFile_call(path, mode, overwrite, bufferSize, block_replication, blocksize, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createFile_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname path;
private short mode;
private boolean overwrite;
private int bufferSize;
private short block_replication;
private long blocksize;
public createFile_call(Pathname path, short mode, boolean overwrite, int bufferSize, short block_replication, long blocksize, org.apache.thrift.async.AsyncMethodCallback<createFile_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.path = path;
this.mode = mode;
this.overwrite = overwrite;
this.bufferSize = bufferSize;
this.block_replication = block_replication;
this.blocksize = blocksize;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createFile", org.apache.thrift.protocol.TMessageType.CALL, 0));
createFile_args args = new createFile_args();
args.setPath(path);
args.setMode(mode);
args.setOverwrite(overwrite);
args.setBufferSize(bufferSize);
args.setBlock_replication(block_replication);
args.setBlocksize(blocksize);
args.write(prot);
prot.writeMessageEnd();
}
public ThriftHandle getResult() throws ThriftIOException, 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_createFile();
}
}
public void open(Pathname path, org.apache.thrift.async.AsyncMethodCallback<open_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
open_call method_call = new open_call(path, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class open_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname path;
public open_call(Pathname path, org.apache.thrift.async.AsyncMethodCallback<open_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.path = path;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("open", org.apache.thrift.protocol.TMessageType.CALL, 0));
open_args args = new open_args();
args.setPath(path);
args.write(prot);
prot.writeMessageEnd();
}
public ThriftHandle getResult() throws ThriftIOException, 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_open();
}
}
public void append(Pathname path, org.apache.thrift.async.AsyncMethodCallback<append_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
append_call method_call = new append_call(path, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class append_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname path;
public append_call(Pathname path, org.apache.thrift.async.AsyncMethodCallback<append_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.path = path;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("append", org.apache.thrift.protocol.TMessageType.CALL, 0));
append_args args = new append_args();
args.setPath(path);
args.write(prot);
prot.writeMessageEnd();
}
public ThriftHandle getResult() throws ThriftIOException, 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_append();
}
}
public void write(ThriftHandle handle, String data, org.apache.thrift.async.AsyncMethodCallback<write_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
write_call method_call = new write_call(handle, data, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class write_call extends org.apache.thrift.async.TAsyncMethodCall {
private ThriftHandle handle;
private String data;
public write_call(ThriftHandle handle, String data, org.apache.thrift.async.AsyncMethodCallback<write_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.handle = handle;
this.data = data;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("write", org.apache.thrift.protocol.TMessageType.CALL, 0));
write_args args = new write_args();
args.setHandle(handle);
args.setData(data);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws ThriftIOException, 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_write();
}
}
public void read(ThriftHandle handle, long offset, int size, org.apache.thrift.async.AsyncMethodCallback<read_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
read_call method_call = new read_call(handle, offset, size, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class read_call extends org.apache.thrift.async.TAsyncMethodCall {
private ThriftHandle handle;
private long offset;
private int size;
public read_call(ThriftHandle handle, long offset, int size, org.apache.thrift.async.AsyncMethodCallback<read_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.handle = handle;
this.offset = offset;
this.size = size;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("read", org.apache.thrift.protocol.TMessageType.CALL, 0));
read_args args = new read_args();
args.setHandle(handle);
args.setOffset(offset);
args.setSize(size);
args.write(prot);
prot.writeMessageEnd();
}
public String getResult() throws ThriftIOException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_read();
}
}
public void close(ThriftHandle out, org.apache.thrift.async.AsyncMethodCallback<close_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
close_call method_call = new close_call(out, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class close_call extends org.apache.thrift.async.TAsyncMethodCall {
private ThriftHandle out;
public close_call(ThriftHandle out, org.apache.thrift.async.AsyncMethodCallback<close_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.out = out;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("close", org.apache.thrift.protocol.TMessageType.CALL, 0));
close_args args = new close_args();
args.setOut(out);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws ThriftIOException, 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_close();
}
}
public void rm(Pathname path, boolean recursive, org.apache.thrift.async.AsyncMethodCallback<rm_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
rm_call method_call = new rm_call(path, recursive, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class rm_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname path;
private boolean recursive;
public rm_call(Pathname path, boolean recursive, org.apache.thrift.async.AsyncMethodCallback<rm_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.path = path;
this.recursive = recursive;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("rm", org.apache.thrift.protocol.TMessageType.CALL, 0));
rm_args args = new rm_args();
args.setPath(path);
args.setRecursive(recursive);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws ThriftIOException, 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_rm();
}
}
public void rename(Pathname path, Pathname dest, org.apache.thrift.async.AsyncMethodCallback<rename_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
rename_call method_call = new rename_call(path, dest, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class rename_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname path;
private Pathname dest;
public rename_call(Pathname path, Pathname dest, org.apache.thrift.async.AsyncMethodCallback<rename_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.path = path;
this.dest = dest;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("rename", org.apache.thrift.protocol.TMessageType.CALL, 0));
rename_args args = new rename_args();
args.setPath(path);
args.setDest(dest);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws ThriftIOException, 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_rename();
}
}
public void mkdirs(Pathname path, org.apache.thrift.async.AsyncMethodCallback<mkdirs_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
mkdirs_call method_call = new mkdirs_call(path, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class mkdirs_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname path;
public mkdirs_call(Pathname path, org.apache.thrift.async.AsyncMethodCallback<mkdirs_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.path = path;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mkdirs", org.apache.thrift.protocol.TMessageType.CALL, 0));
mkdirs_args args = new mkdirs_args();
args.setPath(path);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws ThriftIOException, 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_mkdirs();
}
}
public void exists(Pathname path, org.apache.thrift.async.AsyncMethodCallback<exists_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
exists_call method_call = new exists_call(path, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class exists_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname path;
public exists_call(Pathname path, org.apache.thrift.async.AsyncMethodCallback<exists_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.path = path;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("exists", org.apache.thrift.protocol.TMessageType.CALL, 0));
exists_args args = new exists_args();
args.setPath(path);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws ThriftIOException, 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_exists();
}
}
public void stat(Pathname path, org.apache.thrift.async.AsyncMethodCallback<stat_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
stat_call method_call = new stat_call(path, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class stat_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname path;
public stat_call(Pathname path, org.apache.thrift.async.AsyncMethodCallback<stat_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.path = path;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("stat", org.apache.thrift.protocol.TMessageType.CALL, 0));
stat_args args = new stat_args();
args.setPath(path);
args.write(prot);
prot.writeMessageEnd();
}
public FileStatus getResult() throws ThriftIOException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_stat();
}
}
public void listStatus(Pathname path, org.apache.thrift.async.AsyncMethodCallback<listStatus_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
listStatus_call method_call = new listStatus_call(path, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname path;
public listStatus_call(Pathname path, org.apache.thrift.async.AsyncMethodCallback<listStatus_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.path = path;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
listStatus_args args = new listStatus_args();
args.setPath(path);
args.write(prot);
prot.writeMessageEnd();
}
public List<FileStatus> getResult() throws ThriftIOException, 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_listStatus();
}
}
public void chmod(Pathname path, short mode, org.apache.thrift.async.AsyncMethodCallback<chmod_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
chmod_call method_call = new chmod_call(path, mode, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class chmod_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname path;
private short mode;
public chmod_call(Pathname path, short mode, org.apache.thrift.async.AsyncMethodCallback<chmod_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.path = path;
this.mode = mode;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("chmod", org.apache.thrift.protocol.TMessageType.CALL, 0));
chmod_args args = new chmod_args();
args.setPath(path);
args.setMode(mode);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws ThriftIOException, 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_chmod();
}
}
public void chown(Pathname path, String owner, String group, org.apache.thrift.async.AsyncMethodCallback<chown_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
chown_call method_call = new chown_call(path, owner, group, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class chown_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname path;
private String owner;
private String group;
public chown_call(Pathname path, String owner, String group, org.apache.thrift.async.AsyncMethodCallback<chown_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.path = path;
this.owner = owner;
this.group = group;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("chown", org.apache.thrift.protocol.TMessageType.CALL, 0));
chown_args args = new chown_args();
args.setPath(path);
args.setOwner(owner);
args.setGroup(group);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws ThriftIOException, 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_chown();
}
}
public void setReplication(Pathname path, short replication, org.apache.thrift.async.AsyncMethodCallback<setReplication_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
setReplication_call method_call = new setReplication_call(path, replication, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class setReplication_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname path;
private short replication;
public setReplication_call(Pathname path, short replication, org.apache.thrift.async.AsyncMethodCallback<setReplication_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.path = path;
this.replication = replication;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setReplication", org.apache.thrift.protocol.TMessageType.CALL, 0));
setReplication_args args = new setReplication_args();
args.setPath(path);
args.setReplication(replication);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws ThriftIOException, 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_setReplication();
}
}
public void getFileBlockLocations(Pathname path, long start, long length, org.apache.thrift.async.AsyncMethodCallback<getFileBlockLocations_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getFileBlockLocations_call method_call = new getFileBlockLocations_call(path, start, length, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getFileBlockLocations_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname path;
private long start;
private long length;
public getFileBlockLocations_call(Pathname path, long start, long length, org.apache.thrift.async.AsyncMethodCallback<getFileBlockLocations_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.path = path;
this.start = start;
this.length = length;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFileBlockLocations", org.apache.thrift.protocol.TMessageType.CALL, 0));
getFileBlockLocations_args args = new getFileBlockLocations_args();
args.setPath(path);
args.setStart(start);
args.setLength(length);
args.write(prot);
prot.writeMessageEnd();
}
public List<BlockLocation> getResult() throws ThriftIOException, 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_getFileBlockLocations();
}
}
public void hardLink(Pathname src, Pathname dest, org.apache.thrift.async.AsyncMethodCallback<hardLink_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
hardLink_call method_call = new hardLink_call(src, dest, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class hardLink_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname src;
private Pathname dest;
public hardLink_call(Pathname src, Pathname dest, org.apache.thrift.async.AsyncMethodCallback<hardLink_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.src = src;
this.dest = dest;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("hardLink", org.apache.thrift.protocol.TMessageType.CALL, 0));
hardLink_args args = new hardLink_args();
args.setSrc(src);
args.setDest(dest);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws ThriftIOException, 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_hardLink();
}
}
public void concat(Pathname target, List<Pathname> srcs, boolean restricted, org.apache.thrift.async.AsyncMethodCallback<concat_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
concat_call method_call = new concat_call(target, srcs, restricted, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class concat_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname target;
private List<Pathname> srcs;
private boolean restricted;
public concat_call(Pathname target, List<Pathname> srcs, boolean restricted, org.apache.thrift.async.AsyncMethodCallback<concat_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.target = target;
this.srcs = srcs;
this.restricted = restricted;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("concat", org.apache.thrift.protocol.TMessageType.CALL, 0));
concat_args args = new concat_args();
args.setTarget(target);
args.setSrcs(srcs);
args.setRestricted(restricted);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws ThriftIOException, 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_concat();
}
}
public void reportBadBlocks(List<TLocatedBlock> blocks, org.apache.thrift.async.AsyncMethodCallback<reportBadBlocks_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
reportBadBlocks_call method_call = new reportBadBlocks_call(blocks, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class reportBadBlocks_call extends org.apache.thrift.async.TAsyncMethodCall {
private List<TLocatedBlock> blocks;
public reportBadBlocks_call(List<TLocatedBlock> blocks, org.apache.thrift.async.AsyncMethodCallback<reportBadBlocks_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.blocks = blocks;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("reportBadBlocks", org.apache.thrift.protocol.TMessageType.CALL, 0));
reportBadBlocks_args args = new reportBadBlocks_args();
args.setBlocks(blocks);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws ThriftIOException, 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_reportBadBlocks();
}
}
public void getDataTransferProtocolVersion(org.apache.thrift.async.AsyncMethodCallback<getDataTransferProtocolVersion_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getDataTransferProtocolVersion_call method_call = new getDataTransferProtocolVersion_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getDataTransferProtocolVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
public getDataTransferProtocolVersion_call(org.apache.thrift.async.AsyncMethodCallback<getDataTransferProtocolVersion_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("getDataTransferProtocolVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
getDataTransferProtocolVersion_args args = new getDataTransferProtocolVersion_args();
args.write(prot);
prot.writeMessageEnd();
}
public int getResult() throws ThriftIOException, 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_getDataTransferProtocolVersion();
}
}
public void renewLease(String clientName, org.apache.thrift.async.AsyncMethodCallback<renewLease_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
renewLease_call method_call = new renewLease_call(clientName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class renewLease_call extends org.apache.thrift.async.TAsyncMethodCall {
private String clientName;
public renewLease_call(String clientName, org.apache.thrift.async.AsyncMethodCallback<renewLease_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.clientName = clientName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("renewLease", org.apache.thrift.protocol.TMessageType.CALL, 0));
renewLease_args args = new renewLease_args();
args.setClientName(clientName);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws ThriftIOException, 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_renewLease();
}
}
public void recoverLease(Pathname path, String clientName, org.apache.thrift.async.AsyncMethodCallback<recoverLease_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
recoverLease_call method_call = new recoverLease_call(path, clientName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class recoverLease_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname path;
private String clientName;
public recoverLease_call(Pathname path, String clientName, org.apache.thrift.async.AsyncMethodCallback<recoverLease_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.path = path;
this.clientName = clientName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("recoverLease", org.apache.thrift.protocol.TMessageType.CALL, 0));
recoverLease_args args = new recoverLease_args();
args.setPath(path);
args.setClientName(clientName);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws ThriftIOException, 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_recoverLease();
}
}
public void closeRecoverLease(Pathname path, String clientName, boolean discardLastBlock, org.apache.thrift.async.AsyncMethodCallback<closeRecoverLease_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
closeRecoverLease_call method_call = new closeRecoverLease_call(path, clientName, discardLastBlock, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class closeRecoverLease_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname path;
private String clientName;
private boolean discardLastBlock;
public closeRecoverLease_call(Pathname path, String clientName, boolean discardLastBlock, org.apache.thrift.async.AsyncMethodCallback<closeRecoverLease_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.path = path;
this.clientName = clientName;
this.discardLastBlock = discardLastBlock;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeRecoverLease", org.apache.thrift.protocol.TMessageType.CALL, 0));
closeRecoverLease_args args = new closeRecoverLease_args();
args.setPath(path);
args.setClientName(clientName);
args.setDiscardLastBlock(discardLastBlock);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws ThriftIOException, 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_closeRecoverLease();
}
}
public void abandonBlock(TBlock block, Pathname pathname, String clientName, org.apache.thrift.async.AsyncMethodCallback<abandonBlock_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
abandonBlock_call method_call = new abandonBlock_call(block, pathname, clientName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class abandonBlock_call extends org.apache.thrift.async.TAsyncMethodCall {
private TBlock block;
private Pathname pathname;
private String clientName;
public abandonBlock_call(TBlock block, Pathname pathname, String clientName, org.apache.thrift.async.AsyncMethodCallback<abandonBlock_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.block = block;
this.pathname = pathname;
this.clientName = clientName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("abandonBlock", org.apache.thrift.protocol.TMessageType.CALL, 0));
abandonBlock_args args = new abandonBlock_args();
args.setBlock(block);
args.setPathname(pathname);
args.setClientName(clientName);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws ThriftIOException, 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_abandonBlock();
}
}
public void abandonFile(Pathname pathname, String clientName, org.apache.thrift.async.AsyncMethodCallback<abandonFile_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
abandonFile_call method_call = new abandonFile_call(pathname, clientName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class abandonFile_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname pathname;
private String clientName;
public abandonFile_call(Pathname pathname, String clientName, org.apache.thrift.async.AsyncMethodCallback<abandonFile_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.pathname = pathname;
this.clientName = clientName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("abandonFile", org.apache.thrift.protocol.TMessageType.CALL, 0));
abandonFile_args args = new abandonFile_args();
args.setPathname(pathname);
args.setClientName(clientName);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws ThriftIOException, 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_abandonFile();
}
}
public void addBlock(Pathname pathname, String clientName, long startOffset, TBlock lastBlock, List<TDatanodeID> excludedNodes, List<TDatanodeID> favouredNodes, org.apache.thrift.async.AsyncMethodCallback<addBlock_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
addBlock_call method_call = new addBlock_call(pathname, clientName, startOffset, lastBlock, excludedNodes, favouredNodes, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class addBlock_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname pathname;
private String clientName;
private long startOffset;
private TBlock lastBlock;
private List<TDatanodeID> excludedNodes;
private List<TDatanodeID> favouredNodes;
public addBlock_call(Pathname pathname, String clientName, long startOffset, TBlock lastBlock, List<TDatanodeID> excludedNodes, List<TDatanodeID> favouredNodes, org.apache.thrift.async.AsyncMethodCallback<addBlock_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.pathname = pathname;
this.clientName = clientName;
this.startOffset = startOffset;
this.lastBlock = lastBlock;
this.excludedNodes = excludedNodes;
this.favouredNodes = favouredNodes;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addBlock", org.apache.thrift.protocol.TMessageType.CALL, 0));
addBlock_args args = new addBlock_args();
args.setPathname(pathname);
args.setClientName(clientName);
args.setStartOffset(startOffset);
args.setLastBlock(lastBlock);
args.setExcludedNodes(excludedNodes);
args.setFavouredNodes(favouredNodes);
args.write(prot);
prot.writeMessageEnd();
}
public TLocatedBlock getResult() throws ThriftIOException, 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_addBlock();
}
}
public void addFirstBlock(Pathname pathname, String clientName, List<TDatanodeID> excludedNodes, List<TDatanodeID> favouredNodes, org.apache.thrift.async.AsyncMethodCallback<addFirstBlock_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
addFirstBlock_call method_call = new addFirstBlock_call(pathname, clientName, excludedNodes, favouredNodes, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class addFirstBlock_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname pathname;
private String clientName;
private List<TDatanodeID> excludedNodes;
private List<TDatanodeID> favouredNodes;
public addFirstBlock_call(Pathname pathname, String clientName, List<TDatanodeID> excludedNodes, List<TDatanodeID> favouredNodes, org.apache.thrift.async.AsyncMethodCallback<addFirstBlock_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.pathname = pathname;
this.clientName = clientName;
this.excludedNodes = excludedNodes;
this.favouredNodes = favouredNodes;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addFirstBlock", org.apache.thrift.protocol.TMessageType.CALL, 0));
addFirstBlock_args args = new addFirstBlock_args();
args.setPathname(pathname);
args.setClientName(clientName);
args.setExcludedNodes(excludedNodes);
args.setFavouredNodes(favouredNodes);
args.write(prot);
prot.writeMessageEnd();
}
public TLocatedBlock getResult() throws ThriftIOException, 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_addFirstBlock();
}
}
public void complete(Pathname pathname, String clientName, long fileLen, TBlock lastBlock, org.apache.thrift.async.AsyncMethodCallback<complete_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
complete_call method_call = new complete_call(pathname, clientName, fileLen, lastBlock, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class complete_call extends org.apache.thrift.async.TAsyncMethodCall {
private Pathname pathname;
private String clientName;
private long fileLen;
private TBlock lastBlock;
public complete_call(Pathname pathname, String clientName, long fileLen, TBlock lastBlock, org.apache.thrift.async.AsyncMethodCallback<complete_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.pathname = pathname;
this.clientName = clientName;
this.fileLen = fileLen;
this.lastBlock = lastBlock;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("complete", org.apache.thrift.protocol.TMessageType.CALL, 0));
complete_args args = new complete_args();
args.setPathname(pathname);
args.setClientName(clientName);
args.setFileLen(fileLen);
args.setLastBlock(lastBlock);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws ThriftIOException, 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_complete();
}
}
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor 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("setInactivityTimeoutPeriod", new setInactivityTimeoutPeriod());
processMap.put("shutdown", new shutdown());
processMap.put("create", new create());
processMap.put("createFile", new createFile());
processMap.put("open", new open());
processMap.put("append", new append());
processMap.put("write", new write());
processMap.put("read", new read());
processMap.put("close", new close());
processMap.put("rm", new rm());
processMap.put("rename", new rename());
processMap.put("mkdirs", new mkdirs());
processMap.put("exists", new exists());
processMap.put("stat", new stat());
processMap.put("listStatus", new listStatus());
processMap.put("chmod", new chmod());
processMap.put("chown", new chown());
processMap.put("setReplication", new setReplication());
processMap.put("getFileBlockLocations", new getFileBlockLocations());
processMap.put("hardLink", new hardLink());
processMap.put("concat", new concat());
processMap.put("reportBadBlocks", new reportBadBlocks());
processMap.put("getDataTransferProtocolVersion", new getDataTransferProtocolVersion());
processMap.put("renewLease", new renewLease());
processMap.put("recoverLease", new recoverLease());
processMap.put("closeRecoverLease", new closeRecoverLease());
processMap.put("abandonBlock", new abandonBlock());
processMap.put("abandonFile", new abandonFile());
processMap.put("addBlock", new addBlock());
processMap.put("addFirstBlock", new addFirstBlock());
processMap.put("complete", new complete());
return processMap;
}
private static class setInactivityTimeoutPeriod<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setInactivityTimeoutPeriod_args> {
public setInactivityTimeoutPeriod() {
super("setInactivityTimeoutPeriod");
}
protected setInactivityTimeoutPeriod_args getEmptyArgsInstance() {
return new setInactivityTimeoutPeriod_args();
}
protected setInactivityTimeoutPeriod_result getResult(I iface, setInactivityTimeoutPeriod_args args) throws org.apache.thrift.TException {
setInactivityTimeoutPeriod_result result = new setInactivityTimeoutPeriod_result();
iface.setInactivityTimeoutPeriod(args.periodInSeconds);
return result;
}
}
private static class shutdown<I extends Iface> extends org.apache.thrift.ProcessFunction<I, shutdown_args> {
public shutdown() {
super("shutdown");
}
protected shutdown_args getEmptyArgsInstance() {
return new shutdown_args();
}
protected shutdown_result getResult(I iface, shutdown_args args) throws org.apache.thrift.TException {
shutdown_result result = new shutdown_result();
iface.shutdown(args.status);
return result;
}
}
private static class create<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_args> {
public create() {
super("create");
}
protected create_args getEmptyArgsInstance() {
return new create_args();
}
protected create_result getResult(I iface, create_args args) throws org.apache.thrift.TException {
create_result result = new create_result();
try {
result.success = iface.create(args.path);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class createFile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createFile_args> {
public createFile() {
super("createFile");
}
protected createFile_args getEmptyArgsInstance() {
return new createFile_args();
}
protected createFile_result getResult(I iface, createFile_args args) throws org.apache.thrift.TException {
createFile_result result = new createFile_result();
try {
result.success = iface.createFile(args.path, args.mode, args.overwrite, args.bufferSize, args.block_replication, args.blocksize);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class open<I extends Iface> extends org.apache.thrift.ProcessFunction<I, open_args> {
public open() {
super("open");
}
protected open_args getEmptyArgsInstance() {
return new open_args();
}
protected open_result getResult(I iface, open_args args) throws org.apache.thrift.TException {
open_result result = new open_result();
try {
result.success = iface.open(args.path);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class append<I extends Iface> extends org.apache.thrift.ProcessFunction<I, append_args> {
public append() {
super("append");
}
protected append_args getEmptyArgsInstance() {
return new append_args();
}
protected append_result getResult(I iface, append_args args) throws org.apache.thrift.TException {
append_result result = new append_result();
try {
result.success = iface.append(args.path);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class write<I extends Iface> extends org.apache.thrift.ProcessFunction<I, write_args> {
public write() {
super("write");
}
protected write_args getEmptyArgsInstance() {
return new write_args();
}
protected write_result getResult(I iface, write_args args) throws org.apache.thrift.TException {
write_result result = new write_result();
try {
result.success = iface.write(args.handle, args.data);
result.setSuccessIsSet(true);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class read<I extends Iface> extends org.apache.thrift.ProcessFunction<I, read_args> {
public read() {
super("read");
}
protected read_args getEmptyArgsInstance() {
return new read_args();
}
protected read_result getResult(I iface, read_args args) throws org.apache.thrift.TException {
read_result result = new read_result();
try {
result.success = iface.read(args.handle, args.offset, args.size);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class close<I extends Iface> extends org.apache.thrift.ProcessFunction<I, close_args> {
public close() {
super("close");
}
protected close_args getEmptyArgsInstance() {
return new close_args();
}
protected close_result getResult(I iface, close_args args) throws org.apache.thrift.TException {
close_result result = new close_result();
try {
result.success = iface.close(args.out);
result.setSuccessIsSet(true);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class rm<I extends Iface> extends org.apache.thrift.ProcessFunction<I, rm_args> {
public rm() {
super("rm");
}
protected rm_args getEmptyArgsInstance() {
return new rm_args();
}
protected rm_result getResult(I iface, rm_args args) throws org.apache.thrift.TException {
rm_result result = new rm_result();
try {
result.success = iface.rm(args.path, args.recursive);
result.setSuccessIsSet(true);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class rename<I extends Iface> extends org.apache.thrift.ProcessFunction<I, rename_args> {
public rename() {
super("rename");
}
protected rename_args getEmptyArgsInstance() {
return new rename_args();
}
protected rename_result getResult(I iface, rename_args args) throws org.apache.thrift.TException {
rename_result result = new rename_result();
try {
result.success = iface.rename(args.path, args.dest);
result.setSuccessIsSet(true);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class mkdirs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, mkdirs_args> {
public mkdirs() {
super("mkdirs");
}
protected mkdirs_args getEmptyArgsInstance() {
return new mkdirs_args();
}
protected mkdirs_result getResult(I iface, mkdirs_args args) throws org.apache.thrift.TException {
mkdirs_result result = new mkdirs_result();
try {
result.success = iface.mkdirs(args.path);
result.setSuccessIsSet(true);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class exists<I extends Iface> extends org.apache.thrift.ProcessFunction<I, exists_args> {
public exists() {
super("exists");
}
protected exists_args getEmptyArgsInstance() {
return new exists_args();
}
protected exists_result getResult(I iface, exists_args args) throws org.apache.thrift.TException {
exists_result result = new exists_result();
try {
result.success = iface.exists(args.path);
result.setSuccessIsSet(true);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class stat<I extends Iface> extends org.apache.thrift.ProcessFunction<I, stat_args> {
public stat() {
super("stat");
}
protected stat_args getEmptyArgsInstance() {
return new stat_args();
}
protected stat_result getResult(I iface, stat_args args) throws org.apache.thrift.TException {
stat_result result = new stat_result();
try {
result.success = iface.stat(args.path);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class listStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, listStatus_args> {
public listStatus() {
super("listStatus");
}
protected listStatus_args getEmptyArgsInstance() {
return new listStatus_args();
}
protected listStatus_result getResult(I iface, listStatus_args args) throws org.apache.thrift.TException {
listStatus_result result = new listStatus_result();
try {
result.success = iface.listStatus(args.path);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class chmod<I extends Iface> extends org.apache.thrift.ProcessFunction<I, chmod_args> {
public chmod() {
super("chmod");
}
protected chmod_args getEmptyArgsInstance() {
return new chmod_args();
}
protected chmod_result getResult(I iface, chmod_args args) throws org.apache.thrift.TException {
chmod_result result = new chmod_result();
try {
iface.chmod(args.path, args.mode);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class chown<I extends Iface> extends org.apache.thrift.ProcessFunction<I, chown_args> {
public chown() {
super("chown");
}
protected chown_args getEmptyArgsInstance() {
return new chown_args();
}
protected chown_result getResult(I iface, chown_args args) throws org.apache.thrift.TException {
chown_result result = new chown_result();
try {
iface.chown(args.path, args.owner, args.group);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class setReplication<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setReplication_args> {
public setReplication() {
super("setReplication");
}
protected setReplication_args getEmptyArgsInstance() {
return new setReplication_args();
}
protected setReplication_result getResult(I iface, setReplication_args args) throws org.apache.thrift.TException {
setReplication_result result = new setReplication_result();
try {
iface.setReplication(args.path, args.replication);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class getFileBlockLocations<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getFileBlockLocations_args> {
public getFileBlockLocations() {
super("getFileBlockLocations");
}
protected getFileBlockLocations_args getEmptyArgsInstance() {
return new getFileBlockLocations_args();
}
protected getFileBlockLocations_result getResult(I iface, getFileBlockLocations_args args) throws org.apache.thrift.TException {
getFileBlockLocations_result result = new getFileBlockLocations_result();
try {
result.success = iface.getFileBlockLocations(args.path, args.start, args.length);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class hardLink<I extends Iface> extends org.apache.thrift.ProcessFunction<I, hardLink_args> {
public hardLink() {
super("hardLink");
}
protected hardLink_args getEmptyArgsInstance() {
return new hardLink_args();
}
protected hardLink_result getResult(I iface, hardLink_args args) throws org.apache.thrift.TException {
hardLink_result result = new hardLink_result();
try {
result.success = iface.hardLink(args.src, args.dest);
result.setSuccessIsSet(true);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class concat<I extends Iface> extends org.apache.thrift.ProcessFunction<I, concat_args> {
public concat() {
super("concat");
}
protected concat_args getEmptyArgsInstance() {
return new concat_args();
}
protected concat_result getResult(I iface, concat_args args) throws org.apache.thrift.TException {
concat_result result = new concat_result();
try {
iface.concat(args.target, args.srcs, args.restricted);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class reportBadBlocks<I extends Iface> extends org.apache.thrift.ProcessFunction<I, reportBadBlocks_args> {
public reportBadBlocks() {
super("reportBadBlocks");
}
protected reportBadBlocks_args getEmptyArgsInstance() {
return new reportBadBlocks_args();
}
protected reportBadBlocks_result getResult(I iface, reportBadBlocks_args args) throws org.apache.thrift.TException {
reportBadBlocks_result result = new reportBadBlocks_result();
try {
iface.reportBadBlocks(args.blocks);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class getDataTransferProtocolVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getDataTransferProtocolVersion_args> {
public getDataTransferProtocolVersion() {
super("getDataTransferProtocolVersion");
}
protected getDataTransferProtocolVersion_args getEmptyArgsInstance() {
return new getDataTransferProtocolVersion_args();
}
protected getDataTransferProtocolVersion_result getResult(I iface, getDataTransferProtocolVersion_args args) throws org.apache.thrift.TException {
getDataTransferProtocolVersion_result result = new getDataTransferProtocolVersion_result();
try {
result.success = iface.getDataTransferProtocolVersion();
result.setSuccessIsSet(true);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class renewLease<I extends Iface> extends org.apache.thrift.ProcessFunction<I, renewLease_args> {
public renewLease() {
super("renewLease");
}
protected renewLease_args getEmptyArgsInstance() {
return new renewLease_args();
}
protected renewLease_result getResult(I iface, renewLease_args args) throws org.apache.thrift.TException {
renewLease_result result = new renewLease_result();
try {
iface.renewLease(args.clientName);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class recoverLease<I extends Iface> extends org.apache.thrift.ProcessFunction<I, recoverLease_args> {
public recoverLease() {
super("recoverLease");
}
protected recoverLease_args getEmptyArgsInstance() {
return new recoverLease_args();
}
protected recoverLease_result getResult(I iface, recoverLease_args args) throws org.apache.thrift.TException {
recoverLease_result result = new recoverLease_result();
try {
iface.recoverLease(args.path, args.clientName);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class closeRecoverLease<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closeRecoverLease_args> {
public closeRecoverLease() {
super("closeRecoverLease");
}
protected closeRecoverLease_args getEmptyArgsInstance() {
return new closeRecoverLease_args();
}
protected closeRecoverLease_result getResult(I iface, closeRecoverLease_args args) throws org.apache.thrift.TException {
closeRecoverLease_result result = new closeRecoverLease_result();
try {
iface.closeRecoverLease(args.path, args.clientName, args.discardLastBlock);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class abandonBlock<I extends Iface> extends org.apache.thrift.ProcessFunction<I, abandonBlock_args> {
public abandonBlock() {
super("abandonBlock");
}
protected abandonBlock_args getEmptyArgsInstance() {
return new abandonBlock_args();
}
protected abandonBlock_result getResult(I iface, abandonBlock_args args) throws org.apache.thrift.TException {
abandonBlock_result result = new abandonBlock_result();
try {
iface.abandonBlock(args.block, args.pathname, args.clientName);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class abandonFile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, abandonFile_args> {
public abandonFile() {
super("abandonFile");
}
protected abandonFile_args getEmptyArgsInstance() {
return new abandonFile_args();
}
protected abandonFile_result getResult(I iface, abandonFile_args args) throws org.apache.thrift.TException {
abandonFile_result result = new abandonFile_result();
try {
iface.abandonFile(args.pathname, args.clientName);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class addBlock<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addBlock_args> {
public addBlock() {
super("addBlock");
}
protected addBlock_args getEmptyArgsInstance() {
return new addBlock_args();
}
protected addBlock_result getResult(I iface, addBlock_args args) throws org.apache.thrift.TException {
addBlock_result result = new addBlock_result();
try {
result.success = iface.addBlock(args.pathname, args.clientName, args.startOffset, args.lastBlock, args.excludedNodes, args.favouredNodes);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class addFirstBlock<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addFirstBlock_args> {
public addFirstBlock() {
super("addFirstBlock");
}
protected addFirstBlock_args getEmptyArgsInstance() {
return new addFirstBlock_args();
}
protected addFirstBlock_result getResult(I iface, addFirstBlock_args args) throws org.apache.thrift.TException {
addFirstBlock_result result = new addFirstBlock_result();
try {
result.success = iface.addFirstBlock(args.pathname, args.clientName, args.excludedNodes, args.favouredNodes);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
private static class complete<I extends Iface> extends org.apache.thrift.ProcessFunction<I, complete_args> {
public complete() {
super("complete");
}
protected complete_args getEmptyArgsInstance() {
return new complete_args();
}
protected complete_result getResult(I iface, complete_args args) throws org.apache.thrift.TException {
complete_result result = new complete_result();
try {
result.success = iface.complete(args.pathname, args.clientName, args.fileLen, args.lastBlock);
result.setSuccessIsSet(true);
} catch (ThriftIOException ouch) {
result.ouch = ouch;
}
return result;
}
}
}
public static class setInactivityTimeoutPeriod_args implements org.apache.thrift.TBase<setInactivityTimeoutPeriod_args, setInactivityTimeoutPeriod_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setInactivityTimeoutPeriod_args");
private static final org.apache.thrift.protocol.TField PERIOD_IN_SECONDS_FIELD_DESC = new org.apache.thrift.protocol.TField("periodInSeconds", org.apache.thrift.protocol.TType.I64, (short)1);
public long periodInSeconds; // 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 {
PERIOD_IN_SECONDS((short)1, "periodInSeconds");
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: // PERIOD_IN_SECONDS
return PERIOD_IN_SECONDS;
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 __PERIODINSECONDS_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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.PERIOD_IN_SECONDS, new org.apache.thrift.meta_data.FieldMetaData("periodInSeconds", 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(setInactivityTimeoutPeriod_args.class, metaDataMap);
}
public setInactivityTimeoutPeriod_args() {
}
public setInactivityTimeoutPeriod_args(
long periodInSeconds)
{
this();
this.periodInSeconds = periodInSeconds;
setPeriodInSecondsIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public setInactivityTimeoutPeriod_args(setInactivityTimeoutPeriod_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.periodInSeconds = other.periodInSeconds;
}
public setInactivityTimeoutPeriod_args deepCopy() {
return new setInactivityTimeoutPeriod_args(this);
}
@Override
public void clear() {
setPeriodInSecondsIsSet(false);
this.periodInSeconds = 0;
}
public long getPeriodInSeconds() {
return this.periodInSeconds;
}
public setInactivityTimeoutPeriod_args setPeriodInSeconds(long periodInSeconds) {
this.periodInSeconds = periodInSeconds;
setPeriodInSecondsIsSet(true);
return this;
}
public void unsetPeriodInSeconds() {
__isset_bit_vector.clear(__PERIODINSECONDS_ISSET_ID);
}
/** Returns true if field periodInSeconds is set (has been assigned a value) and false otherwise */
public boolean isSetPeriodInSeconds() {
return __isset_bit_vector.get(__PERIODINSECONDS_ISSET_ID);
}
public void setPeriodInSecondsIsSet(boolean value) {
__isset_bit_vector.set(__PERIODINSECONDS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PERIOD_IN_SECONDS:
if (value == null) {
unsetPeriodInSeconds();
} else {
setPeriodInSeconds((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PERIOD_IN_SECONDS:
return Long.valueOf(getPeriodInSeconds());
}
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 PERIOD_IN_SECONDS:
return isSetPeriodInSeconds();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof setInactivityTimeoutPeriod_args)
return this.equals((setInactivityTimeoutPeriod_args)that);
return false;
}
public boolean equals(setInactivityTimeoutPeriod_args that) {
if (that == null)
return false;
boolean this_present_periodInSeconds = true;
boolean that_present_periodInSeconds = true;
if (this_present_periodInSeconds || that_present_periodInSeconds) {
if (!(this_present_periodInSeconds && that_present_periodInSeconds))
return false;
if (this.periodInSeconds != that.periodInSeconds)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(setInactivityTimeoutPeriod_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
setInactivityTimeoutPeriod_args typedOther = (setInactivityTimeoutPeriod_args)other;
lastComparison = Boolean.valueOf(isSetPeriodInSeconds()).compareTo(typedOther.isSetPeriodInSeconds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPeriodInSeconds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.periodInSeconds, typedOther.periodInSeconds);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PERIOD_IN_SECONDS
if (field.type == org.apache.thrift.protocol.TType.I64) {
this.periodInSeconds = iprot.readI64();
setPeriodInSecondsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(PERIOD_IN_SECONDS_FIELD_DESC);
oprot.writeI64(this.periodInSeconds);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("setInactivityTimeoutPeriod_args(");
boolean first = true;
sb.append("periodInSeconds:");
sb.append(this.periodInSeconds);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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);
}
}
}
public static class setInactivityTimeoutPeriod_result implements org.apache.thrift.TBase<setInactivityTimeoutPeriod_result, setInactivityTimeoutPeriod_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setInactivityTimeoutPeriod_result");
/** 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(setInactivityTimeoutPeriod_result.class, metaDataMap);
}
public setInactivityTimeoutPeriod_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public setInactivityTimeoutPeriod_result(setInactivityTimeoutPeriod_result other) {
}
public setInactivityTimeoutPeriod_result deepCopy() {
return new setInactivityTimeoutPeriod_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 setInactivityTimeoutPeriod_result)
return this.equals((setInactivityTimeoutPeriod_result)that);
return false;
}
public boolean equals(setInactivityTimeoutPeriod_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(setInactivityTimeoutPeriod_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
setInactivityTimeoutPeriod_result typedOther = (setInactivityTimeoutPeriod_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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("setInactivityTimeoutPeriod_result(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class shutdown_args implements org.apache.thrift.TBase<shutdown_args, shutdown_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("shutdown_args");
private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I32, (short)1);
public int status; // 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 {
STATUS((short)1, "status");
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: // STATUS
return STATUS;
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 __STATUS_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", 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(shutdown_args.class, metaDataMap);
}
public shutdown_args() {
}
public shutdown_args(
int status)
{
this();
this.status = status;
setStatusIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public shutdown_args(shutdown_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.status = other.status;
}
public shutdown_args deepCopy() {
return new shutdown_args(this);
}
@Override
public void clear() {
setStatusIsSet(false);
this.status = 0;
}
public int getStatus() {
return this.status;
}
public shutdown_args setStatus(int status) {
this.status = status;
setStatusIsSet(true);
return this;
}
public void unsetStatus() {
__isset_bit_vector.clear(__STATUS_ISSET_ID);
}
/** Returns true if field status is set (has been assigned a value) and false otherwise */
public boolean isSetStatus() {
return __isset_bit_vector.get(__STATUS_ISSET_ID);
}
public void setStatusIsSet(boolean value) {
__isset_bit_vector.set(__STATUS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case STATUS:
if (value == null) {
unsetStatus();
} else {
setStatus((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case STATUS:
return Integer.valueOf(getStatus());
}
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 STATUS:
return isSetStatus();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof shutdown_args)
return this.equals((shutdown_args)that);
return false;
}
public boolean equals(shutdown_args that) {
if (that == null)
return false;
boolean this_present_status = true;
boolean that_present_status = true;
if (this_present_status || that_present_status) {
if (!(this_present_status && that_present_status))
return false;
if (this.status != that.status)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(shutdown_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
shutdown_args typedOther = (shutdown_args)other;
lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStatus()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // STATUS
if (field.type == org.apache.thrift.protocol.TType.I32) {
this.status = iprot.readI32();
setStatusIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(STATUS_FIELD_DESC);
oprot.writeI32(this.status);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("shutdown_args(");
boolean first = true;
sb.append("status:");
sb.append(this.status);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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);
}
}
}
public static class shutdown_result implements org.apache.thrift.TBase<shutdown_result, shutdown_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("shutdown_result");
/** 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(shutdown_result.class, metaDataMap);
}
public shutdown_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public shutdown_result(shutdown_result other) {
}
public shutdown_result deepCopy() {
return new shutdown_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 shutdown_result)
return this.equals((shutdown_result)that);
return false;
}
public boolean equals(shutdown_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(shutdown_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
shutdown_result typedOther = (shutdown_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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("shutdown_result(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class create_args implements org.apache.thrift.TBase<create_args, create_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public Pathname path; // 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 {
PATH((short)1, "path");
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: // PATH
return PATH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_args.class, metaDataMap);
}
public create_args() {
}
public create_args(
Pathname path)
{
this();
this.path = path;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public create_args(create_args other) {
if (other.isSetPath()) {
this.path = new Pathname(other.path);
}
}
public create_args deepCopy() {
return new create_args(this);
}
@Override
public void clear() {
this.path = null;
}
public Pathname getPath() {
return this.path;
}
public create_args setPath(Pathname path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((Pathname)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
}
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 PATH:
return isSetPath();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof create_args)
return this.equals((create_args)that);
return false;
}
public boolean equals(create_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(create_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
create_args typedOther = (create_args)other;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.path = new Pathname();
this.path.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
this.path.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("create_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class create_result implements org.apache.thrift.TBase<create_result, create_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public ThriftHandle success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ThriftHandle.class)));
tmpMap.put(_Fields.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(create_result.class, metaDataMap);
}
public create_result() {
}
public create_result(
ThriftHandle success,
ThriftIOException ouch)
{
this();
this.success = success;
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public create_result(create_result other) {
if (other.isSetSuccess()) {
this.success = new ThriftHandle(other.success);
}
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public create_result deepCopy() {
return new create_result(this);
}
@Override
public void clear() {
this.success = null;
this.ouch = null;
}
public ThriftHandle getSuccess() {
return this.success;
}
public create_result setSuccess(ThriftHandle 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 ThriftIOException getOuch() {
return this.ouch;
}
public create_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((ThriftHandle)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof create_result)
return this.equals((create_result)that);
return false;
}
public boolean equals(create_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(create_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
create_result typedOther = (create_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.success = new ThriftHandle();
this.success.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
this.success.write(oprot);
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("create_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class createFile_args implements org.apache.thrift.TBase<createFile_args, createFile_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createFile_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("mode", org.apache.thrift.protocol.TType.I16, (short)2);
private static final org.apache.thrift.protocol.TField OVERWRITE_FIELD_DESC = new org.apache.thrift.protocol.TField("overwrite", org.apache.thrift.protocol.TType.BOOL, (short)3);
private static final org.apache.thrift.protocol.TField BUFFER_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("bufferSize", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField BLOCK_REPLICATION_FIELD_DESC = new org.apache.thrift.protocol.TField("block_replication", org.apache.thrift.protocol.TType.I16, (short)5);
private static final org.apache.thrift.protocol.TField BLOCKSIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("blocksize", org.apache.thrift.protocol.TType.I64, (short)6);
public Pathname path; // required
public short mode; // required
public boolean overwrite; // required
public int bufferSize; // required
public short block_replication; // required
public long blocksize; // 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 {
PATH((short)1, "path"),
MODE((short)2, "mode"),
OVERWRITE((short)3, "overwrite"),
BUFFER_SIZE((short)4, "bufferSize"),
BLOCK_REPLICATION((short)5, "block_replication"),
BLOCKSIZE((short)6, "blocksize");
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: // PATH
return PATH;
case 2: // MODE
return MODE;
case 3: // OVERWRITE
return OVERWRITE;
case 4: // BUFFER_SIZE
return BUFFER_SIZE;
case 5: // BLOCK_REPLICATION
return BLOCK_REPLICATION;
case 6: // BLOCKSIZE
return BLOCKSIZE;
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 __MODE_ISSET_ID = 0;
private static final int __OVERWRITE_ISSET_ID = 1;
private static final int __BUFFERSIZE_ISSET_ID = 2;
private static final int __BLOCK_REPLICATION_ISSET_ID = 3;
private static final int __BLOCKSIZE_ISSET_ID = 4;
private BitSet __isset_bit_vector = new BitSet(5);
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.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
tmpMap.put(_Fields.MODE, new org.apache.thrift.meta_data.FieldMetaData("mode", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16)));
tmpMap.put(_Fields.OVERWRITE, new org.apache.thrift.meta_data.FieldMetaData("overwrite", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.BUFFER_SIZE, new org.apache.thrift.meta_data.FieldMetaData("bufferSize", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.BLOCK_REPLICATION, new org.apache.thrift.meta_data.FieldMetaData("block_replication", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16)));
tmpMap.put(_Fields.BLOCKSIZE, new org.apache.thrift.meta_data.FieldMetaData("blocksize", 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(createFile_args.class, metaDataMap);
}
public createFile_args() {
}
public createFile_args(
Pathname path,
short mode,
boolean overwrite,
int bufferSize,
short block_replication,
long blocksize)
{
this();
this.path = path;
this.mode = mode;
setModeIsSet(true);
this.overwrite = overwrite;
setOverwriteIsSet(true);
this.bufferSize = bufferSize;
setBufferSizeIsSet(true);
this.block_replication = block_replication;
setBlock_replicationIsSet(true);
this.blocksize = blocksize;
setBlocksizeIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public createFile_args(createFile_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetPath()) {
this.path = new Pathname(other.path);
}
this.mode = other.mode;
this.overwrite = other.overwrite;
this.bufferSize = other.bufferSize;
this.block_replication = other.block_replication;
this.blocksize = other.blocksize;
}
public createFile_args deepCopy() {
return new createFile_args(this);
}
@Override
public void clear() {
this.path = null;
setModeIsSet(false);
this.mode = 0;
setOverwriteIsSet(false);
this.overwrite = false;
setBufferSizeIsSet(false);
this.bufferSize = 0;
setBlock_replicationIsSet(false);
this.block_replication = 0;
setBlocksizeIsSet(false);
this.blocksize = 0;
}
public Pathname getPath() {
return this.path;
}
public createFile_args setPath(Pathname path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public short getMode() {
return this.mode;
}
public createFile_args setMode(short mode) {
this.mode = mode;
setModeIsSet(true);
return this;
}
public void unsetMode() {
__isset_bit_vector.clear(__MODE_ISSET_ID);
}
/** Returns true if field mode is set (has been assigned a value) and false otherwise */
public boolean isSetMode() {
return __isset_bit_vector.get(__MODE_ISSET_ID);
}
public void setModeIsSet(boolean value) {
__isset_bit_vector.set(__MODE_ISSET_ID, value);
}
public boolean isOverwrite() {
return this.overwrite;
}
public createFile_args setOverwrite(boolean overwrite) {
this.overwrite = overwrite;
setOverwriteIsSet(true);
return this;
}
public void unsetOverwrite() {
__isset_bit_vector.clear(__OVERWRITE_ISSET_ID);
}
/** Returns true if field overwrite is set (has been assigned a value) and false otherwise */
public boolean isSetOverwrite() {
return __isset_bit_vector.get(__OVERWRITE_ISSET_ID);
}
public void setOverwriteIsSet(boolean value) {
__isset_bit_vector.set(__OVERWRITE_ISSET_ID, value);
}
public int getBufferSize() {
return this.bufferSize;
}
public createFile_args setBufferSize(int bufferSize) {
this.bufferSize = bufferSize;
setBufferSizeIsSet(true);
return this;
}
public void unsetBufferSize() {
__isset_bit_vector.clear(__BUFFERSIZE_ISSET_ID);
}
/** Returns true if field bufferSize is set (has been assigned a value) and false otherwise */
public boolean isSetBufferSize() {
return __isset_bit_vector.get(__BUFFERSIZE_ISSET_ID);
}
public void setBufferSizeIsSet(boolean value) {
__isset_bit_vector.set(__BUFFERSIZE_ISSET_ID, value);
}
public short getBlock_replication() {
return this.block_replication;
}
public createFile_args setBlock_replication(short block_replication) {
this.block_replication = block_replication;
setBlock_replicationIsSet(true);
return this;
}
public void unsetBlock_replication() {
__isset_bit_vector.clear(__BLOCK_REPLICATION_ISSET_ID);
}
/** Returns true if field block_replication is set (has been assigned a value) and false otherwise */
public boolean isSetBlock_replication() {
return __isset_bit_vector.get(__BLOCK_REPLICATION_ISSET_ID);
}
public void setBlock_replicationIsSet(boolean value) {
__isset_bit_vector.set(__BLOCK_REPLICATION_ISSET_ID, value);
}
public long getBlocksize() {
return this.blocksize;
}
public createFile_args setBlocksize(long blocksize) {
this.blocksize = blocksize;
setBlocksizeIsSet(true);
return this;
}
public void unsetBlocksize() {
__isset_bit_vector.clear(__BLOCKSIZE_ISSET_ID);
}
/** Returns true if field blocksize is set (has been assigned a value) and false otherwise */
public boolean isSetBlocksize() {
return __isset_bit_vector.get(__BLOCKSIZE_ISSET_ID);
}
public void setBlocksizeIsSet(boolean value) {
__isset_bit_vector.set(__BLOCKSIZE_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((Pathname)value);
}
break;
case MODE:
if (value == null) {
unsetMode();
} else {
setMode((Short)value);
}
break;
case OVERWRITE:
if (value == null) {
unsetOverwrite();
} else {
setOverwrite((Boolean)value);
}
break;
case BUFFER_SIZE:
if (value == null) {
unsetBufferSize();
} else {
setBufferSize((Integer)value);
}
break;
case BLOCK_REPLICATION:
if (value == null) {
unsetBlock_replication();
} else {
setBlock_replication((Short)value);
}
break;
case BLOCKSIZE:
if (value == null) {
unsetBlocksize();
} else {
setBlocksize((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case MODE:
return Short.valueOf(getMode());
case OVERWRITE:
return Boolean.valueOf(isOverwrite());
case BUFFER_SIZE:
return Integer.valueOf(getBufferSize());
case BLOCK_REPLICATION:
return Short.valueOf(getBlock_replication());
case BLOCKSIZE:
return Long.valueOf(getBlocksize());
}
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 PATH:
return isSetPath();
case MODE:
return isSetMode();
case OVERWRITE:
return isSetOverwrite();
case BUFFER_SIZE:
return isSetBufferSize();
case BLOCK_REPLICATION:
return isSetBlock_replication();
case BLOCKSIZE:
return isSetBlocksize();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof createFile_args)
return this.equals((createFile_args)that);
return false;
}
public boolean equals(createFile_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_mode = true;
boolean that_present_mode = true;
if (this_present_mode || that_present_mode) {
if (!(this_present_mode && that_present_mode))
return false;
if (this.mode != that.mode)
return false;
}
boolean this_present_overwrite = true;
boolean that_present_overwrite = true;
if (this_present_overwrite || that_present_overwrite) {
if (!(this_present_overwrite && that_present_overwrite))
return false;
if (this.overwrite != that.overwrite)
return false;
}
boolean this_present_bufferSize = true;
boolean that_present_bufferSize = true;
if (this_present_bufferSize || that_present_bufferSize) {
if (!(this_present_bufferSize && that_present_bufferSize))
return false;
if (this.bufferSize != that.bufferSize)
return false;
}
boolean this_present_block_replication = true;
boolean that_present_block_replication = true;
if (this_present_block_replication || that_present_block_replication) {
if (!(this_present_block_replication && that_present_block_replication))
return false;
if (this.block_replication != that.block_replication)
return false;
}
boolean this_present_blocksize = true;
boolean that_present_blocksize = true;
if (this_present_blocksize || that_present_blocksize) {
if (!(this_present_blocksize && that_present_blocksize))
return false;
if (this.blocksize != that.blocksize)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(createFile_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
createFile_args typedOther = (createFile_args)other;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMode()).compareTo(typedOther.isSetMode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMode()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mode, typedOther.mode);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOverwrite()).compareTo(typedOther.isSetOverwrite());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOverwrite()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.overwrite, typedOther.overwrite);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetBufferSize()).compareTo(typedOther.isSetBufferSize());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBufferSize()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bufferSize, typedOther.bufferSize);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetBlock_replication()).compareTo(typedOther.isSetBlock_replication());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBlock_replication()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.block_replication, typedOther.block_replication);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetBlocksize()).compareTo(typedOther.isSetBlocksize());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBlocksize()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blocksize, typedOther.blocksize);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.path = new Pathname();
this.path.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // MODE
if (field.type == org.apache.thrift.protocol.TType.I16) {
this.mode = iprot.readI16();
setModeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // OVERWRITE
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
this.overwrite = iprot.readBool();
setOverwriteIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 4: // BUFFER_SIZE
if (field.type == org.apache.thrift.protocol.TType.I32) {
this.bufferSize = iprot.readI32();
setBufferSizeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 5: // BLOCK_REPLICATION
if (field.type == org.apache.thrift.protocol.TType.I16) {
this.block_replication = iprot.readI16();
setBlock_replicationIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 6: // BLOCKSIZE
if (field.type == org.apache.thrift.protocol.TType.I64) {
this.blocksize = iprot.readI64();
setBlocksizeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
this.path.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(MODE_FIELD_DESC);
oprot.writeI16(this.mode);
oprot.writeFieldEnd();
oprot.writeFieldBegin(OVERWRITE_FIELD_DESC);
oprot.writeBool(this.overwrite);
oprot.writeFieldEnd();
oprot.writeFieldBegin(BUFFER_SIZE_FIELD_DESC);
oprot.writeI32(this.bufferSize);
oprot.writeFieldEnd();
oprot.writeFieldBegin(BLOCK_REPLICATION_FIELD_DESC);
oprot.writeI16(this.block_replication);
oprot.writeFieldEnd();
oprot.writeFieldBegin(BLOCKSIZE_FIELD_DESC);
oprot.writeI64(this.blocksize);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("createFile_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("mode:");
sb.append(this.mode);
first = false;
if (!first) sb.append(", ");
sb.append("overwrite:");
sb.append(this.overwrite);
first = false;
if (!first) sb.append(", ");
sb.append("bufferSize:");
sb.append(this.bufferSize);
first = false;
if (!first) sb.append(", ");
sb.append("block_replication:");
sb.append(this.block_replication);
first = false;
if (!first) sb.append(", ");
sb.append("blocksize:");
sb.append(this.blocksize);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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);
}
}
}
public static class createFile_result implements org.apache.thrift.TBase<createFile_result, createFile_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createFile_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public ThriftHandle success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ThriftHandle.class)));
tmpMap.put(_Fields.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(createFile_result.class, metaDataMap);
}
public createFile_result() {
}
public createFile_result(
ThriftHandle success,
ThriftIOException ouch)
{
this();
this.success = success;
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public createFile_result(createFile_result other) {
if (other.isSetSuccess()) {
this.success = new ThriftHandle(other.success);
}
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public createFile_result deepCopy() {
return new createFile_result(this);
}
@Override
public void clear() {
this.success = null;
this.ouch = null;
}
public ThriftHandle getSuccess() {
return this.success;
}
public createFile_result setSuccess(ThriftHandle 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 ThriftIOException getOuch() {
return this.ouch;
}
public createFile_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((ThriftHandle)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof createFile_result)
return this.equals((createFile_result)that);
return false;
}
public boolean equals(createFile_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(createFile_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
createFile_result typedOther = (createFile_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.success = new ThriftHandle();
this.success.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
this.success.write(oprot);
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("createFile_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class open_args implements org.apache.thrift.TBase<open_args, open_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("open_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public Pathname path; // 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 {
PATH((short)1, "path");
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: // PATH
return PATH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(open_args.class, metaDataMap);
}
public open_args() {
}
public open_args(
Pathname path)
{
this();
this.path = path;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public open_args(open_args other) {
if (other.isSetPath()) {
this.path = new Pathname(other.path);
}
}
public open_args deepCopy() {
return new open_args(this);
}
@Override
public void clear() {
this.path = null;
}
public Pathname getPath() {
return this.path;
}
public open_args setPath(Pathname path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((Pathname)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
}
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 PATH:
return isSetPath();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof open_args)
return this.equals((open_args)that);
return false;
}
public boolean equals(open_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(open_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
open_args typedOther = (open_args)other;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.path = new Pathname();
this.path.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
this.path.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("open_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class open_result implements org.apache.thrift.TBase<open_result, open_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("open_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public ThriftHandle success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ThriftHandle.class)));
tmpMap.put(_Fields.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(open_result.class, metaDataMap);
}
public open_result() {
}
public open_result(
ThriftHandle success,
ThriftIOException ouch)
{
this();
this.success = success;
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public open_result(open_result other) {
if (other.isSetSuccess()) {
this.success = new ThriftHandle(other.success);
}
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public open_result deepCopy() {
return new open_result(this);
}
@Override
public void clear() {
this.success = null;
this.ouch = null;
}
public ThriftHandle getSuccess() {
return this.success;
}
public open_result setSuccess(ThriftHandle 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 ThriftIOException getOuch() {
return this.ouch;
}
public open_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((ThriftHandle)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof open_result)
return this.equals((open_result)that);
return false;
}
public boolean equals(open_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(open_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
open_result typedOther = (open_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.success = new ThriftHandle();
this.success.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
this.success.write(oprot);
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("open_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class append_args implements org.apache.thrift.TBase<append_args, append_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public Pathname path; // 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 {
PATH((short)1, "path");
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: // PATH
return PATH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_args.class, metaDataMap);
}
public append_args() {
}
public append_args(
Pathname path)
{
this();
this.path = path;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public append_args(append_args other) {
if (other.isSetPath()) {
this.path = new Pathname(other.path);
}
}
public append_args deepCopy() {
return new append_args(this);
}
@Override
public void clear() {
this.path = null;
}
public Pathname getPath() {
return this.path;
}
public append_args setPath(Pathname path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((Pathname)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
}
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 PATH:
return isSetPath();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof append_args)
return this.equals((append_args)that);
return false;
}
public boolean equals(append_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(append_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
append_args typedOther = (append_args)other;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.path = new Pathname();
this.path.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
this.path.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("append_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class append_result implements org.apache.thrift.TBase<append_result, append_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public ThriftHandle success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ThriftHandle.class)));
tmpMap.put(_Fields.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(append_result.class, metaDataMap);
}
public append_result() {
}
public append_result(
ThriftHandle success,
ThriftIOException ouch)
{
this();
this.success = success;
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public append_result(append_result other) {
if (other.isSetSuccess()) {
this.success = new ThriftHandle(other.success);
}
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public append_result deepCopy() {
return new append_result(this);
}
@Override
public void clear() {
this.success = null;
this.ouch = null;
}
public ThriftHandle getSuccess() {
return this.success;
}
public append_result setSuccess(ThriftHandle 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 ThriftIOException getOuch() {
return this.ouch;
}
public append_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((ThriftHandle)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof append_result)
return this.equals((append_result)that);
return false;
}
public boolean equals(append_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(append_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
append_result typedOther = (append_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.success = new ThriftHandle();
this.success.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
this.success.write(oprot);
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("append_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class write_args implements org.apache.thrift.TBase<write_args, write_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("write_args");
private static final org.apache.thrift.protocol.TField HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("handle", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)2);
public ThriftHandle handle; // required
public String data; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
HANDLE((short)1, "handle"),
DATA((short)2, "data");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // HANDLE
return HANDLE;
case 2: // DATA
return DATA;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.HANDLE, new org.apache.thrift.meta_data.FieldMetaData("handle", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ThriftHandle.class)));
tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(write_args.class, metaDataMap);
}
public write_args() {
}
public write_args(
ThriftHandle handle,
String data)
{
this();
this.handle = handle;
this.data = data;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public write_args(write_args other) {
if (other.isSetHandle()) {
this.handle = new ThriftHandle(other.handle);
}
if (other.isSetData()) {
this.data = other.data;
}
}
public write_args deepCopy() {
return new write_args(this);
}
@Override
public void clear() {
this.handle = null;
this.data = null;
}
public ThriftHandle getHandle() {
return this.handle;
}
public write_args setHandle(ThriftHandle handle) {
this.handle = handle;
return this;
}
public void unsetHandle() {
this.handle = null;
}
/** Returns true if field handle is set (has been assigned a value) and false otherwise */
public boolean isSetHandle() {
return this.handle != null;
}
public void setHandleIsSet(boolean value) {
if (!value) {
this.handle = null;
}
}
public String getData() {
return this.data;
}
public write_args setData(String data) {
this.data = data;
return this;
}
public void unsetData() {
this.data = null;
}
/** Returns true if field data is set (has been assigned a value) and false otherwise */
public boolean isSetData() {
return this.data != null;
}
public void setDataIsSet(boolean value) {
if (!value) {
this.data = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case HANDLE:
if (value == null) {
unsetHandle();
} else {
setHandle((ThriftHandle)value);
}
break;
case DATA:
if (value == null) {
unsetData();
} else {
setData((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case HANDLE:
return getHandle();
case DATA:
return getData();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case HANDLE:
return isSetHandle();
case DATA:
return isSetData();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof write_args)
return this.equals((write_args)that);
return false;
}
public boolean equals(write_args that) {
if (that == null)
return false;
boolean this_present_handle = true && this.isSetHandle();
boolean that_present_handle = true && that.isSetHandle();
if (this_present_handle || that_present_handle) {
if (!(this_present_handle && that_present_handle))
return false;
if (!this.handle.equals(that.handle))
return false;
}
boolean this_present_data = true && this.isSetData();
boolean that_present_data = true && that.isSetData();
if (this_present_data || that_present_data) {
if (!(this_present_data && that_present_data))
return false;
if (!this.data.equals(that.data))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(write_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
write_args typedOther = (write_args)other;
lastComparison = Boolean.valueOf(isSetHandle()).compareTo(typedOther.isSetHandle());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHandle()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.handle, typedOther.handle);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetData()).compareTo(typedOther.isSetData());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetData()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, typedOther.data);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // HANDLE
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.handle = new ThriftHandle();
this.handle.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // DATA
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.data = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.handle != null) {
oprot.writeFieldBegin(HANDLE_FIELD_DESC);
this.handle.write(oprot);
oprot.writeFieldEnd();
}
if (this.data != null) {
oprot.writeFieldBegin(DATA_FIELD_DESC);
oprot.writeString(this.data);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("write_args(");
boolean first = true;
sb.append("handle:");
if (this.handle == null) {
sb.append("null");
} else {
sb.append(this.handle);
}
first = false;
if (!first) sb.append(", ");
sb.append("data:");
if (this.data == null) {
sb.append("null");
} else {
sb.append(this.data);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class write_result implements org.apache.thrift.TBase<write_result, write_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("write_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 OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public boolean success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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 BitSet __isset_bit_vector = new BitSet(1);
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.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(write_result.class, metaDataMap);
}
public write_result() {
}
public write_result(
boolean success,
ThriftIOException ouch)
{
this();
this.success = success;
setSuccessIsSet(true);
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public write_result(write_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public write_result deepCopy() {
return new write_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.ouch = null;
}
public boolean isSuccess() {
return this.success;
}
public write_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public ThriftIOException getOuch() {
return this.ouch;
}
public write_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Boolean.valueOf(isSuccess());
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof write_result)
return this.equals((write_result)that);
return false;
}
public boolean equals(write_result that) {
if (that == null)
return false;
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_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(write_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
write_result typedOther = (write_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
this.success = iprot.readBool();
setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(this.success);
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("write_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class read_args implements org.apache.thrift.TBase<read_args, read_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("read_args");
private static final org.apache.thrift.protocol.TField HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("handle", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("offset", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("size", org.apache.thrift.protocol.TType.I32, (short)3);
public ThriftHandle handle; // required
public long offset; // required
public int size; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
HANDLE((short)1, "handle"),
OFFSET((short)2, "offset"),
SIZE((short)3, "size");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // HANDLE
return HANDLE;
case 2: // OFFSET
return OFFSET;
case 3: // SIZE
return SIZE;
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 __OFFSET_ISSET_ID = 0;
private static final int __SIZE_ISSET_ID = 1;
private BitSet __isset_bit_vector = new BitSet(2);
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.HANDLE, new org.apache.thrift.meta_data.FieldMetaData("handle", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ThriftHandle.class)));
tmpMap.put(_Fields.OFFSET, new org.apache.thrift.meta_data.FieldMetaData("offset", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.SIZE, new org.apache.thrift.meta_data.FieldMetaData("size", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(read_args.class, metaDataMap);
}
public read_args() {
}
public read_args(
ThriftHandle handle,
long offset,
int size)
{
this();
this.handle = handle;
this.offset = offset;
setOffsetIsSet(true);
this.size = size;
setSizeIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public read_args(read_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetHandle()) {
this.handle = new ThriftHandle(other.handle);
}
this.offset = other.offset;
this.size = other.size;
}
public read_args deepCopy() {
return new read_args(this);
}
@Override
public void clear() {
this.handle = null;
setOffsetIsSet(false);
this.offset = 0;
setSizeIsSet(false);
this.size = 0;
}
public ThriftHandle getHandle() {
return this.handle;
}
public read_args setHandle(ThriftHandle handle) {
this.handle = handle;
return this;
}
public void unsetHandle() {
this.handle = null;
}
/** Returns true if field handle is set (has been assigned a value) and false otherwise */
public boolean isSetHandle() {
return this.handle != null;
}
public void setHandleIsSet(boolean value) {
if (!value) {
this.handle = null;
}
}
public long getOffset() {
return this.offset;
}
public read_args setOffset(long offset) {
this.offset = offset;
setOffsetIsSet(true);
return this;
}
public void unsetOffset() {
__isset_bit_vector.clear(__OFFSET_ISSET_ID);
}
/** Returns true if field offset is set (has been assigned a value) and false otherwise */
public boolean isSetOffset() {
return __isset_bit_vector.get(__OFFSET_ISSET_ID);
}
public void setOffsetIsSet(boolean value) {
__isset_bit_vector.set(__OFFSET_ISSET_ID, value);
}
public int getSize() {
return this.size;
}
public read_args setSize(int size) {
this.size = size;
setSizeIsSet(true);
return this;
}
public void unsetSize() {
__isset_bit_vector.clear(__SIZE_ISSET_ID);
}
/** Returns true if field size is set (has been assigned a value) and false otherwise */
public boolean isSetSize() {
return __isset_bit_vector.get(__SIZE_ISSET_ID);
}
public void setSizeIsSet(boolean value) {
__isset_bit_vector.set(__SIZE_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case HANDLE:
if (value == null) {
unsetHandle();
} else {
setHandle((ThriftHandle)value);
}
break;
case OFFSET:
if (value == null) {
unsetOffset();
} else {
setOffset((Long)value);
}
break;
case SIZE:
if (value == null) {
unsetSize();
} else {
setSize((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case HANDLE:
return getHandle();
case OFFSET:
return Long.valueOf(getOffset());
case SIZE:
return Integer.valueOf(getSize());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case HANDLE:
return isSetHandle();
case OFFSET:
return isSetOffset();
case SIZE:
return isSetSize();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof read_args)
return this.equals((read_args)that);
return false;
}
public boolean equals(read_args that) {
if (that == null)
return false;
boolean this_present_handle = true && this.isSetHandle();
boolean that_present_handle = true && that.isSetHandle();
if (this_present_handle || that_present_handle) {
if (!(this_present_handle && that_present_handle))
return false;
if (!this.handle.equals(that.handle))
return false;
}
boolean this_present_offset = true;
boolean that_present_offset = true;
if (this_present_offset || that_present_offset) {
if (!(this_present_offset && that_present_offset))
return false;
if (this.offset != that.offset)
return false;
}
boolean this_present_size = true;
boolean that_present_size = true;
if (this_present_size || that_present_size) {
if (!(this_present_size && that_present_size))
return false;
if (this.size != that.size)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(read_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
read_args typedOther = (read_args)other;
lastComparison = Boolean.valueOf(isSetHandle()).compareTo(typedOther.isSetHandle());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHandle()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.handle, typedOther.handle);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOffset()).compareTo(typedOther.isSetOffset());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOffset()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.offset, typedOther.offset);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSize()).compareTo(typedOther.isSetSize());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSize()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.size, typedOther.size);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // HANDLE
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.handle = new ThriftHandle();
this.handle.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // OFFSET
if (field.type == org.apache.thrift.protocol.TType.I64) {
this.offset = iprot.readI64();
setOffsetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // SIZE
if (field.type == org.apache.thrift.protocol.TType.I32) {
this.size = iprot.readI32();
setSizeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.handle != null) {
oprot.writeFieldBegin(HANDLE_FIELD_DESC);
this.handle.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(OFFSET_FIELD_DESC);
oprot.writeI64(this.offset);
oprot.writeFieldEnd();
oprot.writeFieldBegin(SIZE_FIELD_DESC);
oprot.writeI32(this.size);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("read_args(");
boolean first = true;
sb.append("handle:");
if (this.handle == null) {
sb.append("null");
} else {
sb.append(this.handle);
}
first = false;
if (!first) sb.append(", ");
sb.append("offset:");
sb.append(this.offset);
first = false;
if (!first) sb.append(", ");
sb.append("size:");
sb.append(this.size);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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);
}
}
}
public static class read_result implements org.apache.thrift.TBase<read_result, read_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("read_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public String success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(read_result.class, metaDataMap);
}
public read_result() {
}
public read_result(
String success,
ThriftIOException ouch)
{
this();
this.success = success;
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public read_result(read_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public read_result deepCopy() {
return new read_result(this);
}
@Override
public void clear() {
this.success = null;
this.ouch = null;
}
public String getSuccess() {
return this.success;
}
public read_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 ThriftIOException getOuch() {
return this.ouch;
}
public read_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((String)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof read_result)
return this.equals((read_result)that);
return false;
}
public boolean equals(read_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(read_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
read_result typedOther = (read_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.success = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeString(this.success);
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("read_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class close_args implements org.apache.thrift.TBase<close_args, close_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("close_args");
private static final org.apache.thrift.protocol.TField OUT_FIELD_DESC = new org.apache.thrift.protocol.TField("out", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public ThriftHandle out; // 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 {
OUT((short)1, "out");
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: // OUT
return OUT;
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.OUT, new org.apache.thrift.meta_data.FieldMetaData("out", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ThriftHandle.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(close_args.class, metaDataMap);
}
public close_args() {
}
public close_args(
ThriftHandle out)
{
this();
this.out = out;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public close_args(close_args other) {
if (other.isSetOut()) {
this.out = new ThriftHandle(other.out);
}
}
public close_args deepCopy() {
return new close_args(this);
}
@Override
public void clear() {
this.out = null;
}
public ThriftHandle getOut() {
return this.out;
}
public close_args setOut(ThriftHandle out) {
this.out = out;
return this;
}
public void unsetOut() {
this.out = null;
}
/** Returns true if field out is set (has been assigned a value) and false otherwise */
public boolean isSetOut() {
return this.out != null;
}
public void setOutIsSet(boolean value) {
if (!value) {
this.out = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case OUT:
if (value == null) {
unsetOut();
} else {
setOut((ThriftHandle)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case OUT:
return getOut();
}
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 OUT:
return isSetOut();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof close_args)
return this.equals((close_args)that);
return false;
}
public boolean equals(close_args that) {
if (that == null)
return false;
boolean this_present_out = true && this.isSetOut();
boolean that_present_out = true && that.isSetOut();
if (this_present_out || that_present_out) {
if (!(this_present_out && that_present_out))
return false;
if (!this.out.equals(that.out))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(close_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
close_args typedOther = (close_args)other;
lastComparison = Boolean.valueOf(isSetOut()).compareTo(typedOther.isSetOut());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOut()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.out, typedOther.out);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // OUT
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.out = new ThriftHandle();
this.out.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.out != null) {
oprot.writeFieldBegin(OUT_FIELD_DESC);
this.out.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("close_args(");
boolean first = true;
sb.append("out:");
if (this.out == null) {
sb.append("null");
} else {
sb.append(this.out);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class close_result implements org.apache.thrift.TBase<close_result, close_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("close_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 OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public boolean success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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 BitSet __isset_bit_vector = new BitSet(1);
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.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(close_result.class, metaDataMap);
}
public close_result() {
}
public close_result(
boolean success,
ThriftIOException ouch)
{
this();
this.success = success;
setSuccessIsSet(true);
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public close_result(close_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public close_result deepCopy() {
return new close_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.ouch = null;
}
public boolean isSuccess() {
return this.success;
}
public close_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public ThriftIOException getOuch() {
return this.ouch;
}
public close_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Boolean.valueOf(isSuccess());
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof close_result)
return this.equals((close_result)that);
return false;
}
public boolean equals(close_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_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(close_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
close_result typedOther = (close_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
this.success = iprot.readBool();
setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(this.success);
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("close_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class rm_args implements org.apache.thrift.TBase<rm_args, rm_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rm_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField RECURSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("recursive", org.apache.thrift.protocol.TType.BOOL, (short)2);
public Pathname path; // required
public boolean recursive; // 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 {
PATH((short)1, "path"),
RECURSIVE((short)2, "recursive");
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: // PATH
return PATH;
case 2: // RECURSIVE
return RECURSIVE;
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 __RECURSIVE_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
tmpMap.put(_Fields.RECURSIVE, new org.apache.thrift.meta_data.FieldMetaData("recursive", 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(rm_args.class, metaDataMap);
}
public rm_args() {
}
public rm_args(
Pathname path,
boolean recursive)
{
this();
this.path = path;
this.recursive = recursive;
setRecursiveIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public rm_args(rm_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetPath()) {
this.path = new Pathname(other.path);
}
this.recursive = other.recursive;
}
public rm_args deepCopy() {
return new rm_args(this);
}
@Override
public void clear() {
this.path = null;
setRecursiveIsSet(false);
this.recursive = false;
}
public Pathname getPath() {
return this.path;
}
public rm_args setPath(Pathname path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public boolean isRecursive() {
return this.recursive;
}
public rm_args setRecursive(boolean recursive) {
this.recursive = recursive;
setRecursiveIsSet(true);
return this;
}
public void unsetRecursive() {
__isset_bit_vector.clear(__RECURSIVE_ISSET_ID);
}
/** Returns true if field recursive is set (has been assigned a value) and false otherwise */
public boolean isSetRecursive() {
return __isset_bit_vector.get(__RECURSIVE_ISSET_ID);
}
public void setRecursiveIsSet(boolean value) {
__isset_bit_vector.set(__RECURSIVE_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((Pathname)value);
}
break;
case RECURSIVE:
if (value == null) {
unsetRecursive();
} else {
setRecursive((Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case RECURSIVE:
return Boolean.valueOf(isRecursive());
}
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 PATH:
return isSetPath();
case RECURSIVE:
return isSetRecursive();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof rm_args)
return this.equals((rm_args)that);
return false;
}
public boolean equals(rm_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_recursive = true;
boolean that_present_recursive = true;
if (this_present_recursive || that_present_recursive) {
if (!(this_present_recursive && that_present_recursive))
return false;
if (this.recursive != that.recursive)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(rm_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
rm_args typedOther = (rm_args)other;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRecursive()).compareTo(typedOther.isSetRecursive());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRecursive()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.recursive, typedOther.recursive);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.path = new Pathname();
this.path.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // RECURSIVE
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
this.recursive = iprot.readBool();
setRecursiveIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
this.path.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(RECURSIVE_FIELD_DESC);
oprot.writeBool(this.recursive);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("rm_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("recursive:");
sb.append(this.recursive);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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);
}
}
}
public static class rm_result implements org.apache.thrift.TBase<rm_result, rm_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rm_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 OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public boolean success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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 BitSet __isset_bit_vector = new BitSet(1);
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.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(rm_result.class, metaDataMap);
}
public rm_result() {
}
public rm_result(
boolean success,
ThriftIOException ouch)
{
this();
this.success = success;
setSuccessIsSet(true);
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public rm_result(rm_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public rm_result deepCopy() {
return new rm_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.ouch = null;
}
public boolean isSuccess() {
return this.success;
}
public rm_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public ThriftIOException getOuch() {
return this.ouch;
}
public rm_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Boolean.valueOf(isSuccess());
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof rm_result)
return this.equals((rm_result)that);
return false;
}
public boolean equals(rm_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_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(rm_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
rm_result typedOther = (rm_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
this.success = iprot.readBool();
setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(this.success);
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("rm_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class rename_args implements org.apache.thrift.TBase<rename_args, rename_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rename_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField DEST_FIELD_DESC = new org.apache.thrift.protocol.TField("dest", org.apache.thrift.protocol.TType.STRUCT, (short)2);
public Pathname path; // required
public Pathname dest; // 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 {
PATH((short)1, "path"),
DEST((short)2, "dest");
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: // PATH
return PATH;
case 2: // DEST
return DEST;
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.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
tmpMap.put(_Fields.DEST, new org.apache.thrift.meta_data.FieldMetaData("dest", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(rename_args.class, metaDataMap);
}
public rename_args() {
}
public rename_args(
Pathname path,
Pathname dest)
{
this();
this.path = path;
this.dest = dest;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public rename_args(rename_args other) {
if (other.isSetPath()) {
this.path = new Pathname(other.path);
}
if (other.isSetDest()) {
this.dest = new Pathname(other.dest);
}
}
public rename_args deepCopy() {
return new rename_args(this);
}
@Override
public void clear() {
this.path = null;
this.dest = null;
}
public Pathname getPath() {
return this.path;
}
public rename_args setPath(Pathname path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public Pathname getDest() {
return this.dest;
}
public rename_args setDest(Pathname dest) {
this.dest = dest;
return this;
}
public void unsetDest() {
this.dest = null;
}
/** Returns true if field dest is set (has been assigned a value) and false otherwise */
public boolean isSetDest() {
return this.dest != null;
}
public void setDestIsSet(boolean value) {
if (!value) {
this.dest = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((Pathname)value);
}
break;
case DEST:
if (value == null) {
unsetDest();
} else {
setDest((Pathname)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case DEST:
return getDest();
}
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 PATH:
return isSetPath();
case DEST:
return isSetDest();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof rename_args)
return this.equals((rename_args)that);
return false;
}
public boolean equals(rename_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_dest = true && this.isSetDest();
boolean that_present_dest = true && that.isSetDest();
if (this_present_dest || that_present_dest) {
if (!(this_present_dest && that_present_dest))
return false;
if (!this.dest.equals(that.dest))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(rename_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
rename_args typedOther = (rename_args)other;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetDest()).compareTo(typedOther.isSetDest());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDest()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest, typedOther.dest);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.path = new Pathname();
this.path.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // DEST
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.dest = new Pathname();
this.dest.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
this.path.write(oprot);
oprot.writeFieldEnd();
}
if (this.dest != null) {
oprot.writeFieldBegin(DEST_FIELD_DESC);
this.dest.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("rename_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("dest:");
if (this.dest == null) {
sb.append("null");
} else {
sb.append(this.dest);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class rename_result implements org.apache.thrift.TBase<rename_result, rename_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rename_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 OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public boolean success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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 BitSet __isset_bit_vector = new BitSet(1);
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.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(rename_result.class, metaDataMap);
}
public rename_result() {
}
public rename_result(
boolean success,
ThriftIOException ouch)
{
this();
this.success = success;
setSuccessIsSet(true);
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public rename_result(rename_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public rename_result deepCopy() {
return new rename_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.ouch = null;
}
public boolean isSuccess() {
return this.success;
}
public rename_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public ThriftIOException getOuch() {
return this.ouch;
}
public rename_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Boolean.valueOf(isSuccess());
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof rename_result)
return this.equals((rename_result)that);
return false;
}
public boolean equals(rename_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_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(rename_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
rename_result typedOther = (rename_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
this.success = iprot.readBool();
setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(this.success);
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("rename_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class mkdirs_args implements org.apache.thrift.TBase<mkdirs_args, mkdirs_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mkdirs_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public Pathname path; // 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 {
PATH((short)1, "path");
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: // PATH
return PATH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mkdirs_args.class, metaDataMap);
}
public mkdirs_args() {
}
public mkdirs_args(
Pathname path)
{
this();
this.path = path;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public mkdirs_args(mkdirs_args other) {
if (other.isSetPath()) {
this.path = new Pathname(other.path);
}
}
public mkdirs_args deepCopy() {
return new mkdirs_args(this);
}
@Override
public void clear() {
this.path = null;
}
public Pathname getPath() {
return this.path;
}
public mkdirs_args setPath(Pathname path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((Pathname)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
}
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 PATH:
return isSetPath();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof mkdirs_args)
return this.equals((mkdirs_args)that);
return false;
}
public boolean equals(mkdirs_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(mkdirs_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
mkdirs_args typedOther = (mkdirs_args)other;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.path = new Pathname();
this.path.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
this.path.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("mkdirs_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class mkdirs_result implements org.apache.thrift.TBase<mkdirs_result, mkdirs_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mkdirs_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 OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public boolean success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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 BitSet __isset_bit_vector = new BitSet(1);
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.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(mkdirs_result.class, metaDataMap);
}
public mkdirs_result() {
}
public mkdirs_result(
boolean success,
ThriftIOException ouch)
{
this();
this.success = success;
setSuccessIsSet(true);
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public mkdirs_result(mkdirs_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public mkdirs_result deepCopy() {
return new mkdirs_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.ouch = null;
}
public boolean isSuccess() {
return this.success;
}
public mkdirs_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public ThriftIOException getOuch() {
return this.ouch;
}
public mkdirs_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Boolean.valueOf(isSuccess());
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof mkdirs_result)
return this.equals((mkdirs_result)that);
return false;
}
public boolean equals(mkdirs_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_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(mkdirs_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
mkdirs_result typedOther = (mkdirs_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
this.success = iprot.readBool();
setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(this.success);
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("mkdirs_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class exists_args implements org.apache.thrift.TBase<exists_args, exists_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exists_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public Pathname path; // 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 {
PATH((short)1, "path");
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: // PATH
return PATH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exists_args.class, metaDataMap);
}
public exists_args() {
}
public exists_args(
Pathname path)
{
this();
this.path = path;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public exists_args(exists_args other) {
if (other.isSetPath()) {
this.path = new Pathname(other.path);
}
}
public exists_args deepCopy() {
return new exists_args(this);
}
@Override
public void clear() {
this.path = null;
}
public Pathname getPath() {
return this.path;
}
public exists_args setPath(Pathname path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((Pathname)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
}
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 PATH:
return isSetPath();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof exists_args)
return this.equals((exists_args)that);
return false;
}
public boolean equals(exists_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(exists_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
exists_args typedOther = (exists_args)other;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.path = new Pathname();
this.path.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
this.path.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("exists_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class exists_result implements org.apache.thrift.TBase<exists_result, exists_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exists_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 OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public boolean success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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 BitSet __isset_bit_vector = new BitSet(1);
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.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(exists_result.class, metaDataMap);
}
public exists_result() {
}
public exists_result(
boolean success,
ThriftIOException ouch)
{
this();
this.success = success;
setSuccessIsSet(true);
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public exists_result(exists_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public exists_result deepCopy() {
return new exists_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.ouch = null;
}
public boolean isSuccess() {
return this.success;
}
public exists_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public ThriftIOException getOuch() {
return this.ouch;
}
public exists_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Boolean.valueOf(isSuccess());
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof exists_result)
return this.equals((exists_result)that);
return false;
}
public boolean equals(exists_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_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(exists_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
exists_result typedOther = (exists_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
this.success = iprot.readBool();
setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(this.success);
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("exists_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class stat_args implements org.apache.thrift.TBase<stat_args, stat_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("stat_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public Pathname path; // 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 {
PATH((short)1, "path");
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: // PATH
return PATH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stat_args.class, metaDataMap);
}
public stat_args() {
}
public stat_args(
Pathname path)
{
this();
this.path = path;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public stat_args(stat_args other) {
if (other.isSetPath()) {
this.path = new Pathname(other.path);
}
}
public stat_args deepCopy() {
return new stat_args(this);
}
@Override
public void clear() {
this.path = null;
}
public Pathname getPath() {
return this.path;
}
public stat_args setPath(Pathname path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((Pathname)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
}
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 PATH:
return isSetPath();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof stat_args)
return this.equals((stat_args)that);
return false;
}
public boolean equals(stat_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(stat_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
stat_args typedOther = (stat_args)other;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.path = new Pathname();
this.path.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
this.path.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("stat_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class stat_result implements org.apache.thrift.TBase<stat_result, stat_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("stat_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public FileStatus success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FileStatus.class)));
tmpMap.put(_Fields.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stat_result.class, metaDataMap);
}
public stat_result() {
}
public stat_result(
FileStatus success,
ThriftIOException ouch)
{
this();
this.success = success;
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public stat_result(stat_result other) {
if (other.isSetSuccess()) {
this.success = new FileStatus(other.success);
}
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public stat_result deepCopy() {
return new stat_result(this);
}
@Override
public void clear() {
this.success = null;
this.ouch = null;
}
public FileStatus getSuccess() {
return this.success;
}
public stat_result setSuccess(FileStatus 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 ThriftIOException getOuch() {
return this.ouch;
}
public stat_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((FileStatus)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof stat_result)
return this.equals((stat_result)that);
return false;
}
public boolean equals(stat_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(stat_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
stat_result typedOther = (stat_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.success = new FileStatus();
this.success.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
this.success.write(oprot);
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("stat_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class listStatus_args implements org.apache.thrift.TBase<listStatus_args, listStatus_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("listStatus_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public Pathname path; // 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 {
PATH((short)1, "path");
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: // PATH
return PATH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listStatus_args.class, metaDataMap);
}
public listStatus_args() {
}
public listStatus_args(
Pathname path)
{
this();
this.path = path;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public listStatus_args(listStatus_args other) {
if (other.isSetPath()) {
this.path = new Pathname(other.path);
}
}
public listStatus_args deepCopy() {
return new listStatus_args(this);
}
@Override
public void clear() {
this.path = null;
}
public Pathname getPath() {
return this.path;
}
public listStatus_args setPath(Pathname path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((Pathname)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
}
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 PATH:
return isSetPath();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof listStatus_args)
return this.equals((listStatus_args)that);
return false;
}
public boolean equals(listStatus_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(listStatus_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
listStatus_args typedOther = (listStatus_args)other;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.path = new Pathname();
this.path.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
this.path.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("listStatus_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class listStatus_result implements org.apache.thrift.TBase<listStatus_result, listStatus_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("listStatus_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public List<FileStatus> success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FileStatus.class))));
tmpMap.put(_Fields.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(listStatus_result.class, metaDataMap);
}
public listStatus_result() {
}
public listStatus_result(
List<FileStatus> success,
ThriftIOException ouch)
{
this();
this.success = success;
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public listStatus_result(listStatus_result other) {
if (other.isSetSuccess()) {
List<FileStatus> __this__success = new ArrayList<FileStatus>();
for (FileStatus other_element : other.success) {
__this__success.add(new FileStatus(other_element));
}
this.success = __this__success;
}
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public listStatus_result deepCopy() {
return new listStatus_result(this);
}
@Override
public void clear() {
this.success = null;
this.ouch = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<FileStatus> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(FileStatus elem) {
if (this.success == null) {
this.success = new ArrayList<FileStatus>();
}
this.success.add(elem);
}
public List<FileStatus> getSuccess() {
return this.success;
}
public listStatus_result setSuccess(List<FileStatus> 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 ThriftIOException getOuch() {
return this.ouch;
}
public listStatus_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((List<FileStatus>)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof listStatus_result)
return this.equals((listStatus_result)that);
return false;
}
public boolean equals(listStatus_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(listStatus_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
listStatus_result typedOther = (listStatus_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
this.success = new ArrayList<FileStatus>(_list12.size);
for (int _i13 = 0; _i13 < _list12.size; ++_i13)
{
FileStatus _elem14; // required
_elem14 = new FileStatus();
_elem14.read(iprot);
this.success.add(_elem14);
}
iprot.readListEnd();
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
for (FileStatus _iter15 : this.success)
{
_iter15.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("listStatus_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class chmod_args implements org.apache.thrift.TBase<chmod_args, chmod_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("chmod_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("mode", org.apache.thrift.protocol.TType.I16, (short)2);
public Pathname path; // required
public short mode; // 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 {
PATH((short)1, "path"),
MODE((short)2, "mode");
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: // PATH
return PATH;
case 2: // MODE
return MODE;
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 __MODE_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
tmpMap.put(_Fields.MODE, new org.apache.thrift.meta_data.FieldMetaData("mode", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(chmod_args.class, metaDataMap);
}
public chmod_args() {
}
public chmod_args(
Pathname path,
short mode)
{
this();
this.path = path;
this.mode = mode;
setModeIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public chmod_args(chmod_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetPath()) {
this.path = new Pathname(other.path);
}
this.mode = other.mode;
}
public chmod_args deepCopy() {
return new chmod_args(this);
}
@Override
public void clear() {
this.path = null;
setModeIsSet(false);
this.mode = 0;
}
public Pathname getPath() {
return this.path;
}
public chmod_args setPath(Pathname path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public short getMode() {
return this.mode;
}
public chmod_args setMode(short mode) {
this.mode = mode;
setModeIsSet(true);
return this;
}
public void unsetMode() {
__isset_bit_vector.clear(__MODE_ISSET_ID);
}
/** Returns true if field mode is set (has been assigned a value) and false otherwise */
public boolean isSetMode() {
return __isset_bit_vector.get(__MODE_ISSET_ID);
}
public void setModeIsSet(boolean value) {
__isset_bit_vector.set(__MODE_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((Pathname)value);
}
break;
case MODE:
if (value == null) {
unsetMode();
} else {
setMode((Short)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case MODE:
return Short.valueOf(getMode());
}
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 PATH:
return isSetPath();
case MODE:
return isSetMode();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof chmod_args)
return this.equals((chmod_args)that);
return false;
}
public boolean equals(chmod_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_mode = true;
boolean that_present_mode = true;
if (this_present_mode || that_present_mode) {
if (!(this_present_mode && that_present_mode))
return false;
if (this.mode != that.mode)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(chmod_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
chmod_args typedOther = (chmod_args)other;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMode()).compareTo(typedOther.isSetMode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMode()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mode, typedOther.mode);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.path = new Pathname();
this.path.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // MODE
if (field.type == org.apache.thrift.protocol.TType.I16) {
this.mode = iprot.readI16();
setModeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
this.path.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(MODE_FIELD_DESC);
oprot.writeI16(this.mode);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("chmod_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("mode:");
sb.append(this.mode);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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);
}
}
}
public static class chmod_result implements org.apache.thrift.TBase<chmod_result, chmod_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("chmod_result");
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public ThriftIOException ouch; // 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 {
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(chmod_result.class, metaDataMap);
}
public chmod_result() {
}
public chmod_result(
ThriftIOException ouch)
{
this();
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public chmod_result(chmod_result other) {
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public chmod_result deepCopy() {
return new chmod_result(this);
}
@Override
public void clear() {
this.ouch = null;
}
public ThriftIOException getOuch() {
return this.ouch;
}
public chmod_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof chmod_result)
return this.equals((chmod_result)that);
return false;
}
public boolean equals(chmod_result that) {
if (that == null)
return false;
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(chmod_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
chmod_result typedOther = (chmod_result)other;
lastComparison = Boolean.valueOf(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("chmod_result(");
boolean first = true;
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class chown_args implements org.apache.thrift.TBase<chown_args, chown_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("chown_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("owner", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField GROUP_FIELD_DESC = new org.apache.thrift.protocol.TField("group", org.apache.thrift.protocol.TType.STRING, (short)3);
public Pathname path; // required
public String owner; // required
public String group; // 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 {
PATH((short)1, "path"),
OWNER((short)2, "owner"),
GROUP((short)3, "group");
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: // PATH
return PATH;
case 2: // OWNER
return OWNER;
case 3: // GROUP
return GROUP;
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.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
tmpMap.put(_Fields.OWNER, new org.apache.thrift.meta_data.FieldMetaData("owner", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.GROUP, new org.apache.thrift.meta_data.FieldMetaData("group", 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(chown_args.class, metaDataMap);
}
public chown_args() {
}
public chown_args(
Pathname path,
String owner,
String group)
{
this();
this.path = path;
this.owner = owner;
this.group = group;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public chown_args(chown_args other) {
if (other.isSetPath()) {
this.path = new Pathname(other.path);
}
if (other.isSetOwner()) {
this.owner = other.owner;
}
if (other.isSetGroup()) {
this.group = other.group;
}
}
public chown_args deepCopy() {
return new chown_args(this);
}
@Override
public void clear() {
this.path = null;
this.owner = null;
this.group = null;
}
public Pathname getPath() {
return this.path;
}
public chown_args setPath(Pathname path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public String getOwner() {
return this.owner;
}
public chown_args setOwner(String owner) {
this.owner = owner;
return this;
}
public void unsetOwner() {
this.owner = null;
}
/** Returns true if field owner is set (has been assigned a value) and false otherwise */
public boolean isSetOwner() {
return this.owner != null;
}
public void setOwnerIsSet(boolean value) {
if (!value) {
this.owner = null;
}
}
public String getGroup() {
return this.group;
}
public chown_args setGroup(String group) {
this.group = group;
return this;
}
public void unsetGroup() {
this.group = null;
}
/** Returns true if field group is set (has been assigned a value) and false otherwise */
public boolean isSetGroup() {
return this.group != null;
}
public void setGroupIsSet(boolean value) {
if (!value) {
this.group = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((Pathname)value);
}
break;
case OWNER:
if (value == null) {
unsetOwner();
} else {
setOwner((String)value);
}
break;
case GROUP:
if (value == null) {
unsetGroup();
} else {
setGroup((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case OWNER:
return getOwner();
case GROUP:
return getGroup();
}
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 PATH:
return isSetPath();
case OWNER:
return isSetOwner();
case GROUP:
return isSetGroup();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof chown_args)
return this.equals((chown_args)that);
return false;
}
public boolean equals(chown_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_owner = true && this.isSetOwner();
boolean that_present_owner = true && that.isSetOwner();
if (this_present_owner || that_present_owner) {
if (!(this_present_owner && that_present_owner))
return false;
if (!this.owner.equals(that.owner))
return false;
}
boolean this_present_group = true && this.isSetGroup();
boolean that_present_group = true && that.isSetGroup();
if (this_present_group || that_present_group) {
if (!(this_present_group && that_present_group))
return false;
if (!this.group.equals(that.group))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(chown_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
chown_args typedOther = (chown_args)other;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOwner()).compareTo(typedOther.isSetOwner());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOwner()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.owner, typedOther.owner);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetGroup()).compareTo(typedOther.isSetGroup());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroup()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group, typedOther.group);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.path = new Pathname();
this.path.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // OWNER
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.owner = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // GROUP
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.group = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
this.path.write(oprot);
oprot.writeFieldEnd();
}
if (this.owner != null) {
oprot.writeFieldBegin(OWNER_FIELD_DESC);
oprot.writeString(this.owner);
oprot.writeFieldEnd();
}
if (this.group != null) {
oprot.writeFieldBegin(GROUP_FIELD_DESC);
oprot.writeString(this.group);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("chown_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("owner:");
if (this.owner == null) {
sb.append("null");
} else {
sb.append(this.owner);
}
first = false;
if (!first) sb.append(", ");
sb.append("group:");
if (this.group == null) {
sb.append("null");
} else {
sb.append(this.group);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class chown_result implements org.apache.thrift.TBase<chown_result, chown_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("chown_result");
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public ThriftIOException ouch; // 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 {
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(chown_result.class, metaDataMap);
}
public chown_result() {
}
public chown_result(
ThriftIOException ouch)
{
this();
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public chown_result(chown_result other) {
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public chown_result deepCopy() {
return new chown_result(this);
}
@Override
public void clear() {
this.ouch = null;
}
public ThriftIOException getOuch() {
return this.ouch;
}
public chown_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof chown_result)
return this.equals((chown_result)that);
return false;
}
public boolean equals(chown_result that) {
if (that == null)
return false;
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(chown_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
chown_result typedOther = (chown_result)other;
lastComparison = Boolean.valueOf(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("chown_result(");
boolean first = true;
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class setReplication_args implements org.apache.thrift.TBase<setReplication_args, setReplication_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setReplication_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField REPLICATION_FIELD_DESC = new org.apache.thrift.protocol.TField("replication", org.apache.thrift.protocol.TType.I16, (short)2);
public Pathname path; // required
public short replication; // 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 {
PATH((short)1, "path"),
REPLICATION((short)2, "replication");
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: // PATH
return PATH;
case 2: // REPLICATION
return REPLICATION;
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 __REPLICATION_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
tmpMap.put(_Fields.REPLICATION, new org.apache.thrift.meta_data.FieldMetaData("replication", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setReplication_args.class, metaDataMap);
}
public setReplication_args() {
}
public setReplication_args(
Pathname path,
short replication)
{
this();
this.path = path;
this.replication = replication;
setReplicationIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public setReplication_args(setReplication_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetPath()) {
this.path = new Pathname(other.path);
}
this.replication = other.replication;
}
public setReplication_args deepCopy() {
return new setReplication_args(this);
}
@Override
public void clear() {
this.path = null;
setReplicationIsSet(false);
this.replication = 0;
}
public Pathname getPath() {
return this.path;
}
public setReplication_args setPath(Pathname path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public short getReplication() {
return this.replication;
}
public setReplication_args setReplication(short replication) {
this.replication = replication;
setReplicationIsSet(true);
return this;
}
public void unsetReplication() {
__isset_bit_vector.clear(__REPLICATION_ISSET_ID);
}
/** Returns true if field replication is set (has been assigned a value) and false otherwise */
public boolean isSetReplication() {
return __isset_bit_vector.get(__REPLICATION_ISSET_ID);
}
public void setReplicationIsSet(boolean value) {
__isset_bit_vector.set(__REPLICATION_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((Pathname)value);
}
break;
case REPLICATION:
if (value == null) {
unsetReplication();
} else {
setReplication((Short)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case REPLICATION:
return Short.valueOf(getReplication());
}
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 PATH:
return isSetPath();
case REPLICATION:
return isSetReplication();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof setReplication_args)
return this.equals((setReplication_args)that);
return false;
}
public boolean equals(setReplication_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_replication = true;
boolean that_present_replication = true;
if (this_present_replication || that_present_replication) {
if (!(this_present_replication && that_present_replication))
return false;
if (this.replication != that.replication)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(setReplication_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
setReplication_args typedOther = (setReplication_args)other;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetReplication()).compareTo(typedOther.isSetReplication());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReplication()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replication, typedOther.replication);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.path = new Pathname();
this.path.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // REPLICATION
if (field.type == org.apache.thrift.protocol.TType.I16) {
this.replication = iprot.readI16();
setReplicationIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
this.path.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(REPLICATION_FIELD_DESC);
oprot.writeI16(this.replication);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("setReplication_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("replication:");
sb.append(this.replication);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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);
}
}
}
public static class setReplication_result implements org.apache.thrift.TBase<setReplication_result, setReplication_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setReplication_result");
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public ThriftIOException ouch; // 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 {
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(setReplication_result.class, metaDataMap);
}
public setReplication_result() {
}
public setReplication_result(
ThriftIOException ouch)
{
this();
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public setReplication_result(setReplication_result other) {
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public setReplication_result deepCopy() {
return new setReplication_result(this);
}
@Override
public void clear() {
this.ouch = null;
}
public ThriftIOException getOuch() {
return this.ouch;
}
public setReplication_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof setReplication_result)
return this.equals((setReplication_result)that);
return false;
}
public boolean equals(setReplication_result that) {
if (that == null)
return false;
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(setReplication_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
setReplication_result typedOther = (setReplication_result)other;
lastComparison = Boolean.valueOf(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("setReplication_result(");
boolean first = true;
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class getFileBlockLocations_args implements org.apache.thrift.TBase<getFileBlockLocations_args, getFileBlockLocations_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFileBlockLocations_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField START_FIELD_DESC = new org.apache.thrift.protocol.TField("start", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField LENGTH_FIELD_DESC = new org.apache.thrift.protocol.TField("length", org.apache.thrift.protocol.TType.I64, (short)3);
public Pathname path; // required
public long start; // required
public long length; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
PATH((short)1, "path"),
START((short)2, "start"),
LENGTH((short)3, "length");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PATH
return PATH;
case 2: // START
return START;
case 3: // LENGTH
return LENGTH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __START_ISSET_ID = 0;
private static final int __LENGTH_ISSET_ID = 1;
private BitSet __isset_bit_vector = new BitSet(2);
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.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
tmpMap.put(_Fields.START, new org.apache.thrift.meta_data.FieldMetaData("start", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.LENGTH, new org.apache.thrift.meta_data.FieldMetaData("length", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileBlockLocations_args.class, metaDataMap);
}
public getFileBlockLocations_args() {
}
public getFileBlockLocations_args(
Pathname path,
long start,
long length)
{
this();
this.path = path;
this.start = start;
setStartIsSet(true);
this.length = length;
setLengthIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getFileBlockLocations_args(getFileBlockLocations_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetPath()) {
this.path = new Pathname(other.path);
}
this.start = other.start;
this.length = other.length;
}
public getFileBlockLocations_args deepCopy() {
return new getFileBlockLocations_args(this);
}
@Override
public void clear() {
this.path = null;
setStartIsSet(false);
this.start = 0;
setLengthIsSet(false);
this.length = 0;
}
public Pathname getPath() {
return this.path;
}
public getFileBlockLocations_args setPath(Pathname path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public long getStart() {
return this.start;
}
public getFileBlockLocations_args setStart(long start) {
this.start = start;
setStartIsSet(true);
return this;
}
public void unsetStart() {
__isset_bit_vector.clear(__START_ISSET_ID);
}
/** Returns true if field start is set (has been assigned a value) and false otherwise */
public boolean isSetStart() {
return __isset_bit_vector.get(__START_ISSET_ID);
}
public void setStartIsSet(boolean value) {
__isset_bit_vector.set(__START_ISSET_ID, value);
}
public long getLength() {
return this.length;
}
public getFileBlockLocations_args setLength(long length) {
this.length = length;
setLengthIsSet(true);
return this;
}
public void unsetLength() {
__isset_bit_vector.clear(__LENGTH_ISSET_ID);
}
/** Returns true if field length is set (has been assigned a value) and false otherwise */
public boolean isSetLength() {
return __isset_bit_vector.get(__LENGTH_ISSET_ID);
}
public void setLengthIsSet(boolean value) {
__isset_bit_vector.set(__LENGTH_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((Pathname)value);
}
break;
case START:
if (value == null) {
unsetStart();
} else {
setStart((Long)value);
}
break;
case LENGTH:
if (value == null) {
unsetLength();
} else {
setLength((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case START:
return Long.valueOf(getStart());
case LENGTH:
return Long.valueOf(getLength());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PATH:
return isSetPath();
case START:
return isSetStart();
case LENGTH:
return isSetLength();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getFileBlockLocations_args)
return this.equals((getFileBlockLocations_args)that);
return false;
}
public boolean equals(getFileBlockLocations_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_start = true;
boolean that_present_start = true;
if (this_present_start || that_present_start) {
if (!(this_present_start && that_present_start))
return false;
if (this.start != that.start)
return false;
}
boolean this_present_length = true;
boolean that_present_length = true;
if (this_present_length || that_present_length) {
if (!(this_present_length && that_present_length))
return false;
if (this.length != that.length)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getFileBlockLocations_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getFileBlockLocations_args typedOther = (getFileBlockLocations_args)other;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStart()).compareTo(typedOther.isSetStart());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStart()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.start, typedOther.start);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetLength()).compareTo(typedOther.isSetLength());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLength()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.length, typedOther.length);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.path = new Pathname();
this.path.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // START
if (field.type == org.apache.thrift.protocol.TType.I64) {
this.start = iprot.readI64();
setStartIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // LENGTH
if (field.type == org.apache.thrift.protocol.TType.I64) {
this.length = iprot.readI64();
setLengthIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
this.path.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(START_FIELD_DESC);
oprot.writeI64(this.start);
oprot.writeFieldEnd();
oprot.writeFieldBegin(LENGTH_FIELD_DESC);
oprot.writeI64(this.length);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getFileBlockLocations_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("start:");
sb.append(this.start);
first = false;
if (!first) sb.append(", ");
sb.append("length:");
sb.append(this.length);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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);
}
}
}
public static class getFileBlockLocations_result implements org.apache.thrift.TBase<getFileBlockLocations_result, getFileBlockLocations_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFileBlockLocations_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public List<BlockLocation> success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BlockLocation.class))));
tmpMap.put(_Fields.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(getFileBlockLocations_result.class, metaDataMap);
}
public getFileBlockLocations_result() {
}
public getFileBlockLocations_result(
List<BlockLocation> success,
ThriftIOException ouch)
{
this();
this.success = success;
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getFileBlockLocations_result(getFileBlockLocations_result other) {
if (other.isSetSuccess()) {
List<BlockLocation> __this__success = new ArrayList<BlockLocation>();
for (BlockLocation other_element : other.success) {
__this__success.add(new BlockLocation(other_element));
}
this.success = __this__success;
}
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public getFileBlockLocations_result deepCopy() {
return new getFileBlockLocations_result(this);
}
@Override
public void clear() {
this.success = null;
this.ouch = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<BlockLocation> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(BlockLocation elem) {
if (this.success == null) {
this.success = new ArrayList<BlockLocation>();
}
this.success.add(elem);
}
public List<BlockLocation> getSuccess() {
return this.success;
}
public getFileBlockLocations_result setSuccess(List<BlockLocation> 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 ThriftIOException getOuch() {
return this.ouch;
}
public getFileBlockLocations_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((List<BlockLocation>)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getFileBlockLocations_result)
return this.equals((getFileBlockLocations_result)that);
return false;
}
public boolean equals(getFileBlockLocations_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getFileBlockLocations_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getFileBlockLocations_result typedOther = (getFileBlockLocations_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
this.success = new ArrayList<BlockLocation>(_list16.size);
for (int _i17 = 0; _i17 < _list16.size; ++_i17)
{
BlockLocation _elem18; // required
_elem18 = new BlockLocation();
_elem18.read(iprot);
this.success.add(_elem18);
}
iprot.readListEnd();
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
for (BlockLocation _iter19 : this.success)
{
_iter19.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getFileBlockLocations_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class hardLink_args implements org.apache.thrift.TBase<hardLink_args, hardLink_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("hardLink_args");
private static final org.apache.thrift.protocol.TField SRC_FIELD_DESC = new org.apache.thrift.protocol.TField("src", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField DEST_FIELD_DESC = new org.apache.thrift.protocol.TField("dest", org.apache.thrift.protocol.TType.STRUCT, (short)2);
public Pathname src; // required
public Pathname dest; // 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 {
SRC((short)1, "src"),
DEST((short)2, "dest");
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: // SRC
return SRC;
case 2: // DEST
return DEST;
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.SRC, new org.apache.thrift.meta_data.FieldMetaData("src", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
tmpMap.put(_Fields.DEST, new org.apache.thrift.meta_data.FieldMetaData("dest", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(hardLink_args.class, metaDataMap);
}
public hardLink_args() {
}
public hardLink_args(
Pathname src,
Pathname dest)
{
this();
this.src = src;
this.dest = dest;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public hardLink_args(hardLink_args other) {
if (other.isSetSrc()) {
this.src = new Pathname(other.src);
}
if (other.isSetDest()) {
this.dest = new Pathname(other.dest);
}
}
public hardLink_args deepCopy() {
return new hardLink_args(this);
}
@Override
public void clear() {
this.src = null;
this.dest = null;
}
public Pathname getSrc() {
return this.src;
}
public hardLink_args setSrc(Pathname src) {
this.src = src;
return this;
}
public void unsetSrc() {
this.src = null;
}
/** Returns true if field src is set (has been assigned a value) and false otherwise */
public boolean isSetSrc() {
return this.src != null;
}
public void setSrcIsSet(boolean value) {
if (!value) {
this.src = null;
}
}
public Pathname getDest() {
return this.dest;
}
public hardLink_args setDest(Pathname dest) {
this.dest = dest;
return this;
}
public void unsetDest() {
this.dest = null;
}
/** Returns true if field dest is set (has been assigned a value) and false otherwise */
public boolean isSetDest() {
return this.dest != null;
}
public void setDestIsSet(boolean value) {
if (!value) {
this.dest = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SRC:
if (value == null) {
unsetSrc();
} else {
setSrc((Pathname)value);
}
break;
case DEST:
if (value == null) {
unsetDest();
} else {
setDest((Pathname)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SRC:
return getSrc();
case DEST:
return getDest();
}
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 SRC:
return isSetSrc();
case DEST:
return isSetDest();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof hardLink_args)
return this.equals((hardLink_args)that);
return false;
}
public boolean equals(hardLink_args that) {
if (that == null)
return false;
boolean this_present_src = true && this.isSetSrc();
boolean that_present_src = true && that.isSetSrc();
if (this_present_src || that_present_src) {
if (!(this_present_src && that_present_src))
return false;
if (!this.src.equals(that.src))
return false;
}
boolean this_present_dest = true && this.isSetDest();
boolean that_present_dest = true && that.isSetDest();
if (this_present_dest || that_present_dest) {
if (!(this_present_dest && that_present_dest))
return false;
if (!this.dest.equals(that.dest))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(hardLink_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
hardLink_args typedOther = (hardLink_args)other;
lastComparison = Boolean.valueOf(isSetSrc()).compareTo(typedOther.isSetSrc());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSrc()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.src, typedOther.src);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetDest()).compareTo(typedOther.isSetDest());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDest()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest, typedOther.dest);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // SRC
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.src = new Pathname();
this.src.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // DEST
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.dest = new Pathname();
this.dest.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.src != null) {
oprot.writeFieldBegin(SRC_FIELD_DESC);
this.src.write(oprot);
oprot.writeFieldEnd();
}
if (this.dest != null) {
oprot.writeFieldBegin(DEST_FIELD_DESC);
this.dest.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("hardLink_args(");
boolean first = true;
sb.append("src:");
if (this.src == null) {
sb.append("null");
} else {
sb.append(this.src);
}
first = false;
if (!first) sb.append(", ");
sb.append("dest:");
if (this.dest == null) {
sb.append("null");
} else {
sb.append(this.dest);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class hardLink_result implements org.apache.thrift.TBase<hardLink_result, hardLink_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("hardLink_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 OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public boolean success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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 BitSet __isset_bit_vector = new BitSet(1);
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.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(hardLink_result.class, metaDataMap);
}
public hardLink_result() {
}
public hardLink_result(
boolean success,
ThriftIOException ouch)
{
this();
this.success = success;
setSuccessIsSet(true);
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public hardLink_result(hardLink_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public hardLink_result deepCopy() {
return new hardLink_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.ouch = null;
}
public boolean isSuccess() {
return this.success;
}
public hardLink_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public ThriftIOException getOuch() {
return this.ouch;
}
public hardLink_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Boolean.valueOf(isSuccess());
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof hardLink_result)
return this.equals((hardLink_result)that);
return false;
}
public boolean equals(hardLink_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_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(hardLink_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
hardLink_result typedOther = (hardLink_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
this.success = iprot.readBool();
setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(this.success);
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("hardLink_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class concat_args implements org.apache.thrift.TBase<concat_args, concat_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("concat_args");
private static final org.apache.thrift.protocol.TField TARGET_FIELD_DESC = new org.apache.thrift.protocol.TField("target", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField SRCS_FIELD_DESC = new org.apache.thrift.protocol.TField("srcs", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField RESTRICTED_FIELD_DESC = new org.apache.thrift.protocol.TField("restricted", org.apache.thrift.protocol.TType.BOOL, (short)3);
public Pathname target; // required
public List<Pathname> srcs; // required
public boolean restricted; // 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 {
TARGET((short)1, "target"),
SRCS((short)2, "srcs"),
RESTRICTED((short)3, "restricted");
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: // TARGET
return TARGET;
case 2: // SRCS
return SRCS;
case 3: // RESTRICTED
return RESTRICTED;
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 __RESTRICTED_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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.TARGET, new org.apache.thrift.meta_data.FieldMetaData("target", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
tmpMap.put(_Fields.SRCS, new org.apache.thrift.meta_data.FieldMetaData("srcs", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class))));
tmpMap.put(_Fields.RESTRICTED, new org.apache.thrift.meta_data.FieldMetaData("restricted", 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(concat_args.class, metaDataMap);
}
public concat_args() {
}
public concat_args(
Pathname target,
List<Pathname> srcs,
boolean restricted)
{
this();
this.target = target;
this.srcs = srcs;
this.restricted = restricted;
setRestrictedIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public concat_args(concat_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetTarget()) {
this.target = new Pathname(other.target);
}
if (other.isSetSrcs()) {
List<Pathname> __this__srcs = new ArrayList<Pathname>();
for (Pathname other_element : other.srcs) {
__this__srcs.add(new Pathname(other_element));
}
this.srcs = __this__srcs;
}
this.restricted = other.restricted;
}
public concat_args deepCopy() {
return new concat_args(this);
}
@Override
public void clear() {
this.target = null;
this.srcs = null;
setRestrictedIsSet(false);
this.restricted = false;
}
public Pathname getTarget() {
return this.target;
}
public concat_args setTarget(Pathname target) {
this.target = target;
return this;
}
public void unsetTarget() {
this.target = null;
}
/** Returns true if field target is set (has been assigned a value) and false otherwise */
public boolean isSetTarget() {
return this.target != null;
}
public void setTargetIsSet(boolean value) {
if (!value) {
this.target = null;
}
}
public int getSrcsSize() {
return (this.srcs == null) ? 0 : this.srcs.size();
}
public java.util.Iterator<Pathname> getSrcsIterator() {
return (this.srcs == null) ? null : this.srcs.iterator();
}
public void addToSrcs(Pathname elem) {
if (this.srcs == null) {
this.srcs = new ArrayList<Pathname>();
}
this.srcs.add(elem);
}
public List<Pathname> getSrcs() {
return this.srcs;
}
public concat_args setSrcs(List<Pathname> srcs) {
this.srcs = srcs;
return this;
}
public void unsetSrcs() {
this.srcs = null;
}
/** Returns true if field srcs is set (has been assigned a value) and false otherwise */
public boolean isSetSrcs() {
return this.srcs != null;
}
public void setSrcsIsSet(boolean value) {
if (!value) {
this.srcs = null;
}
}
public boolean isRestricted() {
return this.restricted;
}
public concat_args setRestricted(boolean restricted) {
this.restricted = restricted;
setRestrictedIsSet(true);
return this;
}
public void unsetRestricted() {
__isset_bit_vector.clear(__RESTRICTED_ISSET_ID);
}
/** Returns true if field restricted is set (has been assigned a value) and false otherwise */
public boolean isSetRestricted() {
return __isset_bit_vector.get(__RESTRICTED_ISSET_ID);
}
public void setRestrictedIsSet(boolean value) {
__isset_bit_vector.set(__RESTRICTED_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TARGET:
if (value == null) {
unsetTarget();
} else {
setTarget((Pathname)value);
}
break;
case SRCS:
if (value == null) {
unsetSrcs();
} else {
setSrcs((List<Pathname>)value);
}
break;
case RESTRICTED:
if (value == null) {
unsetRestricted();
} else {
setRestricted((Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TARGET:
return getTarget();
case SRCS:
return getSrcs();
case RESTRICTED:
return Boolean.valueOf(isRestricted());
}
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 TARGET:
return isSetTarget();
case SRCS:
return isSetSrcs();
case RESTRICTED:
return isSetRestricted();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof concat_args)
return this.equals((concat_args)that);
return false;
}
public boolean equals(concat_args that) {
if (that == null)
return false;
boolean this_present_target = true && this.isSetTarget();
boolean that_present_target = true && that.isSetTarget();
if (this_present_target || that_present_target) {
if (!(this_present_target && that_present_target))
return false;
if (!this.target.equals(that.target))
return false;
}
boolean this_present_srcs = true && this.isSetSrcs();
boolean that_present_srcs = true && that.isSetSrcs();
if (this_present_srcs || that_present_srcs) {
if (!(this_present_srcs && that_present_srcs))
return false;
if (!this.srcs.equals(that.srcs))
return false;
}
boolean this_present_restricted = true;
boolean that_present_restricted = true;
if (this_present_restricted || that_present_restricted) {
if (!(this_present_restricted && that_present_restricted))
return false;
if (this.restricted != that.restricted)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(concat_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
concat_args typedOther = (concat_args)other;
lastComparison = Boolean.valueOf(isSetTarget()).compareTo(typedOther.isSetTarget());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTarget()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.target, typedOther.target);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSrcs()).compareTo(typedOther.isSetSrcs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSrcs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.srcs, typedOther.srcs);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRestricted()).compareTo(typedOther.isSetRestricted());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRestricted()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.restricted, typedOther.restricted);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // TARGET
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.target = new Pathname();
this.target.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // SRCS
if (field.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
this.srcs = new ArrayList<Pathname>(_list20.size);
for (int _i21 = 0; _i21 < _list20.size; ++_i21)
{
Pathname _elem22; // required
_elem22 = new Pathname();
_elem22.read(iprot);
this.srcs.add(_elem22);
}
iprot.readListEnd();
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // RESTRICTED
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
this.restricted = iprot.readBool();
setRestrictedIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.target != null) {
oprot.writeFieldBegin(TARGET_FIELD_DESC);
this.target.write(oprot);
oprot.writeFieldEnd();
}
if (this.srcs != null) {
oprot.writeFieldBegin(SRCS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.srcs.size()));
for (Pathname _iter23 : this.srcs)
{
_iter23.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(RESTRICTED_FIELD_DESC);
oprot.writeBool(this.restricted);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("concat_args(");
boolean first = true;
sb.append("target:");
if (this.target == null) {
sb.append("null");
} else {
sb.append(this.target);
}
first = false;
if (!first) sb.append(", ");
sb.append("srcs:");
if (this.srcs == null) {
sb.append("null");
} else {
sb.append(this.srcs);
}
first = false;
if (!first) sb.append(", ");
sb.append("restricted:");
sb.append(this.restricted);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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);
}
}
}
public static class concat_result implements org.apache.thrift.TBase<concat_result, concat_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("concat_result");
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public ThriftIOException ouch; // 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 {
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(concat_result.class, metaDataMap);
}
public concat_result() {
}
public concat_result(
ThriftIOException ouch)
{
this();
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public concat_result(concat_result other) {
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public concat_result deepCopy() {
return new concat_result(this);
}
@Override
public void clear() {
this.ouch = null;
}
public ThriftIOException getOuch() {
return this.ouch;
}
public concat_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof concat_result)
return this.equals((concat_result)that);
return false;
}
public boolean equals(concat_result that) {
if (that == null)
return false;
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(concat_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
concat_result typedOther = (concat_result)other;
lastComparison = Boolean.valueOf(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("concat_result(");
boolean first = true;
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class reportBadBlocks_args implements org.apache.thrift.TBase<reportBadBlocks_args, reportBadBlocks_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("reportBadBlocks_args");
private static final org.apache.thrift.protocol.TField BLOCKS_FIELD_DESC = new org.apache.thrift.protocol.TField("blocks", org.apache.thrift.protocol.TType.LIST, (short)1);
public List<TLocatedBlock> blocks; // 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 {
BLOCKS((short)1, "blocks");
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: // BLOCKS
return BLOCKS;
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.BLOCKS, new org.apache.thrift.meta_data.FieldMetaData("blocks", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TLocatedBlock.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(reportBadBlocks_args.class, metaDataMap);
}
public reportBadBlocks_args() {
}
public reportBadBlocks_args(
List<TLocatedBlock> blocks)
{
this();
this.blocks = blocks;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public reportBadBlocks_args(reportBadBlocks_args other) {
if (other.isSetBlocks()) {
List<TLocatedBlock> __this__blocks = new ArrayList<TLocatedBlock>();
for (TLocatedBlock other_element : other.blocks) {
__this__blocks.add(new TLocatedBlock(other_element));
}
this.blocks = __this__blocks;
}
}
public reportBadBlocks_args deepCopy() {
return new reportBadBlocks_args(this);
}
@Override
public void clear() {
this.blocks = null;
}
public int getBlocksSize() {
return (this.blocks == null) ? 0 : this.blocks.size();
}
public java.util.Iterator<TLocatedBlock> getBlocksIterator() {
return (this.blocks == null) ? null : this.blocks.iterator();
}
public void addToBlocks(TLocatedBlock elem) {
if (this.blocks == null) {
this.blocks = new ArrayList<TLocatedBlock>();
}
this.blocks.add(elem);
}
public List<TLocatedBlock> getBlocks() {
return this.blocks;
}
public reportBadBlocks_args setBlocks(List<TLocatedBlock> blocks) {
this.blocks = blocks;
return this;
}
public void unsetBlocks() {
this.blocks = null;
}
/** Returns true if field blocks is set (has been assigned a value) and false otherwise */
public boolean isSetBlocks() {
return this.blocks != null;
}
public void setBlocksIsSet(boolean value) {
if (!value) {
this.blocks = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case BLOCKS:
if (value == null) {
unsetBlocks();
} else {
setBlocks((List<TLocatedBlock>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case BLOCKS:
return getBlocks();
}
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 BLOCKS:
return isSetBlocks();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof reportBadBlocks_args)
return this.equals((reportBadBlocks_args)that);
return false;
}
public boolean equals(reportBadBlocks_args that) {
if (that == null)
return false;
boolean this_present_blocks = true && this.isSetBlocks();
boolean that_present_blocks = true && that.isSetBlocks();
if (this_present_blocks || that_present_blocks) {
if (!(this_present_blocks && that_present_blocks))
return false;
if (!this.blocks.equals(that.blocks))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(reportBadBlocks_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
reportBadBlocks_args typedOther = (reportBadBlocks_args)other;
lastComparison = Boolean.valueOf(isSetBlocks()).compareTo(typedOther.isSetBlocks());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBlocks()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blocks, typedOther.blocks);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // BLOCKS
if (field.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
this.blocks = new ArrayList<TLocatedBlock>(_list24.size);
for (int _i25 = 0; _i25 < _list24.size; ++_i25)
{
TLocatedBlock _elem26; // required
_elem26 = new TLocatedBlock();
_elem26.read(iprot);
this.blocks.add(_elem26);
}
iprot.readListEnd();
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.blocks != null) {
oprot.writeFieldBegin(BLOCKS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.blocks.size()));
for (TLocatedBlock _iter27 : this.blocks)
{
_iter27.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("reportBadBlocks_args(");
boolean first = true;
sb.append("blocks:");
if (this.blocks == null) {
sb.append("null");
} else {
sb.append(this.blocks);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class reportBadBlocks_result implements org.apache.thrift.TBase<reportBadBlocks_result, reportBadBlocks_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("reportBadBlocks_result");
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public ThriftIOException ouch; // 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 {
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(reportBadBlocks_result.class, metaDataMap);
}
public reportBadBlocks_result() {
}
public reportBadBlocks_result(
ThriftIOException ouch)
{
this();
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public reportBadBlocks_result(reportBadBlocks_result other) {
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public reportBadBlocks_result deepCopy() {
return new reportBadBlocks_result(this);
}
@Override
public void clear() {
this.ouch = null;
}
public ThriftIOException getOuch() {
return this.ouch;
}
public reportBadBlocks_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof reportBadBlocks_result)
return this.equals((reportBadBlocks_result)that);
return false;
}
public boolean equals(reportBadBlocks_result that) {
if (that == null)
return false;
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(reportBadBlocks_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
reportBadBlocks_result typedOther = (reportBadBlocks_result)other;
lastComparison = Boolean.valueOf(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("reportBadBlocks_result(");
boolean first = true;
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class getDataTransferProtocolVersion_args implements org.apache.thrift.TBase<getDataTransferProtocolVersion_args, getDataTransferProtocolVersion_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getDataTransferProtocolVersion_args");
/** 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(getDataTransferProtocolVersion_args.class, metaDataMap);
}
public getDataTransferProtocolVersion_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getDataTransferProtocolVersion_args(getDataTransferProtocolVersion_args other) {
}
public getDataTransferProtocolVersion_args deepCopy() {
return new getDataTransferProtocolVersion_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 getDataTransferProtocolVersion_args)
return this.equals((getDataTransferProtocolVersion_args)that);
return false;
}
public boolean equals(getDataTransferProtocolVersion_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getDataTransferProtocolVersion_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getDataTransferProtocolVersion_args typedOther = (getDataTransferProtocolVersion_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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getDataTransferProtocolVersion_args(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class getDataTransferProtocolVersion_result implements org.apache.thrift.TBase<getDataTransferProtocolVersion_result, getDataTransferProtocolVersion_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getDataTransferProtocolVersion_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public int success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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 BitSet __isset_bit_vector = new BitSet(1);
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.I32)));
tmpMap.put(_Fields.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(getDataTransferProtocolVersion_result.class, metaDataMap);
}
public getDataTransferProtocolVersion_result() {
}
public getDataTransferProtocolVersion_result(
int success,
ThriftIOException ouch)
{
this();
this.success = success;
setSuccessIsSet(true);
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getDataTransferProtocolVersion_result(getDataTransferProtocolVersion_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public getDataTransferProtocolVersion_result deepCopy() {
return new getDataTransferProtocolVersion_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = 0;
this.ouch = null;
}
public int getSuccess() {
return this.success;
}
public getDataTransferProtocolVersion_result setSuccess(int success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public ThriftIOException getOuch() {
return this.ouch;
}
public getDataTransferProtocolVersion_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Integer)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Integer.valueOf(getSuccess());
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getDataTransferProtocolVersion_result)
return this.equals((getDataTransferProtocolVersion_result)that);
return false;
}
public boolean equals(getDataTransferProtocolVersion_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_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getDataTransferProtocolVersion_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getDataTransferProtocolVersion_result typedOther = (getDataTransferProtocolVersion_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.I32) {
this.success = iprot.readI32();
setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeI32(this.success);
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getDataTransferProtocolVersion_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class renewLease_args implements org.apache.thrift.TBase<renewLease_args, renewLease_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("renewLease_args");
private static final org.apache.thrift.protocol.TField CLIENT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("clientName", org.apache.thrift.protocol.TType.STRING, (short)1);
public String clientName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
CLIENT_NAME((short)1, "clientName");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // CLIENT_NAME
return CLIENT_NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CLIENT_NAME, new org.apache.thrift.meta_data.FieldMetaData("clientName", 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(renewLease_args.class, metaDataMap);
}
public renewLease_args() {
}
public renewLease_args(
String clientName)
{
this();
this.clientName = clientName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public renewLease_args(renewLease_args other) {
if (other.isSetClientName()) {
this.clientName = other.clientName;
}
}
public renewLease_args deepCopy() {
return new renewLease_args(this);
}
@Override
public void clear() {
this.clientName = null;
}
public String getClientName() {
return this.clientName;
}
public renewLease_args setClientName(String clientName) {
this.clientName = clientName;
return this;
}
public void unsetClientName() {
this.clientName = null;
}
/** Returns true if field clientName is set (has been assigned a value) and false otherwise */
public boolean isSetClientName() {
return this.clientName != null;
}
public void setClientNameIsSet(boolean value) {
if (!value) {
this.clientName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case CLIENT_NAME:
if (value == null) {
unsetClientName();
} else {
setClientName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case CLIENT_NAME:
return getClientName();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case CLIENT_NAME:
return isSetClientName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof renewLease_args)
return this.equals((renewLease_args)that);
return false;
}
public boolean equals(renewLease_args that) {
if (that == null)
return false;
boolean this_present_clientName = true && this.isSetClientName();
boolean that_present_clientName = true && that.isSetClientName();
if (this_present_clientName || that_present_clientName) {
if (!(this_present_clientName && that_present_clientName))
return false;
if (!this.clientName.equals(that.clientName))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(renewLease_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
renewLease_args typedOther = (renewLease_args)other;
lastComparison = Boolean.valueOf(isSetClientName()).compareTo(typedOther.isSetClientName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetClientName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientName, typedOther.clientName);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // CLIENT_NAME
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.clientName = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.clientName != null) {
oprot.writeFieldBegin(CLIENT_NAME_FIELD_DESC);
oprot.writeString(this.clientName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("renewLease_args(");
boolean first = true;
sb.append("clientName:");
if (this.clientName == null) {
sb.append("null");
} else {
sb.append(this.clientName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class renewLease_result implements org.apache.thrift.TBase<renewLease_result, renewLease_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("renewLease_result");
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public ThriftIOException ouch; // 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 {
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(renewLease_result.class, metaDataMap);
}
public renewLease_result() {
}
public renewLease_result(
ThriftIOException ouch)
{
this();
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public renewLease_result(renewLease_result other) {
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public renewLease_result deepCopy() {
return new renewLease_result(this);
}
@Override
public void clear() {
this.ouch = null;
}
public ThriftIOException getOuch() {
return this.ouch;
}
public renewLease_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof renewLease_result)
return this.equals((renewLease_result)that);
return false;
}
public boolean equals(renewLease_result that) {
if (that == null)
return false;
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(renewLease_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
renewLease_result typedOther = (renewLease_result)other;
lastComparison = Boolean.valueOf(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("renewLease_result(");
boolean first = true;
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class recoverLease_args implements org.apache.thrift.TBase<recoverLease_args, recoverLease_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("recoverLease_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField CLIENT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("clientName", org.apache.thrift.protocol.TType.STRING, (short)2);
public Pathname path; // required
public String clientName; // 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 {
PATH((short)1, "path"),
CLIENT_NAME((short)2, "clientName");
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: // PATH
return PATH;
case 2: // CLIENT_NAME
return CLIENT_NAME;
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.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
tmpMap.put(_Fields.CLIENT_NAME, new org.apache.thrift.meta_data.FieldMetaData("clientName", 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(recoverLease_args.class, metaDataMap);
}
public recoverLease_args() {
}
public recoverLease_args(
Pathname path,
String clientName)
{
this();
this.path = path;
this.clientName = clientName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public recoverLease_args(recoverLease_args other) {
if (other.isSetPath()) {
this.path = new Pathname(other.path);
}
if (other.isSetClientName()) {
this.clientName = other.clientName;
}
}
public recoverLease_args deepCopy() {
return new recoverLease_args(this);
}
@Override
public void clear() {
this.path = null;
this.clientName = null;
}
public Pathname getPath() {
return this.path;
}
public recoverLease_args setPath(Pathname path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public String getClientName() {
return this.clientName;
}
public recoverLease_args setClientName(String clientName) {
this.clientName = clientName;
return this;
}
public void unsetClientName() {
this.clientName = null;
}
/** Returns true if field clientName is set (has been assigned a value) and false otherwise */
public boolean isSetClientName() {
return this.clientName != null;
}
public void setClientNameIsSet(boolean value) {
if (!value) {
this.clientName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((Pathname)value);
}
break;
case CLIENT_NAME:
if (value == null) {
unsetClientName();
} else {
setClientName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case CLIENT_NAME:
return getClientName();
}
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 PATH:
return isSetPath();
case CLIENT_NAME:
return isSetClientName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof recoverLease_args)
return this.equals((recoverLease_args)that);
return false;
}
public boolean equals(recoverLease_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_clientName = true && this.isSetClientName();
boolean that_present_clientName = true && that.isSetClientName();
if (this_present_clientName || that_present_clientName) {
if (!(this_present_clientName && that_present_clientName))
return false;
if (!this.clientName.equals(that.clientName))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(recoverLease_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
recoverLease_args typedOther = (recoverLease_args)other;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetClientName()).compareTo(typedOther.isSetClientName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetClientName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientName, typedOther.clientName);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.path = new Pathname();
this.path.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // CLIENT_NAME
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.clientName = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
this.path.write(oprot);
oprot.writeFieldEnd();
}
if (this.clientName != null) {
oprot.writeFieldBegin(CLIENT_NAME_FIELD_DESC);
oprot.writeString(this.clientName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("recoverLease_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("clientName:");
if (this.clientName == null) {
sb.append("null");
} else {
sb.append(this.clientName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class recoverLease_result implements org.apache.thrift.TBase<recoverLease_result, recoverLease_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("recoverLease_result");
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public ThriftIOException ouch; // 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 {
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(recoverLease_result.class, metaDataMap);
}
public recoverLease_result() {
}
public recoverLease_result(
ThriftIOException ouch)
{
this();
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public recoverLease_result(recoverLease_result other) {
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public recoverLease_result deepCopy() {
return new recoverLease_result(this);
}
@Override
public void clear() {
this.ouch = null;
}
public ThriftIOException getOuch() {
return this.ouch;
}
public recoverLease_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof recoverLease_result)
return this.equals((recoverLease_result)that);
return false;
}
public boolean equals(recoverLease_result that) {
if (that == null)
return false;
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(recoverLease_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
recoverLease_result typedOther = (recoverLease_result)other;
lastComparison = Boolean.valueOf(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("recoverLease_result(");
boolean first = true;
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class closeRecoverLease_args implements org.apache.thrift.TBase<closeRecoverLease_args, closeRecoverLease_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeRecoverLease_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField CLIENT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("clientName", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField DISCARD_LAST_BLOCK_FIELD_DESC = new org.apache.thrift.protocol.TField("discardLastBlock", org.apache.thrift.protocol.TType.BOOL, (short)3);
public Pathname path; // required
public String clientName; // required
public boolean discardLastBlock; // 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 {
PATH((short)1, "path"),
CLIENT_NAME((short)2, "clientName"),
DISCARD_LAST_BLOCK((short)3, "discardLastBlock");
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: // PATH
return PATH;
case 2: // CLIENT_NAME
return CLIENT_NAME;
case 3: // DISCARD_LAST_BLOCK
return DISCARD_LAST_BLOCK;
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 __DISCARDLASTBLOCK_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
tmpMap.put(_Fields.CLIENT_NAME, new org.apache.thrift.meta_data.FieldMetaData("clientName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DISCARD_LAST_BLOCK, new org.apache.thrift.meta_data.FieldMetaData("discardLastBlock", 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(closeRecoverLease_args.class, metaDataMap);
}
public closeRecoverLease_args() {
}
public closeRecoverLease_args(
Pathname path,
String clientName,
boolean discardLastBlock)
{
this();
this.path = path;
this.clientName = clientName;
this.discardLastBlock = discardLastBlock;
setDiscardLastBlockIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public closeRecoverLease_args(closeRecoverLease_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetPath()) {
this.path = new Pathname(other.path);
}
if (other.isSetClientName()) {
this.clientName = other.clientName;
}
this.discardLastBlock = other.discardLastBlock;
}
public closeRecoverLease_args deepCopy() {
return new closeRecoverLease_args(this);
}
@Override
public void clear() {
this.path = null;
this.clientName = null;
setDiscardLastBlockIsSet(false);
this.discardLastBlock = false;
}
public Pathname getPath() {
return this.path;
}
public closeRecoverLease_args setPath(Pathname path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public String getClientName() {
return this.clientName;
}
public closeRecoverLease_args setClientName(String clientName) {
this.clientName = clientName;
return this;
}
public void unsetClientName() {
this.clientName = null;
}
/** Returns true if field clientName is set (has been assigned a value) and false otherwise */
public boolean isSetClientName() {
return this.clientName != null;
}
public void setClientNameIsSet(boolean value) {
if (!value) {
this.clientName = null;
}
}
public boolean isDiscardLastBlock() {
return this.discardLastBlock;
}
public closeRecoverLease_args setDiscardLastBlock(boolean discardLastBlock) {
this.discardLastBlock = discardLastBlock;
setDiscardLastBlockIsSet(true);
return this;
}
public void unsetDiscardLastBlock() {
__isset_bit_vector.clear(__DISCARDLASTBLOCK_ISSET_ID);
}
/** Returns true if field discardLastBlock is set (has been assigned a value) and false otherwise */
public boolean isSetDiscardLastBlock() {
return __isset_bit_vector.get(__DISCARDLASTBLOCK_ISSET_ID);
}
public void setDiscardLastBlockIsSet(boolean value) {
__isset_bit_vector.set(__DISCARDLASTBLOCK_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((Pathname)value);
}
break;
case CLIENT_NAME:
if (value == null) {
unsetClientName();
} else {
setClientName((String)value);
}
break;
case DISCARD_LAST_BLOCK:
if (value == null) {
unsetDiscardLastBlock();
} else {
setDiscardLastBlock((Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case CLIENT_NAME:
return getClientName();
case DISCARD_LAST_BLOCK:
return Boolean.valueOf(isDiscardLastBlock());
}
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 PATH:
return isSetPath();
case CLIENT_NAME:
return isSetClientName();
case DISCARD_LAST_BLOCK:
return isSetDiscardLastBlock();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof closeRecoverLease_args)
return this.equals((closeRecoverLease_args)that);
return false;
}
public boolean equals(closeRecoverLease_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_clientName = true && this.isSetClientName();
boolean that_present_clientName = true && that.isSetClientName();
if (this_present_clientName || that_present_clientName) {
if (!(this_present_clientName && that_present_clientName))
return false;
if (!this.clientName.equals(that.clientName))
return false;
}
boolean this_present_discardLastBlock = true;
boolean that_present_discardLastBlock = true;
if (this_present_discardLastBlock || that_present_discardLastBlock) {
if (!(this_present_discardLastBlock && that_present_discardLastBlock))
return false;
if (this.discardLastBlock != that.discardLastBlock)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(closeRecoverLease_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
closeRecoverLease_args typedOther = (closeRecoverLease_args)other;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetClientName()).compareTo(typedOther.isSetClientName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetClientName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientName, typedOther.clientName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetDiscardLastBlock()).compareTo(typedOther.isSetDiscardLastBlock());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDiscardLastBlock()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.discardLastBlock, typedOther.discardLastBlock);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.path = new Pathname();
this.path.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // CLIENT_NAME
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.clientName = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // DISCARD_LAST_BLOCK
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
this.discardLastBlock = iprot.readBool();
setDiscardLastBlockIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
this.path.write(oprot);
oprot.writeFieldEnd();
}
if (this.clientName != null) {
oprot.writeFieldBegin(CLIENT_NAME_FIELD_DESC);
oprot.writeString(this.clientName);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(DISCARD_LAST_BLOCK_FIELD_DESC);
oprot.writeBool(this.discardLastBlock);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("closeRecoverLease_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("clientName:");
if (this.clientName == null) {
sb.append("null");
} else {
sb.append(this.clientName);
}
first = false;
if (!first) sb.append(", ");
sb.append("discardLastBlock:");
sb.append(this.discardLastBlock);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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);
}
}
}
public static class closeRecoverLease_result implements org.apache.thrift.TBase<closeRecoverLease_result, closeRecoverLease_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeRecoverLease_result");
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public ThriftIOException ouch; // 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 {
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(closeRecoverLease_result.class, metaDataMap);
}
public closeRecoverLease_result() {
}
public closeRecoverLease_result(
ThriftIOException ouch)
{
this();
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public closeRecoverLease_result(closeRecoverLease_result other) {
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public closeRecoverLease_result deepCopy() {
return new closeRecoverLease_result(this);
}
@Override
public void clear() {
this.ouch = null;
}
public ThriftIOException getOuch() {
return this.ouch;
}
public closeRecoverLease_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof closeRecoverLease_result)
return this.equals((closeRecoverLease_result)that);
return false;
}
public boolean equals(closeRecoverLease_result that) {
if (that == null)
return false;
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(closeRecoverLease_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
closeRecoverLease_result typedOther = (closeRecoverLease_result)other;
lastComparison = Boolean.valueOf(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("closeRecoverLease_result(");
boolean first = true;
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class abandonBlock_args implements org.apache.thrift.TBase<abandonBlock_args, abandonBlock_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abandonBlock_args");
private static final org.apache.thrift.protocol.TField BLOCK_FIELD_DESC = new org.apache.thrift.protocol.TField("block", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField PATHNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pathname", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField CLIENT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("clientName", org.apache.thrift.protocol.TType.STRING, (short)3);
public TBlock block; // required
public Pathname pathname; // required
public String clientName; // 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((short)1, "block"),
PATHNAME((short)2, "pathname"),
CLIENT_NAME((short)3, "clientName");
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
return BLOCK;
case 2: // PATHNAME
return PATHNAME;
case 3: // CLIENT_NAME
return CLIENT_NAME;
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.BLOCK, new org.apache.thrift.meta_data.FieldMetaData("block", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TBlock.class)));
tmpMap.put(_Fields.PATHNAME, new org.apache.thrift.meta_data.FieldMetaData("pathname", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
tmpMap.put(_Fields.CLIENT_NAME, new org.apache.thrift.meta_data.FieldMetaData("clientName", 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(abandonBlock_args.class, metaDataMap);
}
public abandonBlock_args() {
}
public abandonBlock_args(
TBlock block,
Pathname pathname,
String clientName)
{
this();
this.block = block;
this.pathname = pathname;
this.clientName = clientName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public abandonBlock_args(abandonBlock_args other) {
if (other.isSetBlock()) {
this.block = new TBlock(other.block);
}
if (other.isSetPathname()) {
this.pathname = new Pathname(other.pathname);
}
if (other.isSetClientName()) {
this.clientName = other.clientName;
}
}
public abandonBlock_args deepCopy() {
return new abandonBlock_args(this);
}
@Override
public void clear() {
this.block = null;
this.pathname = null;
this.clientName = null;
}
public TBlock getBlock() {
return this.block;
}
public abandonBlock_args setBlock(TBlock block) {
this.block = block;
return this;
}
public void unsetBlock() {
this.block = null;
}
/** Returns true if field block is set (has been assigned a value) and false otherwise */
public boolean isSetBlock() {
return this.block != null;
}
public void setBlockIsSet(boolean value) {
if (!value) {
this.block = null;
}
}
public Pathname getPathname() {
return this.pathname;
}
public abandonBlock_args setPathname(Pathname pathname) {
this.pathname = pathname;
return this;
}
public void unsetPathname() {
this.pathname = null;
}
/** Returns true if field pathname is set (has been assigned a value) and false otherwise */
public boolean isSetPathname() {
return this.pathname != null;
}
public void setPathnameIsSet(boolean value) {
if (!value) {
this.pathname = null;
}
}
public String getClientName() {
return this.clientName;
}
public abandonBlock_args setClientName(String clientName) {
this.clientName = clientName;
return this;
}
public void unsetClientName() {
this.clientName = null;
}
/** Returns true if field clientName is set (has been assigned a value) and false otherwise */
public boolean isSetClientName() {
return this.clientName != null;
}
public void setClientNameIsSet(boolean value) {
if (!value) {
this.clientName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case BLOCK:
if (value == null) {
unsetBlock();
} else {
setBlock((TBlock)value);
}
break;
case PATHNAME:
if (value == null) {
unsetPathname();
} else {
setPathname((Pathname)value);
}
break;
case CLIENT_NAME:
if (value == null) {
unsetClientName();
} else {
setClientName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case BLOCK:
return getBlock();
case PATHNAME:
return getPathname();
case CLIENT_NAME:
return getClientName();
}
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:
return isSetBlock();
case PATHNAME:
return isSetPathname();
case CLIENT_NAME:
return isSetClientName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof abandonBlock_args)
return this.equals((abandonBlock_args)that);
return false;
}
public boolean equals(abandonBlock_args that) {
if (that == null)
return false;
boolean this_present_block = true && this.isSetBlock();
boolean that_present_block = true && that.isSetBlock();
if (this_present_block || that_present_block) {
if (!(this_present_block && that_present_block))
return false;
if (!this.block.equals(that.block))
return false;
}
boolean this_present_pathname = true && this.isSetPathname();
boolean that_present_pathname = true && that.isSetPathname();
if (this_present_pathname || that_present_pathname) {
if (!(this_present_pathname && that_present_pathname))
return false;
if (!this.pathname.equals(that.pathname))
return false;
}
boolean this_present_clientName = true && this.isSetClientName();
boolean that_present_clientName = true && that.isSetClientName();
if (this_present_clientName || that_present_clientName) {
if (!(this_present_clientName && that_present_clientName))
return false;
if (!this.clientName.equals(that.clientName))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(abandonBlock_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
abandonBlock_args typedOther = (abandonBlock_args)other;
lastComparison = Boolean.valueOf(isSetBlock()).compareTo(typedOther.isSetBlock());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBlock()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.block, typedOther.block);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPathname()).compareTo(typedOther.isSetPathname());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPathname()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pathname, typedOther.pathname);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetClientName()).compareTo(typedOther.isSetClientName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetClientName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientName, typedOther.clientName);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // BLOCK
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.block = new TBlock();
this.block.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // PATHNAME
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.pathname = new Pathname();
this.pathname.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // CLIENT_NAME
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.clientName = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.block != null) {
oprot.writeFieldBegin(BLOCK_FIELD_DESC);
this.block.write(oprot);
oprot.writeFieldEnd();
}
if (this.pathname != null) {
oprot.writeFieldBegin(PATHNAME_FIELD_DESC);
this.pathname.write(oprot);
oprot.writeFieldEnd();
}
if (this.clientName != null) {
oprot.writeFieldBegin(CLIENT_NAME_FIELD_DESC);
oprot.writeString(this.clientName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("abandonBlock_args(");
boolean first = true;
sb.append("block:");
if (this.block == null) {
sb.append("null");
} else {
sb.append(this.block);
}
first = false;
if (!first) sb.append(", ");
sb.append("pathname:");
if (this.pathname == null) {
sb.append("null");
} else {
sb.append(this.pathname);
}
first = false;
if (!first) sb.append(", ");
sb.append("clientName:");
if (this.clientName == null) {
sb.append("null");
} else {
sb.append(this.clientName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class abandonBlock_result implements org.apache.thrift.TBase<abandonBlock_result, abandonBlock_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abandonBlock_result");
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public ThriftIOException ouch; // 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 {
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(abandonBlock_result.class, metaDataMap);
}
public abandonBlock_result() {
}
public abandonBlock_result(
ThriftIOException ouch)
{
this();
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public abandonBlock_result(abandonBlock_result other) {
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public abandonBlock_result deepCopy() {
return new abandonBlock_result(this);
}
@Override
public void clear() {
this.ouch = null;
}
public ThriftIOException getOuch() {
return this.ouch;
}
public abandonBlock_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof abandonBlock_result)
return this.equals((abandonBlock_result)that);
return false;
}
public boolean equals(abandonBlock_result that) {
if (that == null)
return false;
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(abandonBlock_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
abandonBlock_result typedOther = (abandonBlock_result)other;
lastComparison = Boolean.valueOf(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("abandonBlock_result(");
boolean first = true;
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class abandonFile_args implements org.apache.thrift.TBase<abandonFile_args, abandonFile_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abandonFile_args");
private static final org.apache.thrift.protocol.TField PATHNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pathname", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField CLIENT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("clientName", org.apache.thrift.protocol.TType.STRING, (short)2);
public Pathname pathname; // required
public String clientName; // 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 {
PATHNAME((short)1, "pathname"),
CLIENT_NAME((short)2, "clientName");
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: // PATHNAME
return PATHNAME;
case 2: // CLIENT_NAME
return CLIENT_NAME;
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.PATHNAME, new org.apache.thrift.meta_data.FieldMetaData("pathname", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
tmpMap.put(_Fields.CLIENT_NAME, new org.apache.thrift.meta_data.FieldMetaData("clientName", 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(abandonFile_args.class, metaDataMap);
}
public abandonFile_args() {
}
public abandonFile_args(
Pathname pathname,
String clientName)
{
this();
this.pathname = pathname;
this.clientName = clientName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public abandonFile_args(abandonFile_args other) {
if (other.isSetPathname()) {
this.pathname = new Pathname(other.pathname);
}
if (other.isSetClientName()) {
this.clientName = other.clientName;
}
}
public abandonFile_args deepCopy() {
return new abandonFile_args(this);
}
@Override
public void clear() {
this.pathname = null;
this.clientName = null;
}
public Pathname getPathname() {
return this.pathname;
}
public abandonFile_args setPathname(Pathname pathname) {
this.pathname = pathname;
return this;
}
public void unsetPathname() {
this.pathname = null;
}
/** Returns true if field pathname is set (has been assigned a value) and false otherwise */
public boolean isSetPathname() {
return this.pathname != null;
}
public void setPathnameIsSet(boolean value) {
if (!value) {
this.pathname = null;
}
}
public String getClientName() {
return this.clientName;
}
public abandonFile_args setClientName(String clientName) {
this.clientName = clientName;
return this;
}
public void unsetClientName() {
this.clientName = null;
}
/** Returns true if field clientName is set (has been assigned a value) and false otherwise */
public boolean isSetClientName() {
return this.clientName != null;
}
public void setClientNameIsSet(boolean value) {
if (!value) {
this.clientName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATHNAME:
if (value == null) {
unsetPathname();
} else {
setPathname((Pathname)value);
}
break;
case CLIENT_NAME:
if (value == null) {
unsetClientName();
} else {
setClientName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATHNAME:
return getPathname();
case CLIENT_NAME:
return getClientName();
}
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 PATHNAME:
return isSetPathname();
case CLIENT_NAME:
return isSetClientName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof abandonFile_args)
return this.equals((abandonFile_args)that);
return false;
}
public boolean equals(abandonFile_args that) {
if (that == null)
return false;
boolean this_present_pathname = true && this.isSetPathname();
boolean that_present_pathname = true && that.isSetPathname();
if (this_present_pathname || that_present_pathname) {
if (!(this_present_pathname && that_present_pathname))
return false;
if (!this.pathname.equals(that.pathname))
return false;
}
boolean this_present_clientName = true && this.isSetClientName();
boolean that_present_clientName = true && that.isSetClientName();
if (this_present_clientName || that_present_clientName) {
if (!(this_present_clientName && that_present_clientName))
return false;
if (!this.clientName.equals(that.clientName))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(abandonFile_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
abandonFile_args typedOther = (abandonFile_args)other;
lastComparison = Boolean.valueOf(isSetPathname()).compareTo(typedOther.isSetPathname());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPathname()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pathname, typedOther.pathname);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetClientName()).compareTo(typedOther.isSetClientName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetClientName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientName, typedOther.clientName);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATHNAME
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.pathname = new Pathname();
this.pathname.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // CLIENT_NAME
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.clientName = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.pathname != null) {
oprot.writeFieldBegin(PATHNAME_FIELD_DESC);
this.pathname.write(oprot);
oprot.writeFieldEnd();
}
if (this.clientName != null) {
oprot.writeFieldBegin(CLIENT_NAME_FIELD_DESC);
oprot.writeString(this.clientName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("abandonFile_args(");
boolean first = true;
sb.append("pathname:");
if (this.pathname == null) {
sb.append("null");
} else {
sb.append(this.pathname);
}
first = false;
if (!first) sb.append(", ");
sb.append("clientName:");
if (this.clientName == null) {
sb.append("null");
} else {
sb.append(this.clientName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class abandonFile_result implements org.apache.thrift.TBase<abandonFile_result, abandonFile_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abandonFile_result");
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public ThriftIOException ouch; // 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 {
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(abandonFile_result.class, metaDataMap);
}
public abandonFile_result() {
}
public abandonFile_result(
ThriftIOException ouch)
{
this();
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public abandonFile_result(abandonFile_result other) {
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public abandonFile_result deepCopy() {
return new abandonFile_result(this);
}
@Override
public void clear() {
this.ouch = null;
}
public ThriftIOException getOuch() {
return this.ouch;
}
public abandonFile_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof abandonFile_result)
return this.equals((abandonFile_result)that);
return false;
}
public boolean equals(abandonFile_result that) {
if (that == null)
return false;
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(abandonFile_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
abandonFile_result typedOther = (abandonFile_result)other;
lastComparison = Boolean.valueOf(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("abandonFile_result(");
boolean first = true;
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class addBlock_args implements org.apache.thrift.TBase<addBlock_args, addBlock_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addBlock_args");
private static final org.apache.thrift.protocol.TField PATHNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pathname", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField CLIENT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("clientName", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField START_OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("startOffset", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField LAST_BLOCK_FIELD_DESC = new org.apache.thrift.protocol.TField("lastBlock", org.apache.thrift.protocol.TType.STRUCT, (short)4);
private static final org.apache.thrift.protocol.TField EXCLUDED_NODES_FIELD_DESC = new org.apache.thrift.protocol.TField("excludedNodes", org.apache.thrift.protocol.TType.LIST, (short)5);
private static final org.apache.thrift.protocol.TField FAVOURED_NODES_FIELD_DESC = new org.apache.thrift.protocol.TField("favouredNodes", org.apache.thrift.protocol.TType.LIST, (short)6);
public Pathname pathname; // required
public String clientName; // required
public long startOffset; // required
public TBlock lastBlock; // required
public List<TDatanodeID> excludedNodes; // required
public List<TDatanodeID> favouredNodes; // 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 {
PATHNAME((short)1, "pathname"),
CLIENT_NAME((short)2, "clientName"),
START_OFFSET((short)3, "startOffset"),
LAST_BLOCK((short)4, "lastBlock"),
EXCLUDED_NODES((short)5, "excludedNodes"),
FAVOURED_NODES((short)6, "favouredNodes");
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: // PATHNAME
return PATHNAME;
case 2: // CLIENT_NAME
return CLIENT_NAME;
case 3: // START_OFFSET
return START_OFFSET;
case 4: // LAST_BLOCK
return LAST_BLOCK;
case 5: // EXCLUDED_NODES
return EXCLUDED_NODES;
case 6: // FAVOURED_NODES
return FAVOURED_NODES;
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 __STARTOFFSET_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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.PATHNAME, new org.apache.thrift.meta_data.FieldMetaData("pathname", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
tmpMap.put(_Fields.CLIENT_NAME, new org.apache.thrift.meta_data.FieldMetaData("clientName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.START_OFFSET, new org.apache.thrift.meta_data.FieldMetaData("startOffset", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.LAST_BLOCK, new org.apache.thrift.meta_data.FieldMetaData("lastBlock", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TBlock.class)));
tmpMap.put(_Fields.EXCLUDED_NODES, new org.apache.thrift.meta_data.FieldMetaData("excludedNodes", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDatanodeID.class))));
tmpMap.put(_Fields.FAVOURED_NODES, new org.apache.thrift.meta_data.FieldMetaData("favouredNodes", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDatanodeID.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addBlock_args.class, metaDataMap);
}
public addBlock_args() {
}
public addBlock_args(
Pathname pathname,
String clientName,
long startOffset,
TBlock lastBlock,
List<TDatanodeID> excludedNodes,
List<TDatanodeID> favouredNodes)
{
this();
this.pathname = pathname;
this.clientName = clientName;
this.startOffset = startOffset;
setStartOffsetIsSet(true);
this.lastBlock = lastBlock;
this.excludedNodes = excludedNodes;
this.favouredNodes = favouredNodes;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public addBlock_args(addBlock_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetPathname()) {
this.pathname = new Pathname(other.pathname);
}
if (other.isSetClientName()) {
this.clientName = other.clientName;
}
this.startOffset = other.startOffset;
if (other.isSetLastBlock()) {
this.lastBlock = new TBlock(other.lastBlock);
}
if (other.isSetExcludedNodes()) {
List<TDatanodeID> __this__excludedNodes = new ArrayList<TDatanodeID>();
for (TDatanodeID other_element : other.excludedNodes) {
__this__excludedNodes.add(new TDatanodeID(other_element));
}
this.excludedNodes = __this__excludedNodes;
}
if (other.isSetFavouredNodes()) {
List<TDatanodeID> __this__favouredNodes = new ArrayList<TDatanodeID>();
for (TDatanodeID other_element : other.favouredNodes) {
__this__favouredNodes.add(new TDatanodeID(other_element));
}
this.favouredNodes = __this__favouredNodes;
}
}
public addBlock_args deepCopy() {
return new addBlock_args(this);
}
@Override
public void clear() {
this.pathname = null;
this.clientName = null;
setStartOffsetIsSet(false);
this.startOffset = 0;
this.lastBlock = null;
this.excludedNodes = null;
this.favouredNodes = null;
}
public Pathname getPathname() {
return this.pathname;
}
public addBlock_args setPathname(Pathname pathname) {
this.pathname = pathname;
return this;
}
public void unsetPathname() {
this.pathname = null;
}
/** Returns true if field pathname is set (has been assigned a value) and false otherwise */
public boolean isSetPathname() {
return this.pathname != null;
}
public void setPathnameIsSet(boolean value) {
if (!value) {
this.pathname = null;
}
}
public String getClientName() {
return this.clientName;
}
public addBlock_args setClientName(String clientName) {
this.clientName = clientName;
return this;
}
public void unsetClientName() {
this.clientName = null;
}
/** Returns true if field clientName is set (has been assigned a value) and false otherwise */
public boolean isSetClientName() {
return this.clientName != null;
}
public void setClientNameIsSet(boolean value) {
if (!value) {
this.clientName = null;
}
}
public long getStartOffset() {
return this.startOffset;
}
public addBlock_args setStartOffset(long startOffset) {
this.startOffset = startOffset;
setStartOffsetIsSet(true);
return this;
}
public void unsetStartOffset() {
__isset_bit_vector.clear(__STARTOFFSET_ISSET_ID);
}
/** Returns true if field startOffset is set (has been assigned a value) and false otherwise */
public boolean isSetStartOffset() {
return __isset_bit_vector.get(__STARTOFFSET_ISSET_ID);
}
public void setStartOffsetIsSet(boolean value) {
__isset_bit_vector.set(__STARTOFFSET_ISSET_ID, value);
}
public TBlock getLastBlock() {
return this.lastBlock;
}
public addBlock_args setLastBlock(TBlock lastBlock) {
this.lastBlock = lastBlock;
return this;
}
public void unsetLastBlock() {
this.lastBlock = null;
}
/** Returns true if field lastBlock is set (has been assigned a value) and false otherwise */
public boolean isSetLastBlock() {
return this.lastBlock != null;
}
public void setLastBlockIsSet(boolean value) {
if (!value) {
this.lastBlock = null;
}
}
public int getExcludedNodesSize() {
return (this.excludedNodes == null) ? 0 : this.excludedNodes.size();
}
public java.util.Iterator<TDatanodeID> getExcludedNodesIterator() {
return (this.excludedNodes == null) ? null : this.excludedNodes.iterator();
}
public void addToExcludedNodes(TDatanodeID elem) {
if (this.excludedNodes == null) {
this.excludedNodes = new ArrayList<TDatanodeID>();
}
this.excludedNodes.add(elem);
}
public List<TDatanodeID> getExcludedNodes() {
return this.excludedNodes;
}
public addBlock_args setExcludedNodes(List<TDatanodeID> excludedNodes) {
this.excludedNodes = excludedNodes;
return this;
}
public void unsetExcludedNodes() {
this.excludedNodes = null;
}
/** Returns true if field excludedNodes is set (has been assigned a value) and false otherwise */
public boolean isSetExcludedNodes() {
return this.excludedNodes != null;
}
public void setExcludedNodesIsSet(boolean value) {
if (!value) {
this.excludedNodes = null;
}
}
public int getFavouredNodesSize() {
return (this.favouredNodes == null) ? 0 : this.favouredNodes.size();
}
public java.util.Iterator<TDatanodeID> getFavouredNodesIterator() {
return (this.favouredNodes == null) ? null : this.favouredNodes.iterator();
}
public void addToFavouredNodes(TDatanodeID elem) {
if (this.favouredNodes == null) {
this.favouredNodes = new ArrayList<TDatanodeID>();
}
this.favouredNodes.add(elem);
}
public List<TDatanodeID> getFavouredNodes() {
return this.favouredNodes;
}
public addBlock_args setFavouredNodes(List<TDatanodeID> favouredNodes) {
this.favouredNodes = favouredNodes;
return this;
}
public void unsetFavouredNodes() {
this.favouredNodes = null;
}
/** Returns true if field favouredNodes is set (has been assigned a value) and false otherwise */
public boolean isSetFavouredNodes() {
return this.favouredNodes != null;
}
public void setFavouredNodesIsSet(boolean value) {
if (!value) {
this.favouredNodes = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATHNAME:
if (value == null) {
unsetPathname();
} else {
setPathname((Pathname)value);
}
break;
case CLIENT_NAME:
if (value == null) {
unsetClientName();
} else {
setClientName((String)value);
}
break;
case START_OFFSET:
if (value == null) {
unsetStartOffset();
} else {
setStartOffset((Long)value);
}
break;
case LAST_BLOCK:
if (value == null) {
unsetLastBlock();
} else {
setLastBlock((TBlock)value);
}
break;
case EXCLUDED_NODES:
if (value == null) {
unsetExcludedNodes();
} else {
setExcludedNodes((List<TDatanodeID>)value);
}
break;
case FAVOURED_NODES:
if (value == null) {
unsetFavouredNodes();
} else {
setFavouredNodes((List<TDatanodeID>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATHNAME:
return getPathname();
case CLIENT_NAME:
return getClientName();
case START_OFFSET:
return Long.valueOf(getStartOffset());
case LAST_BLOCK:
return getLastBlock();
case EXCLUDED_NODES:
return getExcludedNodes();
case FAVOURED_NODES:
return getFavouredNodes();
}
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 PATHNAME:
return isSetPathname();
case CLIENT_NAME:
return isSetClientName();
case START_OFFSET:
return isSetStartOffset();
case LAST_BLOCK:
return isSetLastBlock();
case EXCLUDED_NODES:
return isSetExcludedNodes();
case FAVOURED_NODES:
return isSetFavouredNodes();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof addBlock_args)
return this.equals((addBlock_args)that);
return false;
}
public boolean equals(addBlock_args that) {
if (that == null)
return false;
boolean this_present_pathname = true && this.isSetPathname();
boolean that_present_pathname = true && that.isSetPathname();
if (this_present_pathname || that_present_pathname) {
if (!(this_present_pathname && that_present_pathname))
return false;
if (!this.pathname.equals(that.pathname))
return false;
}
boolean this_present_clientName = true && this.isSetClientName();
boolean that_present_clientName = true && that.isSetClientName();
if (this_present_clientName || that_present_clientName) {
if (!(this_present_clientName && that_present_clientName))
return false;
if (!this.clientName.equals(that.clientName))
return false;
}
boolean this_present_startOffset = true;
boolean that_present_startOffset = true;
if (this_present_startOffset || that_present_startOffset) {
if (!(this_present_startOffset && that_present_startOffset))
return false;
if (this.startOffset != that.startOffset)
return false;
}
boolean this_present_lastBlock = true && this.isSetLastBlock();
boolean that_present_lastBlock = true && that.isSetLastBlock();
if (this_present_lastBlock || that_present_lastBlock) {
if (!(this_present_lastBlock && that_present_lastBlock))
return false;
if (!this.lastBlock.equals(that.lastBlock))
return false;
}
boolean this_present_excludedNodes = true && this.isSetExcludedNodes();
boolean that_present_excludedNodes = true && that.isSetExcludedNodes();
if (this_present_excludedNodes || that_present_excludedNodes) {
if (!(this_present_excludedNodes && that_present_excludedNodes))
return false;
if (!this.excludedNodes.equals(that.excludedNodes))
return false;
}
boolean this_present_favouredNodes = true && this.isSetFavouredNodes();
boolean that_present_favouredNodes = true && that.isSetFavouredNodes();
if (this_present_favouredNodes || that_present_favouredNodes) {
if (!(this_present_favouredNodes && that_present_favouredNodes))
return false;
if (!this.favouredNodes.equals(that.favouredNodes))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(addBlock_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
addBlock_args typedOther = (addBlock_args)other;
lastComparison = Boolean.valueOf(isSetPathname()).compareTo(typedOther.isSetPathname());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPathname()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pathname, typedOther.pathname);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetClientName()).compareTo(typedOther.isSetClientName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetClientName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientName, typedOther.clientName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStartOffset()).compareTo(typedOther.isSetStartOffset());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStartOffset()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startOffset, typedOther.startOffset);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetLastBlock()).compareTo(typedOther.isSetLastBlock());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLastBlock()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastBlock, typedOther.lastBlock);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetExcludedNodes()).compareTo(typedOther.isSetExcludedNodes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExcludedNodes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.excludedNodes, typedOther.excludedNodes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetFavouredNodes()).compareTo(typedOther.isSetFavouredNodes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFavouredNodes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.favouredNodes, typedOther.favouredNodes);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATHNAME
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.pathname = new Pathname();
this.pathname.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // CLIENT_NAME
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.clientName = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // START_OFFSET
if (field.type == org.apache.thrift.protocol.TType.I64) {
this.startOffset = iprot.readI64();
setStartOffsetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 4: // LAST_BLOCK
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.lastBlock = new TBlock();
this.lastBlock.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 5: // EXCLUDED_NODES
if (field.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
this.excludedNodes = new ArrayList<TDatanodeID>(_list28.size);
for (int _i29 = 0; _i29 < _list28.size; ++_i29)
{
TDatanodeID _elem30; // required
_elem30 = new TDatanodeID();
_elem30.read(iprot);
this.excludedNodes.add(_elem30);
}
iprot.readListEnd();
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 6: // FAVOURED_NODES
if (field.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list31 = iprot.readListBegin();
this.favouredNodes = new ArrayList<TDatanodeID>(_list31.size);
for (int _i32 = 0; _i32 < _list31.size; ++_i32)
{
TDatanodeID _elem33; // required
_elem33 = new TDatanodeID();
_elem33.read(iprot);
this.favouredNodes.add(_elem33);
}
iprot.readListEnd();
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.pathname != null) {
oprot.writeFieldBegin(PATHNAME_FIELD_DESC);
this.pathname.write(oprot);
oprot.writeFieldEnd();
}
if (this.clientName != null) {
oprot.writeFieldBegin(CLIENT_NAME_FIELD_DESC);
oprot.writeString(this.clientName);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(START_OFFSET_FIELD_DESC);
oprot.writeI64(this.startOffset);
oprot.writeFieldEnd();
if (this.lastBlock != null) {
oprot.writeFieldBegin(LAST_BLOCK_FIELD_DESC);
this.lastBlock.write(oprot);
oprot.writeFieldEnd();
}
if (this.excludedNodes != null) {
oprot.writeFieldBegin(EXCLUDED_NODES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.excludedNodes.size()));
for (TDatanodeID _iter34 : this.excludedNodes)
{
_iter34.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (this.favouredNodes != null) {
oprot.writeFieldBegin(FAVOURED_NODES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.favouredNodes.size()));
for (TDatanodeID _iter35 : this.favouredNodes)
{
_iter35.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("addBlock_args(");
boolean first = true;
sb.append("pathname:");
if (this.pathname == null) {
sb.append("null");
} else {
sb.append(this.pathname);
}
first = false;
if (!first) sb.append(", ");
sb.append("clientName:");
if (this.clientName == null) {
sb.append("null");
} else {
sb.append(this.clientName);
}
first = false;
if (!first) sb.append(", ");
sb.append("startOffset:");
sb.append(this.startOffset);
first = false;
if (!first) sb.append(", ");
sb.append("lastBlock:");
if (this.lastBlock == null) {
sb.append("null");
} else {
sb.append(this.lastBlock);
}
first = false;
if (!first) sb.append(", ");
sb.append("excludedNodes:");
if (this.excludedNodes == null) {
sb.append("null");
} else {
sb.append(this.excludedNodes);
}
first = false;
if (!first) sb.append(", ");
sb.append("favouredNodes:");
if (this.favouredNodes == null) {
sb.append("null");
} else {
sb.append(this.favouredNodes);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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);
}
}
}
public static class addBlock_result implements org.apache.thrift.TBase<addBlock_result, addBlock_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addBlock_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public TLocatedBlock success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TLocatedBlock.class)));
tmpMap.put(_Fields.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(addBlock_result.class, metaDataMap);
}
public addBlock_result() {
}
public addBlock_result(
TLocatedBlock success,
ThriftIOException ouch)
{
this();
this.success = success;
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public addBlock_result(addBlock_result other) {
if (other.isSetSuccess()) {
this.success = new TLocatedBlock(other.success);
}
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public addBlock_result deepCopy() {
return new addBlock_result(this);
}
@Override
public void clear() {
this.success = null;
this.ouch = null;
}
public TLocatedBlock getSuccess() {
return this.success;
}
public addBlock_result setSuccess(TLocatedBlock 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 ThriftIOException getOuch() {
return this.ouch;
}
public addBlock_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((TLocatedBlock)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof addBlock_result)
return this.equals((addBlock_result)that);
return false;
}
public boolean equals(addBlock_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(addBlock_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
addBlock_result typedOther = (addBlock_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.success = new TLocatedBlock();
this.success.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
this.success.write(oprot);
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("addBlock_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class addFirstBlock_args implements org.apache.thrift.TBase<addFirstBlock_args, addFirstBlock_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addFirstBlock_args");
private static final org.apache.thrift.protocol.TField PATHNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pathname", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField CLIENT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("clientName", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField EXCLUDED_NODES_FIELD_DESC = new org.apache.thrift.protocol.TField("excludedNodes", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField FAVOURED_NODES_FIELD_DESC = new org.apache.thrift.protocol.TField("favouredNodes", org.apache.thrift.protocol.TType.LIST, (short)4);
public Pathname pathname; // required
public String clientName; // required
public List<TDatanodeID> excludedNodes; // required
public List<TDatanodeID> favouredNodes; // 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 {
PATHNAME((short)1, "pathname"),
CLIENT_NAME((short)2, "clientName"),
EXCLUDED_NODES((short)3, "excludedNodes"),
FAVOURED_NODES((short)4, "favouredNodes");
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: // PATHNAME
return PATHNAME;
case 2: // CLIENT_NAME
return CLIENT_NAME;
case 3: // EXCLUDED_NODES
return EXCLUDED_NODES;
case 4: // FAVOURED_NODES
return FAVOURED_NODES;
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.PATHNAME, new org.apache.thrift.meta_data.FieldMetaData("pathname", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
tmpMap.put(_Fields.CLIENT_NAME, new org.apache.thrift.meta_data.FieldMetaData("clientName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.EXCLUDED_NODES, new org.apache.thrift.meta_data.FieldMetaData("excludedNodes", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDatanodeID.class))));
tmpMap.put(_Fields.FAVOURED_NODES, new org.apache.thrift.meta_data.FieldMetaData("favouredNodes", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDatanodeID.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addFirstBlock_args.class, metaDataMap);
}
public addFirstBlock_args() {
}
public addFirstBlock_args(
Pathname pathname,
String clientName,
List<TDatanodeID> excludedNodes,
List<TDatanodeID> favouredNodes)
{
this();
this.pathname = pathname;
this.clientName = clientName;
this.excludedNodes = excludedNodes;
this.favouredNodes = favouredNodes;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public addFirstBlock_args(addFirstBlock_args other) {
if (other.isSetPathname()) {
this.pathname = new Pathname(other.pathname);
}
if (other.isSetClientName()) {
this.clientName = other.clientName;
}
if (other.isSetExcludedNodes()) {
List<TDatanodeID> __this__excludedNodes = new ArrayList<TDatanodeID>();
for (TDatanodeID other_element : other.excludedNodes) {
__this__excludedNodes.add(new TDatanodeID(other_element));
}
this.excludedNodes = __this__excludedNodes;
}
if (other.isSetFavouredNodes()) {
List<TDatanodeID> __this__favouredNodes = new ArrayList<TDatanodeID>();
for (TDatanodeID other_element : other.favouredNodes) {
__this__favouredNodes.add(new TDatanodeID(other_element));
}
this.favouredNodes = __this__favouredNodes;
}
}
public addFirstBlock_args deepCopy() {
return new addFirstBlock_args(this);
}
@Override
public void clear() {
this.pathname = null;
this.clientName = null;
this.excludedNodes = null;
this.favouredNodes = null;
}
public Pathname getPathname() {
return this.pathname;
}
public addFirstBlock_args setPathname(Pathname pathname) {
this.pathname = pathname;
return this;
}
public void unsetPathname() {
this.pathname = null;
}
/** Returns true if field pathname is set (has been assigned a value) and false otherwise */
public boolean isSetPathname() {
return this.pathname != null;
}
public void setPathnameIsSet(boolean value) {
if (!value) {
this.pathname = null;
}
}
public String getClientName() {
return this.clientName;
}
public addFirstBlock_args setClientName(String clientName) {
this.clientName = clientName;
return this;
}
public void unsetClientName() {
this.clientName = null;
}
/** Returns true if field clientName is set (has been assigned a value) and false otherwise */
public boolean isSetClientName() {
return this.clientName != null;
}
public void setClientNameIsSet(boolean value) {
if (!value) {
this.clientName = null;
}
}
public int getExcludedNodesSize() {
return (this.excludedNodes == null) ? 0 : this.excludedNodes.size();
}
public java.util.Iterator<TDatanodeID> getExcludedNodesIterator() {
return (this.excludedNodes == null) ? null : this.excludedNodes.iterator();
}
public void addToExcludedNodes(TDatanodeID elem) {
if (this.excludedNodes == null) {
this.excludedNodes = new ArrayList<TDatanodeID>();
}
this.excludedNodes.add(elem);
}
public List<TDatanodeID> getExcludedNodes() {
return this.excludedNodes;
}
public addFirstBlock_args setExcludedNodes(List<TDatanodeID> excludedNodes) {
this.excludedNodes = excludedNodes;
return this;
}
public void unsetExcludedNodes() {
this.excludedNodes = null;
}
/** Returns true if field excludedNodes is set (has been assigned a value) and false otherwise */
public boolean isSetExcludedNodes() {
return this.excludedNodes != null;
}
public void setExcludedNodesIsSet(boolean value) {
if (!value) {
this.excludedNodes = null;
}
}
public int getFavouredNodesSize() {
return (this.favouredNodes == null) ? 0 : this.favouredNodes.size();
}
public java.util.Iterator<TDatanodeID> getFavouredNodesIterator() {
return (this.favouredNodes == null) ? null : this.favouredNodes.iterator();
}
public void addToFavouredNodes(TDatanodeID elem) {
if (this.favouredNodes == null) {
this.favouredNodes = new ArrayList<TDatanodeID>();
}
this.favouredNodes.add(elem);
}
public List<TDatanodeID> getFavouredNodes() {
return this.favouredNodes;
}
public addFirstBlock_args setFavouredNodes(List<TDatanodeID> favouredNodes) {
this.favouredNodes = favouredNodes;
return this;
}
public void unsetFavouredNodes() {
this.favouredNodes = null;
}
/** Returns true if field favouredNodes is set (has been assigned a value) and false otherwise */
public boolean isSetFavouredNodes() {
return this.favouredNodes != null;
}
public void setFavouredNodesIsSet(boolean value) {
if (!value) {
this.favouredNodes = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATHNAME:
if (value == null) {
unsetPathname();
} else {
setPathname((Pathname)value);
}
break;
case CLIENT_NAME:
if (value == null) {
unsetClientName();
} else {
setClientName((String)value);
}
break;
case EXCLUDED_NODES:
if (value == null) {
unsetExcludedNodes();
} else {
setExcludedNodes((List<TDatanodeID>)value);
}
break;
case FAVOURED_NODES:
if (value == null) {
unsetFavouredNodes();
} else {
setFavouredNodes((List<TDatanodeID>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATHNAME:
return getPathname();
case CLIENT_NAME:
return getClientName();
case EXCLUDED_NODES:
return getExcludedNodes();
case FAVOURED_NODES:
return getFavouredNodes();
}
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 PATHNAME:
return isSetPathname();
case CLIENT_NAME:
return isSetClientName();
case EXCLUDED_NODES:
return isSetExcludedNodes();
case FAVOURED_NODES:
return isSetFavouredNodes();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof addFirstBlock_args)
return this.equals((addFirstBlock_args)that);
return false;
}
public boolean equals(addFirstBlock_args that) {
if (that == null)
return false;
boolean this_present_pathname = true && this.isSetPathname();
boolean that_present_pathname = true && that.isSetPathname();
if (this_present_pathname || that_present_pathname) {
if (!(this_present_pathname && that_present_pathname))
return false;
if (!this.pathname.equals(that.pathname))
return false;
}
boolean this_present_clientName = true && this.isSetClientName();
boolean that_present_clientName = true && that.isSetClientName();
if (this_present_clientName || that_present_clientName) {
if (!(this_present_clientName && that_present_clientName))
return false;
if (!this.clientName.equals(that.clientName))
return false;
}
boolean this_present_excludedNodes = true && this.isSetExcludedNodes();
boolean that_present_excludedNodes = true && that.isSetExcludedNodes();
if (this_present_excludedNodes || that_present_excludedNodes) {
if (!(this_present_excludedNodes && that_present_excludedNodes))
return false;
if (!this.excludedNodes.equals(that.excludedNodes))
return false;
}
boolean this_present_favouredNodes = true && this.isSetFavouredNodes();
boolean that_present_favouredNodes = true && that.isSetFavouredNodes();
if (this_present_favouredNodes || that_present_favouredNodes) {
if (!(this_present_favouredNodes && that_present_favouredNodes))
return false;
if (!this.favouredNodes.equals(that.favouredNodes))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(addFirstBlock_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
addFirstBlock_args typedOther = (addFirstBlock_args)other;
lastComparison = Boolean.valueOf(isSetPathname()).compareTo(typedOther.isSetPathname());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPathname()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pathname, typedOther.pathname);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetClientName()).compareTo(typedOther.isSetClientName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetClientName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientName, typedOther.clientName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetExcludedNodes()).compareTo(typedOther.isSetExcludedNodes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExcludedNodes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.excludedNodes, typedOther.excludedNodes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetFavouredNodes()).compareTo(typedOther.isSetFavouredNodes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFavouredNodes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.favouredNodes, typedOther.favouredNodes);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATHNAME
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.pathname = new Pathname();
this.pathname.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // CLIENT_NAME
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.clientName = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // EXCLUDED_NODES
if (field.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
this.excludedNodes = new ArrayList<TDatanodeID>(_list36.size);
for (int _i37 = 0; _i37 < _list36.size; ++_i37)
{
TDatanodeID _elem38; // required
_elem38 = new TDatanodeID();
_elem38.read(iprot);
this.excludedNodes.add(_elem38);
}
iprot.readListEnd();
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 4: // FAVOURED_NODES
if (field.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list39 = iprot.readListBegin();
this.favouredNodes = new ArrayList<TDatanodeID>(_list39.size);
for (int _i40 = 0; _i40 < _list39.size; ++_i40)
{
TDatanodeID _elem41; // required
_elem41 = new TDatanodeID();
_elem41.read(iprot);
this.favouredNodes.add(_elem41);
}
iprot.readListEnd();
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.pathname != null) {
oprot.writeFieldBegin(PATHNAME_FIELD_DESC);
this.pathname.write(oprot);
oprot.writeFieldEnd();
}
if (this.clientName != null) {
oprot.writeFieldBegin(CLIENT_NAME_FIELD_DESC);
oprot.writeString(this.clientName);
oprot.writeFieldEnd();
}
if (this.excludedNodes != null) {
oprot.writeFieldBegin(EXCLUDED_NODES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.excludedNodes.size()));
for (TDatanodeID _iter42 : this.excludedNodes)
{
_iter42.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (this.favouredNodes != null) {
oprot.writeFieldBegin(FAVOURED_NODES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.favouredNodes.size()));
for (TDatanodeID _iter43 : this.favouredNodes)
{
_iter43.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("addFirstBlock_args(");
boolean first = true;
sb.append("pathname:");
if (this.pathname == null) {
sb.append("null");
} else {
sb.append(this.pathname);
}
first = false;
if (!first) sb.append(", ");
sb.append("clientName:");
if (this.clientName == null) {
sb.append("null");
} else {
sb.append(this.clientName);
}
first = false;
if (!first) sb.append(", ");
sb.append("excludedNodes:");
if (this.excludedNodes == null) {
sb.append("null");
} else {
sb.append(this.excludedNodes);
}
first = false;
if (!first) sb.append(", ");
sb.append("favouredNodes:");
if (this.favouredNodes == null) {
sb.append("null");
} else {
sb.append(this.favouredNodes);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class addFirstBlock_result implements org.apache.thrift.TBase<addFirstBlock_result, addFirstBlock_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addFirstBlock_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public TLocatedBlock success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TLocatedBlock.class)));
tmpMap.put(_Fields.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(addFirstBlock_result.class, metaDataMap);
}
public addFirstBlock_result() {
}
public addFirstBlock_result(
TLocatedBlock success,
ThriftIOException ouch)
{
this();
this.success = success;
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public addFirstBlock_result(addFirstBlock_result other) {
if (other.isSetSuccess()) {
this.success = new TLocatedBlock(other.success);
}
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public addFirstBlock_result deepCopy() {
return new addFirstBlock_result(this);
}
@Override
public void clear() {
this.success = null;
this.ouch = null;
}
public TLocatedBlock getSuccess() {
return this.success;
}
public addFirstBlock_result setSuccess(TLocatedBlock 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 ThriftIOException getOuch() {
return this.ouch;
}
public addFirstBlock_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((TLocatedBlock)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof addFirstBlock_result)
return this.equals((addFirstBlock_result)that);
return false;
}
public boolean equals(addFirstBlock_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(addFirstBlock_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
addFirstBlock_result typedOther = (addFirstBlock_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.success = new TLocatedBlock();
this.success.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
this.success.write(oprot);
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("addFirstBlock_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
public static class complete_args implements org.apache.thrift.TBase<complete_args, complete_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("complete_args");
private static final org.apache.thrift.protocol.TField PATHNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pathname", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField CLIENT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("clientName", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField FILE_LEN_FIELD_DESC = new org.apache.thrift.protocol.TField("fileLen", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField LAST_BLOCK_FIELD_DESC = new org.apache.thrift.protocol.TField("lastBlock", org.apache.thrift.protocol.TType.STRUCT, (short)4);
public Pathname pathname; // required
public String clientName; // required
public long fileLen; // required
public TBlock lastBlock; // 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 {
PATHNAME((short)1, "pathname"),
CLIENT_NAME((short)2, "clientName"),
FILE_LEN((short)3, "fileLen"),
LAST_BLOCK((short)4, "lastBlock");
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: // PATHNAME
return PATHNAME;
case 2: // CLIENT_NAME
return CLIENT_NAME;
case 3: // FILE_LEN
return FILE_LEN;
case 4: // LAST_BLOCK
return LAST_BLOCK;
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 __FILELEN_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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.PATHNAME, new org.apache.thrift.meta_data.FieldMetaData("pathname", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Pathname.class)));
tmpMap.put(_Fields.CLIENT_NAME, new org.apache.thrift.meta_data.FieldMetaData("clientName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.FILE_LEN, new org.apache.thrift.meta_data.FieldMetaData("fileLen", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.LAST_BLOCK, new org.apache.thrift.meta_data.FieldMetaData("lastBlock", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TBlock.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(complete_args.class, metaDataMap);
}
public complete_args() {
}
public complete_args(
Pathname pathname,
String clientName,
long fileLen,
TBlock lastBlock)
{
this();
this.pathname = pathname;
this.clientName = clientName;
this.fileLen = fileLen;
setFileLenIsSet(true);
this.lastBlock = lastBlock;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public complete_args(complete_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetPathname()) {
this.pathname = new Pathname(other.pathname);
}
if (other.isSetClientName()) {
this.clientName = other.clientName;
}
this.fileLen = other.fileLen;
if (other.isSetLastBlock()) {
this.lastBlock = new TBlock(other.lastBlock);
}
}
public complete_args deepCopy() {
return new complete_args(this);
}
@Override
public void clear() {
this.pathname = null;
this.clientName = null;
setFileLenIsSet(false);
this.fileLen = 0;
this.lastBlock = null;
}
public Pathname getPathname() {
return this.pathname;
}
public complete_args setPathname(Pathname pathname) {
this.pathname = pathname;
return this;
}
public void unsetPathname() {
this.pathname = null;
}
/** Returns true if field pathname is set (has been assigned a value) and false otherwise */
public boolean isSetPathname() {
return this.pathname != null;
}
public void setPathnameIsSet(boolean value) {
if (!value) {
this.pathname = null;
}
}
public String getClientName() {
return this.clientName;
}
public complete_args setClientName(String clientName) {
this.clientName = clientName;
return this;
}
public void unsetClientName() {
this.clientName = null;
}
/** Returns true if field clientName is set (has been assigned a value) and false otherwise */
public boolean isSetClientName() {
return this.clientName != null;
}
public void setClientNameIsSet(boolean value) {
if (!value) {
this.clientName = null;
}
}
public long getFileLen() {
return this.fileLen;
}
public complete_args setFileLen(long fileLen) {
this.fileLen = fileLen;
setFileLenIsSet(true);
return this;
}
public void unsetFileLen() {
__isset_bit_vector.clear(__FILELEN_ISSET_ID);
}
/** Returns true if field fileLen is set (has been assigned a value) and false otherwise */
public boolean isSetFileLen() {
return __isset_bit_vector.get(__FILELEN_ISSET_ID);
}
public void setFileLenIsSet(boolean value) {
__isset_bit_vector.set(__FILELEN_ISSET_ID, value);
}
public TBlock getLastBlock() {
return this.lastBlock;
}
public complete_args setLastBlock(TBlock lastBlock) {
this.lastBlock = lastBlock;
return this;
}
public void unsetLastBlock() {
this.lastBlock = null;
}
/** Returns true if field lastBlock is set (has been assigned a value) and false otherwise */
public boolean isSetLastBlock() {
return this.lastBlock != null;
}
public void setLastBlockIsSet(boolean value) {
if (!value) {
this.lastBlock = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATHNAME:
if (value == null) {
unsetPathname();
} else {
setPathname((Pathname)value);
}
break;
case CLIENT_NAME:
if (value == null) {
unsetClientName();
} else {
setClientName((String)value);
}
break;
case FILE_LEN:
if (value == null) {
unsetFileLen();
} else {
setFileLen((Long)value);
}
break;
case LAST_BLOCK:
if (value == null) {
unsetLastBlock();
} else {
setLastBlock((TBlock)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATHNAME:
return getPathname();
case CLIENT_NAME:
return getClientName();
case FILE_LEN:
return Long.valueOf(getFileLen());
case LAST_BLOCK:
return getLastBlock();
}
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 PATHNAME:
return isSetPathname();
case CLIENT_NAME:
return isSetClientName();
case FILE_LEN:
return isSetFileLen();
case LAST_BLOCK:
return isSetLastBlock();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof complete_args)
return this.equals((complete_args)that);
return false;
}
public boolean equals(complete_args that) {
if (that == null)
return false;
boolean this_present_pathname = true && this.isSetPathname();
boolean that_present_pathname = true && that.isSetPathname();
if (this_present_pathname || that_present_pathname) {
if (!(this_present_pathname && that_present_pathname))
return false;
if (!this.pathname.equals(that.pathname))
return false;
}
boolean this_present_clientName = true && this.isSetClientName();
boolean that_present_clientName = true && that.isSetClientName();
if (this_present_clientName || that_present_clientName) {
if (!(this_present_clientName && that_present_clientName))
return false;
if (!this.clientName.equals(that.clientName))
return false;
}
boolean this_present_fileLen = true;
boolean that_present_fileLen = true;
if (this_present_fileLen || that_present_fileLen) {
if (!(this_present_fileLen && that_present_fileLen))
return false;
if (this.fileLen != that.fileLen)
return false;
}
boolean this_present_lastBlock = true && this.isSetLastBlock();
boolean that_present_lastBlock = true && that.isSetLastBlock();
if (this_present_lastBlock || that_present_lastBlock) {
if (!(this_present_lastBlock && that_present_lastBlock))
return false;
if (!this.lastBlock.equals(that.lastBlock))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(complete_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
complete_args typedOther = (complete_args)other;
lastComparison = Boolean.valueOf(isSetPathname()).compareTo(typedOther.isSetPathname());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPathname()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pathname, typedOther.pathname);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetClientName()).compareTo(typedOther.isSetClientName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetClientName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientName, typedOther.clientName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetFileLen()).compareTo(typedOther.isSetFileLen());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFileLen()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileLen, typedOther.fileLen);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetLastBlock()).compareTo(typedOther.isSetLastBlock());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLastBlock()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastBlock, typedOther.lastBlock);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // PATHNAME
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.pathname = new Pathname();
this.pathname.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // CLIENT_NAME
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.clientName = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // FILE_LEN
if (field.type == org.apache.thrift.protocol.TType.I64) {
this.fileLen = iprot.readI64();
setFileLenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 4: // LAST_BLOCK
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.lastBlock = new TBlock();
this.lastBlock.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.pathname != null) {
oprot.writeFieldBegin(PATHNAME_FIELD_DESC);
this.pathname.write(oprot);
oprot.writeFieldEnd();
}
if (this.clientName != null) {
oprot.writeFieldBegin(CLIENT_NAME_FIELD_DESC);
oprot.writeString(this.clientName);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(FILE_LEN_FIELD_DESC);
oprot.writeI64(this.fileLen);
oprot.writeFieldEnd();
if (this.lastBlock != null) {
oprot.writeFieldBegin(LAST_BLOCK_FIELD_DESC);
this.lastBlock.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("complete_args(");
boolean first = true;
sb.append("pathname:");
if (this.pathname == null) {
sb.append("null");
} else {
sb.append(this.pathname);
}
first = false;
if (!first) sb.append(", ");
sb.append("clientName:");
if (this.clientName == null) {
sb.append("null");
} else {
sb.append(this.clientName);
}
first = false;
if (!first) sb.append(", ");
sb.append("fileLen:");
sb.append(this.fileLen);
first = false;
if (!first) sb.append(", ");
sb.append("lastBlock:");
if (this.lastBlock == null) {
sb.append("null");
} else {
sb.append(this.lastBlock);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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);
}
}
}
public static class complete_result implements org.apache.thrift.TBase<complete_result, complete_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("complete_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 OUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public boolean success; // required
public ThriftIOException ouch; // 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"),
OUCH((short)1, "ouch");
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: // OUCH
return OUCH;
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 BitSet __isset_bit_vector = new BitSet(1);
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.OUCH, new org.apache.thrift.meta_data.FieldMetaData("ouch", 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(complete_result.class, metaDataMap);
}
public complete_result() {
}
public complete_result(
boolean success,
ThriftIOException ouch)
{
this();
this.success = success;
setSuccessIsSet(true);
this.ouch = ouch;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public complete_result(complete_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
if (other.isSetOuch()) {
this.ouch = new ThriftIOException(other.ouch);
}
}
public complete_result deepCopy() {
return new complete_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.ouch = null;
}
public boolean isSuccess() {
return this.success;
}
public complete_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public ThriftIOException getOuch() {
return this.ouch;
}
public complete_result setOuch(ThriftIOException ouch) {
this.ouch = ouch;
return this;
}
public void unsetOuch() {
this.ouch = null;
}
/** Returns true if field ouch is set (has been assigned a value) and false otherwise */
public boolean isSetOuch() {
return this.ouch != null;
}
public void setOuchIsSet(boolean value) {
if (!value) {
this.ouch = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
case OUCH:
if (value == null) {
unsetOuch();
} else {
setOuch((ThriftIOException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Boolean.valueOf(isSuccess());
case OUCH:
return getOuch();
}
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 OUCH:
return isSetOuch();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof complete_result)
return this.equals((complete_result)that);
return false;
}
public boolean equals(complete_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_ouch = true && this.isSetOuch();
boolean that_present_ouch = true && that.isSetOuch();
if (this_present_ouch || that_present_ouch) {
if (!(this_present_ouch && that_present_ouch))
return false;
if (!this.ouch.equals(that.ouch))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(complete_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
complete_result typedOther = (complete_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(isSetOuch()).compareTo(typedOther.isSetOuch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOuch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch, typedOther.ouch);
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 {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
this.success = iprot.readBool();
setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // OUCH
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ouch = new ThriftIOException();
this.ouch.read(iprot);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(this.success);
oprot.writeFieldEnd();
} else if (this.isSetOuch()) {
oprot.writeFieldBegin(OUCH_FIELD_DESC);
this.ouch.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("complete_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("ouch:");
if (this.ouch == null) {
sb.append("null");
} else {
sb.append(this.ouch);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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);
}
}
}
}