/**
* 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.corona;
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 ClusterManagerService {
/**
* Cluster Manager Service API.
*/
public interface Iface {
public SessionRegistrationData sessionStart(SessionInfo info) throws org.apache.thrift.TException;
public void sessionUpdateInfo(String handle, SessionInfo info) throws InvalidSessionHandle, org.apache.thrift.TException;
public void sessionEnd(String handle, SessionStatus status) throws InvalidSessionHandle, org.apache.thrift.TException;
public void sessionHeartbeat(String handle) throws InvalidSessionHandle, org.apache.thrift.TException;
public void requestResource(String handle, List<ResourceRequest> requestList) throws InvalidSessionHandle, org.apache.thrift.TException;
public void releaseResource(String handle, List<Integer> idList) throws InvalidSessionHandle, org.apache.thrift.TException;
public void nodeHeartbeat(ClusterNodeInfo node) throws org.apache.thrift.TException;
}
public interface AsyncIface {
public void sessionStart(SessionInfo info, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.sessionStart_call> resultHandler) throws org.apache.thrift.TException;
public void sessionUpdateInfo(String handle, SessionInfo info, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.sessionUpdateInfo_call> resultHandler) throws org.apache.thrift.TException;
public void sessionEnd(String handle, SessionStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.sessionEnd_call> resultHandler) throws org.apache.thrift.TException;
public void sessionHeartbeat(String handle, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.sessionHeartbeat_call> resultHandler) throws org.apache.thrift.TException;
public void requestResource(String handle, List<ResourceRequest> requestList, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.requestResource_call> resultHandler) throws org.apache.thrift.TException;
public void releaseResource(String handle, List<Integer> idList, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.releaseResource_call> resultHandler) throws org.apache.thrift.TException;
public void nodeHeartbeat(ClusterNodeInfo node, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.nodeHeartbeat_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 SessionRegistrationData sessionStart(SessionInfo info) throws org.apache.thrift.TException
{
send_sessionStart(info);
return recv_sessionStart();
}
public void send_sessionStart(SessionInfo info) throws org.apache.thrift.TException
{
sessionStart_args args = new sessionStart_args();
args.setInfo(info);
sendBase("sessionStart", args);
}
public SessionRegistrationData recv_sessionStart() throws org.apache.thrift.TException
{
sessionStart_result result = new sessionStart_result();
receiveBase(result, "sessionStart");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "sessionStart failed: unknown result");
}
public void sessionUpdateInfo(String handle, SessionInfo info) throws InvalidSessionHandle, org.apache.thrift.TException
{
send_sessionUpdateInfo(handle, info);
recv_sessionUpdateInfo();
}
public void send_sessionUpdateInfo(String handle, SessionInfo info) throws org.apache.thrift.TException
{
sessionUpdateInfo_args args = new sessionUpdateInfo_args();
args.setHandle(handle);
args.setInfo(info);
sendBase("sessionUpdateInfo", args);
}
public void recv_sessionUpdateInfo() throws InvalidSessionHandle, org.apache.thrift.TException
{
sessionUpdateInfo_result result = new sessionUpdateInfo_result();
receiveBase(result, "sessionUpdateInfo");
if (result.e != null) {
throw result.e;
}
return;
}
public void sessionEnd(String handle, SessionStatus status) throws InvalidSessionHandle, org.apache.thrift.TException
{
send_sessionEnd(handle, status);
recv_sessionEnd();
}
public void send_sessionEnd(String handle, SessionStatus status) throws org.apache.thrift.TException
{
sessionEnd_args args = new sessionEnd_args();
args.setHandle(handle);
args.setStatus(status);
sendBase("sessionEnd", args);
}
public void recv_sessionEnd() throws InvalidSessionHandle, org.apache.thrift.TException
{
sessionEnd_result result = new sessionEnd_result();
receiveBase(result, "sessionEnd");
if (result.e != null) {
throw result.e;
}
return;
}
public void sessionHeartbeat(String handle) throws InvalidSessionHandle, org.apache.thrift.TException
{
send_sessionHeartbeat(handle);
recv_sessionHeartbeat();
}
public void send_sessionHeartbeat(String handle) throws org.apache.thrift.TException
{
sessionHeartbeat_args args = new sessionHeartbeat_args();
args.setHandle(handle);
sendBase("sessionHeartbeat", args);
}
public void recv_sessionHeartbeat() throws InvalidSessionHandle, org.apache.thrift.TException
{
sessionHeartbeat_result result = new sessionHeartbeat_result();
receiveBase(result, "sessionHeartbeat");
if (result.e != null) {
throw result.e;
}
return;
}
public void requestResource(String handle, List<ResourceRequest> requestList) throws InvalidSessionHandle, org.apache.thrift.TException
{
send_requestResource(handle, requestList);
recv_requestResource();
}
public void send_requestResource(String handle, List<ResourceRequest> requestList) throws org.apache.thrift.TException
{
requestResource_args args = new requestResource_args();
args.setHandle(handle);
args.setRequestList(requestList);
sendBase("requestResource", args);
}
public void recv_requestResource() throws InvalidSessionHandle, org.apache.thrift.TException
{
requestResource_result result = new requestResource_result();
receiveBase(result, "requestResource");
if (result.e != null) {
throw result.e;
}
return;
}
public void releaseResource(String handle, List<Integer> idList) throws InvalidSessionHandle, org.apache.thrift.TException
{
send_releaseResource(handle, idList);
recv_releaseResource();
}
public void send_releaseResource(String handle, List<Integer> idList) throws org.apache.thrift.TException
{
releaseResource_args args = new releaseResource_args();
args.setHandle(handle);
args.setIdList(idList);
sendBase("releaseResource", args);
}
public void recv_releaseResource() throws InvalidSessionHandle, org.apache.thrift.TException
{
releaseResource_result result = new releaseResource_result();
receiveBase(result, "releaseResource");
if (result.e != null) {
throw result.e;
}
return;
}
public void nodeHeartbeat(ClusterNodeInfo node) throws org.apache.thrift.TException
{
send_nodeHeartbeat(node);
recv_nodeHeartbeat();
}
public void send_nodeHeartbeat(ClusterNodeInfo node) throws org.apache.thrift.TException
{
nodeHeartbeat_args args = new nodeHeartbeat_args();
args.setNode(node);
sendBase("nodeHeartbeat", args);
}
public void recv_nodeHeartbeat() throws org.apache.thrift.TException
{
nodeHeartbeat_result result = new nodeHeartbeat_result();
receiveBase(result, "nodeHeartbeat");
return;
}
}
public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
private org.apache.thrift.async.TAsyncClientManager clientManager;
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void sessionStart(SessionInfo info, org.apache.thrift.async.AsyncMethodCallback<sessionStart_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
sessionStart_call method_call = new sessionStart_call(info, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class sessionStart_call extends org.apache.thrift.async.TAsyncMethodCall {
private SessionInfo info;
public sessionStart_call(SessionInfo info, org.apache.thrift.async.AsyncMethodCallback<sessionStart_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.info = info;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sessionStart", org.apache.thrift.protocol.TMessageType.CALL, 0));
sessionStart_args args = new sessionStart_args();
args.setInfo(info);
args.write(prot);
prot.writeMessageEnd();
}
public SessionRegistrationData getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_sessionStart();
}
}
public void sessionUpdateInfo(String handle, SessionInfo info, org.apache.thrift.async.AsyncMethodCallback<sessionUpdateInfo_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
sessionUpdateInfo_call method_call = new sessionUpdateInfo_call(handle, info, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class sessionUpdateInfo_call extends org.apache.thrift.async.TAsyncMethodCall {
private String handle;
private SessionInfo info;
public sessionUpdateInfo_call(String handle, SessionInfo info, org.apache.thrift.async.AsyncMethodCallback<sessionUpdateInfo_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.info = info;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sessionUpdateInfo", org.apache.thrift.protocol.TMessageType.CALL, 0));
sessionUpdateInfo_args args = new sessionUpdateInfo_args();
args.setHandle(handle);
args.setInfo(info);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws InvalidSessionHandle, 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_sessionUpdateInfo();
}
}
public void sessionEnd(String handle, SessionStatus status, org.apache.thrift.async.AsyncMethodCallback<sessionEnd_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
sessionEnd_call method_call = new sessionEnd_call(handle, status, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class sessionEnd_call extends org.apache.thrift.async.TAsyncMethodCall {
private String handle;
private SessionStatus status;
public sessionEnd_call(String handle, SessionStatus status, org.apache.thrift.async.AsyncMethodCallback<sessionEnd_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.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("sessionEnd", org.apache.thrift.protocol.TMessageType.CALL, 0));
sessionEnd_args args = new sessionEnd_args();
args.setHandle(handle);
args.setStatus(status);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws InvalidSessionHandle, 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_sessionEnd();
}
}
public void sessionHeartbeat(String handle, org.apache.thrift.async.AsyncMethodCallback<sessionHeartbeat_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
sessionHeartbeat_call method_call = new sessionHeartbeat_call(handle, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class sessionHeartbeat_call extends org.apache.thrift.async.TAsyncMethodCall {
private String handle;
public sessionHeartbeat_call(String handle, org.apache.thrift.async.AsyncMethodCallback<sessionHeartbeat_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;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sessionHeartbeat", org.apache.thrift.protocol.TMessageType.CALL, 0));
sessionHeartbeat_args args = new sessionHeartbeat_args();
args.setHandle(handle);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws InvalidSessionHandle, 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_sessionHeartbeat();
}
}
public void requestResource(String handle, List<ResourceRequest> requestList, org.apache.thrift.async.AsyncMethodCallback<requestResource_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
requestResource_call method_call = new requestResource_call(handle, requestList, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class requestResource_call extends org.apache.thrift.async.TAsyncMethodCall {
private String handle;
private List<ResourceRequest> requestList;
public requestResource_call(String handle, List<ResourceRequest> requestList, org.apache.thrift.async.AsyncMethodCallback<requestResource_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.requestList = requestList;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requestResource", org.apache.thrift.protocol.TMessageType.CALL, 0));
requestResource_args args = new requestResource_args();
args.setHandle(handle);
args.setRequestList(requestList);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws InvalidSessionHandle, 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_requestResource();
}
}
public void releaseResource(String handle, List<Integer> idList, org.apache.thrift.async.AsyncMethodCallback<releaseResource_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
releaseResource_call method_call = new releaseResource_call(handle, idList, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class releaseResource_call extends org.apache.thrift.async.TAsyncMethodCall {
private String handle;
private List<Integer> idList;
public releaseResource_call(String handle, List<Integer> idList, org.apache.thrift.async.AsyncMethodCallback<releaseResource_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.idList = idList;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("releaseResource", org.apache.thrift.protocol.TMessageType.CALL, 0));
releaseResource_args args = new releaseResource_args();
args.setHandle(handle);
args.setIdList(idList);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws InvalidSessionHandle, 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_releaseResource();
}
}
public void nodeHeartbeat(ClusterNodeInfo node, org.apache.thrift.async.AsyncMethodCallback<nodeHeartbeat_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
nodeHeartbeat_call method_call = new nodeHeartbeat_call(node, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class nodeHeartbeat_call extends org.apache.thrift.async.TAsyncMethodCall {
private ClusterNodeInfo node;
public nodeHeartbeat_call(ClusterNodeInfo node, org.apache.thrift.async.AsyncMethodCallback<nodeHeartbeat_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.node = node;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("nodeHeartbeat", org.apache.thrift.protocol.TMessageType.CALL, 0));
nodeHeartbeat_args args = new nodeHeartbeat_args();
args.setNode(node);
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_nodeHeartbeat();
}
}
}
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("sessionStart", new sessionStart());
processMap.put("sessionUpdateInfo", new sessionUpdateInfo());
processMap.put("sessionEnd", new sessionEnd());
processMap.put("sessionHeartbeat", new sessionHeartbeat());
processMap.put("requestResource", new requestResource());
processMap.put("releaseResource", new releaseResource());
processMap.put("nodeHeartbeat", new nodeHeartbeat());
return processMap;
}
private static class sessionStart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, sessionStart_args> {
public sessionStart() {
super("sessionStart");
}
protected sessionStart_args getEmptyArgsInstance() {
return new sessionStart_args();
}
protected sessionStart_result getResult(I iface, sessionStart_args args) throws org.apache.thrift.TException {
sessionStart_result result = new sessionStart_result();
result.success = iface.sessionStart(args.info);
return result;
}
}
private static class sessionUpdateInfo<I extends Iface> extends org.apache.thrift.ProcessFunction<I, sessionUpdateInfo_args> {
public sessionUpdateInfo() {
super("sessionUpdateInfo");
}
protected sessionUpdateInfo_args getEmptyArgsInstance() {
return new sessionUpdateInfo_args();
}
protected sessionUpdateInfo_result getResult(I iface, sessionUpdateInfo_args args) throws org.apache.thrift.TException {
sessionUpdateInfo_result result = new sessionUpdateInfo_result();
try {
iface.sessionUpdateInfo(args.handle, args.info);
} catch (InvalidSessionHandle e) {
result.e = e;
}
return result;
}
}
private static class sessionEnd<I extends Iface> extends org.apache.thrift.ProcessFunction<I, sessionEnd_args> {
public sessionEnd() {
super("sessionEnd");
}
protected sessionEnd_args getEmptyArgsInstance() {
return new sessionEnd_args();
}
protected sessionEnd_result getResult(I iface, sessionEnd_args args) throws org.apache.thrift.TException {
sessionEnd_result result = new sessionEnd_result();
try {
iface.sessionEnd(args.handle, args.status);
} catch (InvalidSessionHandle e) {
result.e = e;
}
return result;
}
}
private static class sessionHeartbeat<I extends Iface> extends org.apache.thrift.ProcessFunction<I, sessionHeartbeat_args> {
public sessionHeartbeat() {
super("sessionHeartbeat");
}
protected sessionHeartbeat_args getEmptyArgsInstance() {
return new sessionHeartbeat_args();
}
protected sessionHeartbeat_result getResult(I iface, sessionHeartbeat_args args) throws org.apache.thrift.TException {
sessionHeartbeat_result result = new sessionHeartbeat_result();
try {
iface.sessionHeartbeat(args.handle);
} catch (InvalidSessionHandle e) {
result.e = e;
}
return result;
}
}
private static class requestResource<I extends Iface> extends org.apache.thrift.ProcessFunction<I, requestResource_args> {
public requestResource() {
super("requestResource");
}
protected requestResource_args getEmptyArgsInstance() {
return new requestResource_args();
}
protected requestResource_result getResult(I iface, requestResource_args args) throws org.apache.thrift.TException {
requestResource_result result = new requestResource_result();
try {
iface.requestResource(args.handle, args.requestList);
} catch (InvalidSessionHandle e) {
result.e = e;
}
return result;
}
}
private static class releaseResource<I extends Iface> extends org.apache.thrift.ProcessFunction<I, releaseResource_args> {
public releaseResource() {
super("releaseResource");
}
protected releaseResource_args getEmptyArgsInstance() {
return new releaseResource_args();
}
protected releaseResource_result getResult(I iface, releaseResource_args args) throws org.apache.thrift.TException {
releaseResource_result result = new releaseResource_result();
try {
iface.releaseResource(args.handle, args.idList);
} catch (InvalidSessionHandle e) {
result.e = e;
}
return result;
}
}
private static class nodeHeartbeat<I extends Iface> extends org.apache.thrift.ProcessFunction<I, nodeHeartbeat_args> {
public nodeHeartbeat() {
super("nodeHeartbeat");
}
protected nodeHeartbeat_args getEmptyArgsInstance() {
return new nodeHeartbeat_args();
}
protected nodeHeartbeat_result getResult(I iface, nodeHeartbeat_args args) throws org.apache.thrift.TException {
nodeHeartbeat_result result = new nodeHeartbeat_result();
iface.nodeHeartbeat(args.node);
return result;
}
}
}
public static class sessionStart_args implements org.apache.thrift.TBase<sessionStart_args, sessionStart_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sessionStart_args");
private static final org.apache.thrift.protocol.TField INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("info", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public SessionInfo info; // 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 {
INFO((short)1, "info");
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: // INFO
return INFO;
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.INFO, new org.apache.thrift.meta_data.FieldMetaData("info", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SessionInfo.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sessionStart_args.class, metaDataMap);
}
public sessionStart_args() {
}
public sessionStart_args(
SessionInfo info)
{
this();
this.info = info;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public sessionStart_args(sessionStart_args other) {
if (other.isSetInfo()) {
this.info = new SessionInfo(other.info);
}
}
public sessionStart_args deepCopy() {
return new sessionStart_args(this);
}
@Override
public void clear() {
this.info = null;
}
public SessionInfo getInfo() {
return this.info;
}
public sessionStart_args setInfo(SessionInfo info) {
this.info = info;
return this;
}
public void unsetInfo() {
this.info = null;
}
/** Returns true if field info is set (has been assigned a value) and false otherwise */
public boolean isSetInfo() {
return this.info != null;
}
public void setInfoIsSet(boolean value) {
if (!value) {
this.info = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case INFO:
if (value == null) {
unsetInfo();
} else {
setInfo((SessionInfo)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case INFO:
return getInfo();
}
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 INFO:
return isSetInfo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sessionStart_args)
return this.equals((sessionStart_args)that);
return false;
}
public boolean equals(sessionStart_args that) {
if (that == null)
return false;
boolean this_present_info = true && this.isSetInfo();
boolean that_present_info = true && that.isSetInfo();
if (this_present_info || that_present_info) {
if (!(this_present_info && that_present_info))
return false;
if (!this.info.equals(that.info))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(sessionStart_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
sessionStart_args typedOther = (sessionStart_args)other;
lastComparison = Boolean.valueOf(isSetInfo()).compareTo(typedOther.isSetInfo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetInfo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.info, typedOther.info);
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: // INFO
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.info = new SessionInfo();
this.info.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.info != null) {
oprot.writeFieldBegin(INFO_FIELD_DESC);
this.info.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("sessionStart_args(");
boolean first = true;
sb.append("info:");
if (this.info == null) {
sb.append("null");
} else {
sb.append(this.info);
}
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 sessionStart_result implements org.apache.thrift.TBase<sessionStart_result, sessionStart_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sessionStart_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);
public SessionRegistrationData success; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SessionRegistrationData.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sessionStart_result.class, metaDataMap);
}
public sessionStart_result() {
}
public sessionStart_result(
SessionRegistrationData success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public sessionStart_result(sessionStart_result other) {
if (other.isSetSuccess()) {
this.success = new SessionRegistrationData(other.success);
}
}
public sessionStart_result deepCopy() {
return new sessionStart_result(this);
}
@Override
public void clear() {
this.success = null;
}
public SessionRegistrationData getSuccess() {
return this.success;
}
public sessionStart_result setSuccess(SessionRegistrationData success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((SessionRegistrationData)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sessionStart_result)
return this.equals((sessionStart_result)that);
return false;
}
public boolean equals(sessionStart_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(sessionStart_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
sessionStart_result typedOther = (sessionStart_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
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 SessionRegistrationData();
this.success.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();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("sessionStart_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 sessionUpdateInfo_args implements org.apache.thrift.TBase<sessionUpdateInfo_args, sessionUpdateInfo_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sessionUpdateInfo_args");
private static final org.apache.thrift.protocol.TField HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("handle", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("info", org.apache.thrift.protocol.TType.STRUCT, (short)2);
public String handle; // required
public SessionInfo info; // 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"),
INFO((short)2, "info");
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: // INFO
return INFO;
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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "SessionHandle")));
tmpMap.put(_Fields.INFO, new org.apache.thrift.meta_data.FieldMetaData("info", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SessionInfo.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sessionUpdateInfo_args.class, metaDataMap);
}
public sessionUpdateInfo_args() {
}
public sessionUpdateInfo_args(
String handle,
SessionInfo info)
{
this();
this.handle = handle;
this.info = info;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public sessionUpdateInfo_args(sessionUpdateInfo_args other) {
if (other.isSetHandle()) {
this.handle = other.handle;
}
if (other.isSetInfo()) {
this.info = new SessionInfo(other.info);
}
}
public sessionUpdateInfo_args deepCopy() {
return new sessionUpdateInfo_args(this);
}
@Override
public void clear() {
this.handle = null;
this.info = null;
}
public String getHandle() {
return this.handle;
}
public sessionUpdateInfo_args setHandle(String 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 SessionInfo getInfo() {
return this.info;
}
public sessionUpdateInfo_args setInfo(SessionInfo info) {
this.info = info;
return this;
}
public void unsetInfo() {
this.info = null;
}
/** Returns true if field info is set (has been assigned a value) and false otherwise */
public boolean isSetInfo() {
return this.info != null;
}
public void setInfoIsSet(boolean value) {
if (!value) {
this.info = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case HANDLE:
if (value == null) {
unsetHandle();
} else {
setHandle((String)value);
}
break;
case INFO:
if (value == null) {
unsetInfo();
} else {
setInfo((SessionInfo)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case HANDLE:
return getHandle();
case INFO:
return getInfo();
}
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 INFO:
return isSetInfo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sessionUpdateInfo_args)
return this.equals((sessionUpdateInfo_args)that);
return false;
}
public boolean equals(sessionUpdateInfo_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_info = true && this.isSetInfo();
boolean that_present_info = true && that.isSetInfo();
if (this_present_info || that_present_info) {
if (!(this_present_info && that_present_info))
return false;
if (!this.info.equals(that.info))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(sessionUpdateInfo_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
sessionUpdateInfo_args typedOther = (sessionUpdateInfo_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(isSetInfo()).compareTo(typedOther.isSetInfo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetInfo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.info, typedOther.info);
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.STRING) {
this.handle = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // INFO
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.info = new SessionInfo();
this.info.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.handle != null) {
oprot.writeFieldBegin(HANDLE_FIELD_DESC);
oprot.writeString(this.handle);
oprot.writeFieldEnd();
}
if (this.info != null) {
oprot.writeFieldBegin(INFO_FIELD_DESC);
this.info.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("sessionUpdateInfo_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("info:");
if (this.info == null) {
sb.append("null");
} else {
sb.append(this.info);
}
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 sessionUpdateInfo_result implements org.apache.thrift.TBase<sessionUpdateInfo_result, sessionUpdateInfo_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sessionUpdateInfo_result");
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public InvalidSessionHandle e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sessionUpdateInfo_result.class, metaDataMap);
}
public sessionUpdateInfo_result() {
}
public sessionUpdateInfo_result(
InvalidSessionHandle e)
{
this();
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public sessionUpdateInfo_result(sessionUpdateInfo_result other) {
if (other.isSetE()) {
this.e = new InvalidSessionHandle(other.e);
}
}
public sessionUpdateInfo_result deepCopy() {
return new sessionUpdateInfo_result(this);
}
@Override
public void clear() {
this.e = null;
}
public InvalidSessionHandle getE() {
return this.e;
}
public sessionUpdateInfo_result setE(InvalidSessionHandle e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case E:
if (value == null) {
unsetE();
} else {
setE((InvalidSessionHandle)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sessionUpdateInfo_result)
return this.equals((sessionUpdateInfo_result)that);
return false;
}
public boolean equals(sessionUpdateInfo_result that) {
if (that == null)
return false;
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(sessionUpdateInfo_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
sessionUpdateInfo_result typedOther = (sessionUpdateInfo_result)other;
lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
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: // E
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.e = new InvalidSessionHandle();
this.e.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.isSetE()) {
oprot.writeFieldBegin(E_FIELD_DESC);
this.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("sessionUpdateInfo_result(");
boolean first = true;
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 sessionEnd_args implements org.apache.thrift.TBase<sessionEnd_args, sessionEnd_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sessionEnd_args");
private static final org.apache.thrift.protocol.TField HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("handle", org.apache.thrift.protocol.TType.STRING, (short)1);
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)2);
public String handle; // required
/**
*
* @see SessionStatus
*/
public SessionStatus 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 {
HANDLE((short)1, "handle"),
/**
*
* @see SessionStatus
*/
STATUS((short)2, "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: // HANDLE
return HANDLE;
case 2: // 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
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.HANDLE, new org.apache.thrift.meta_data.FieldMetaData("handle", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "SessionHandle")));
tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SessionStatus.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sessionEnd_args.class, metaDataMap);
}
public sessionEnd_args() {
}
public sessionEnd_args(
String handle,
SessionStatus status)
{
this();
this.handle = handle;
this.status = status;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public sessionEnd_args(sessionEnd_args other) {
if (other.isSetHandle()) {
this.handle = other.handle;
}
if (other.isSetStatus()) {
this.status = other.status;
}
}
public sessionEnd_args deepCopy() {
return new sessionEnd_args(this);
}
@Override
public void clear() {
this.handle = null;
this.status = null;
}
public String getHandle() {
return this.handle;
}
public sessionEnd_args setHandle(String 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;
}
}
/**
*
* @see SessionStatus
*/
public SessionStatus getStatus() {
return this.status;
}
/**
*
* @see SessionStatus
*/
public sessionEnd_args setStatus(SessionStatus status) {
this.status = status;
return this;
}
public void unsetStatus() {
this.status = null;
}
/** Returns true if field status is set (has been assigned a value) and false otherwise */
public boolean isSetStatus() {
return this.status != null;
}
public void setStatusIsSet(boolean value) {
if (!value) {
this.status = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case HANDLE:
if (value == null) {
unsetHandle();
} else {
setHandle((String)value);
}
break;
case STATUS:
if (value == null) {
unsetStatus();
} else {
setStatus((SessionStatus)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case HANDLE:
return getHandle();
case STATUS:
return 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 HANDLE:
return isSetHandle();
case STATUS:
return isSetStatus();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sessionEnd_args)
return this.equals((sessionEnd_args)that);
return false;
}
public boolean equals(sessionEnd_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_status = true && this.isSetStatus();
boolean that_present_status = true && that.isSetStatus();
if (this_present_status || that_present_status) {
if (!(this_present_status && that_present_status))
return false;
if (!this.status.equals(that.status))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(sessionEnd_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
sessionEnd_args typedOther = (sessionEnd_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(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: // HANDLE
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.handle = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // STATUS
if (field.type == org.apache.thrift.protocol.TType.I32) {
this.status = SessionStatus.findByValue(iprot.readI32());
} 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);
oprot.writeString(this.handle);
oprot.writeFieldEnd();
}
if (this.status != null) {
oprot.writeFieldBegin(STATUS_FIELD_DESC);
oprot.writeI32(this.status.getValue());
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("sessionEnd_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("status:");
if (this.status == null) {
sb.append("null");
} else {
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 {
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 sessionEnd_result implements org.apache.thrift.TBase<sessionEnd_result, sessionEnd_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sessionEnd_result");
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public InvalidSessionHandle e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sessionEnd_result.class, metaDataMap);
}
public sessionEnd_result() {
}
public sessionEnd_result(
InvalidSessionHandle e)
{
this();
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public sessionEnd_result(sessionEnd_result other) {
if (other.isSetE()) {
this.e = new InvalidSessionHandle(other.e);
}
}
public sessionEnd_result deepCopy() {
return new sessionEnd_result(this);
}
@Override
public void clear() {
this.e = null;
}
public InvalidSessionHandle getE() {
return this.e;
}
public sessionEnd_result setE(InvalidSessionHandle e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case E:
if (value == null) {
unsetE();
} else {
setE((InvalidSessionHandle)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sessionEnd_result)
return this.equals((sessionEnd_result)that);
return false;
}
public boolean equals(sessionEnd_result that) {
if (that == null)
return false;
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(sessionEnd_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
sessionEnd_result typedOther = (sessionEnd_result)other;
lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
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: // E
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.e = new InvalidSessionHandle();
this.e.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.isSetE()) {
oprot.writeFieldBegin(E_FIELD_DESC);
this.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("sessionEnd_result(");
boolean first = true;
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 sessionHeartbeat_args implements org.apache.thrift.TBase<sessionHeartbeat_args, sessionHeartbeat_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sessionHeartbeat_args");
private static final org.apache.thrift.protocol.TField HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("handle", org.apache.thrift.protocol.TType.STRING, (short)1);
public String handle; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
HANDLE((short)1, "handle");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // HANDLE
return HANDLE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.HANDLE, new org.apache.thrift.meta_data.FieldMetaData("handle", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "SessionHandle")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sessionHeartbeat_args.class, metaDataMap);
}
public sessionHeartbeat_args() {
}
public sessionHeartbeat_args(
String handle)
{
this();
this.handle = handle;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public sessionHeartbeat_args(sessionHeartbeat_args other) {
if (other.isSetHandle()) {
this.handle = other.handle;
}
}
public sessionHeartbeat_args deepCopy() {
return new sessionHeartbeat_args(this);
}
@Override
public void clear() {
this.handle = null;
}
public String getHandle() {
return this.handle;
}
public sessionHeartbeat_args setHandle(String 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 void setFieldValue(_Fields field, Object value) {
switch (field) {
case HANDLE:
if (value == null) {
unsetHandle();
} else {
setHandle((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case HANDLE:
return getHandle();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case HANDLE:
return isSetHandle();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sessionHeartbeat_args)
return this.equals((sessionHeartbeat_args)that);
return false;
}
public boolean equals(sessionHeartbeat_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;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(sessionHeartbeat_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
sessionHeartbeat_args typedOther = (sessionHeartbeat_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;
}
}
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.STRING) {
this.handle = 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);
oprot.writeString(this.handle);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("sessionHeartbeat_args(");
boolean first = true;
sb.append("handle:");
if (this.handle == null) {
sb.append("null");
} else {
sb.append(this.handle);
}
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 sessionHeartbeat_result implements org.apache.thrift.TBase<sessionHeartbeat_result, sessionHeartbeat_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sessionHeartbeat_result");
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public InvalidSessionHandle e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sessionHeartbeat_result.class, metaDataMap);
}
public sessionHeartbeat_result() {
}
public sessionHeartbeat_result(
InvalidSessionHandle e)
{
this();
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public sessionHeartbeat_result(sessionHeartbeat_result other) {
if (other.isSetE()) {
this.e = new InvalidSessionHandle(other.e);
}
}
public sessionHeartbeat_result deepCopy() {
return new sessionHeartbeat_result(this);
}
@Override
public void clear() {
this.e = null;
}
public InvalidSessionHandle getE() {
return this.e;
}
public sessionHeartbeat_result setE(InvalidSessionHandle e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case E:
if (value == null) {
unsetE();
} else {
setE((InvalidSessionHandle)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sessionHeartbeat_result)
return this.equals((sessionHeartbeat_result)that);
return false;
}
public boolean equals(sessionHeartbeat_result that) {
if (that == null)
return false;
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(sessionHeartbeat_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
sessionHeartbeat_result typedOther = (sessionHeartbeat_result)other;
lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
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: // E
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.e = new InvalidSessionHandle();
this.e.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.isSetE()) {
oprot.writeFieldBegin(E_FIELD_DESC);
this.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("sessionHeartbeat_result(");
boolean first = true;
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 requestResource_args implements org.apache.thrift.TBase<requestResource_args, requestResource_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestResource_args");
private static final org.apache.thrift.protocol.TField HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("handle", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField REQUEST_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("requestList", org.apache.thrift.protocol.TType.LIST, (short)2);
public String handle; // required
public List<ResourceRequest> requestList; // 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"),
REQUEST_LIST((short)2, "requestList");
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: // REQUEST_LIST
return REQUEST_LIST;
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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "SessionHandle")));
tmpMap.put(_Fields.REQUEST_LIST, new org.apache.thrift.meta_data.FieldMetaData("requestList", 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, ResourceRequest.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestResource_args.class, metaDataMap);
}
public requestResource_args() {
}
public requestResource_args(
String handle,
List<ResourceRequest> requestList)
{
this();
this.handle = handle;
this.requestList = requestList;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public requestResource_args(requestResource_args other) {
if (other.isSetHandle()) {
this.handle = other.handle;
}
if (other.isSetRequestList()) {
List<ResourceRequest> __this__requestList = new ArrayList<ResourceRequest>();
for (ResourceRequest other_element : other.requestList) {
__this__requestList.add(new ResourceRequest(other_element));
}
this.requestList = __this__requestList;
}
}
public requestResource_args deepCopy() {
return new requestResource_args(this);
}
@Override
public void clear() {
this.handle = null;
this.requestList = null;
}
public String getHandle() {
return this.handle;
}
public requestResource_args setHandle(String 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 int getRequestListSize() {
return (this.requestList == null) ? 0 : this.requestList.size();
}
public java.util.Iterator<ResourceRequest> getRequestListIterator() {
return (this.requestList == null) ? null : this.requestList.iterator();
}
public void addToRequestList(ResourceRequest elem) {
if (this.requestList == null) {
this.requestList = new ArrayList<ResourceRequest>();
}
this.requestList.add(elem);
}
public List<ResourceRequest> getRequestList() {
return this.requestList;
}
public requestResource_args setRequestList(List<ResourceRequest> requestList) {
this.requestList = requestList;
return this;
}
public void unsetRequestList() {
this.requestList = null;
}
/** Returns true if field requestList is set (has been assigned a value) and false otherwise */
public boolean isSetRequestList() {
return this.requestList != null;
}
public void setRequestListIsSet(boolean value) {
if (!value) {
this.requestList = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case HANDLE:
if (value == null) {
unsetHandle();
} else {
setHandle((String)value);
}
break;
case REQUEST_LIST:
if (value == null) {
unsetRequestList();
} else {
setRequestList((List<ResourceRequest>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case HANDLE:
return getHandle();
case REQUEST_LIST:
return getRequestList();
}
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 REQUEST_LIST:
return isSetRequestList();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof requestResource_args)
return this.equals((requestResource_args)that);
return false;
}
public boolean equals(requestResource_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_requestList = true && this.isSetRequestList();
boolean that_present_requestList = true && that.isSetRequestList();
if (this_present_requestList || that_present_requestList) {
if (!(this_present_requestList && that_present_requestList))
return false;
if (!this.requestList.equals(that.requestList))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(requestResource_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
requestResource_args typedOther = (requestResource_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(isSetRequestList()).compareTo(typedOther.isSetRequestList());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRequestList()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestList, typedOther.requestList);
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.STRING) {
this.handle = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // REQUEST_LIST
if (field.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
this.requestList = new ArrayList<ResourceRequest>(_list20.size);
for (int _i21 = 0; _i21 < _list20.size; ++_i21)
{
ResourceRequest _elem22; // required
_elem22 = new ResourceRequest();
_elem22.read(iprot);
this.requestList.add(_elem22);
}
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.handle != null) {
oprot.writeFieldBegin(HANDLE_FIELD_DESC);
oprot.writeString(this.handle);
oprot.writeFieldEnd();
}
if (this.requestList != null) {
oprot.writeFieldBegin(REQUEST_LIST_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.requestList.size()));
for (ResourceRequest _iter23 : this.requestList)
{
_iter23.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("requestResource_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("requestList:");
if (this.requestList == null) {
sb.append("null");
} else {
sb.append(this.requestList);
}
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 requestResource_result implements org.apache.thrift.TBase<requestResource_result, requestResource_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestResource_result");
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public InvalidSessionHandle e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestResource_result.class, metaDataMap);
}
public requestResource_result() {
}
public requestResource_result(
InvalidSessionHandle e)
{
this();
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public requestResource_result(requestResource_result other) {
if (other.isSetE()) {
this.e = new InvalidSessionHandle(other.e);
}
}
public requestResource_result deepCopy() {
return new requestResource_result(this);
}
@Override
public void clear() {
this.e = null;
}
public InvalidSessionHandle getE() {
return this.e;
}
public requestResource_result setE(InvalidSessionHandle e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case E:
if (value == null) {
unsetE();
} else {
setE((InvalidSessionHandle)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof requestResource_result)
return this.equals((requestResource_result)that);
return false;
}
public boolean equals(requestResource_result that) {
if (that == null)
return false;
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(requestResource_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
requestResource_result typedOther = (requestResource_result)other;
lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
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: // E
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.e = new InvalidSessionHandle();
this.e.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.isSetE()) {
oprot.writeFieldBegin(E_FIELD_DESC);
this.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("requestResource_result(");
boolean first = true;
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 releaseResource_args implements org.apache.thrift.TBase<releaseResource_args, releaseResource_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("releaseResource_args");
private static final org.apache.thrift.protocol.TField HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("handle", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField ID_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("idList", org.apache.thrift.protocol.TType.LIST, (short)2);
public String handle; // required
public List<Integer> idList; // 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"),
ID_LIST((short)2, "idList");
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: // ID_LIST
return ID_LIST;
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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "SessionHandle")));
tmpMap.put(_Fields.ID_LIST, new org.apache.thrift.meta_data.FieldMetaData("idList", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "ResourceRequestId"))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(releaseResource_args.class, metaDataMap);
}
public releaseResource_args() {
}
public releaseResource_args(
String handle,
List<Integer> idList)
{
this();
this.handle = handle;
this.idList = idList;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public releaseResource_args(releaseResource_args other) {
if (other.isSetHandle()) {
this.handle = other.handle;
}
if (other.isSetIdList()) {
List<Integer> __this__idList = new ArrayList<Integer>();
for (Integer other_element : other.idList) {
__this__idList.add(other_element);
}
this.idList = __this__idList;
}
}
public releaseResource_args deepCopy() {
return new releaseResource_args(this);
}
@Override
public void clear() {
this.handle = null;
this.idList = null;
}
public String getHandle() {
return this.handle;
}
public releaseResource_args setHandle(String 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 int getIdListSize() {
return (this.idList == null) ? 0 : this.idList.size();
}
public java.util.Iterator<Integer> getIdListIterator() {
return (this.idList == null) ? null : this.idList.iterator();
}
public void addToIdList(int elem) {
if (this.idList == null) {
this.idList = new ArrayList<Integer>();
}
this.idList.add(elem);
}
public List<Integer> getIdList() {
return this.idList;
}
public releaseResource_args setIdList(List<Integer> idList) {
this.idList = idList;
return this;
}
public void unsetIdList() {
this.idList = null;
}
/** Returns true if field idList is set (has been assigned a value) and false otherwise */
public boolean isSetIdList() {
return this.idList != null;
}
public void setIdListIsSet(boolean value) {
if (!value) {
this.idList = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case HANDLE:
if (value == null) {
unsetHandle();
} else {
setHandle((String)value);
}
break;
case ID_LIST:
if (value == null) {
unsetIdList();
} else {
setIdList((List<Integer>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case HANDLE:
return getHandle();
case ID_LIST:
return getIdList();
}
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 ID_LIST:
return isSetIdList();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof releaseResource_args)
return this.equals((releaseResource_args)that);
return false;
}
public boolean equals(releaseResource_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_idList = true && this.isSetIdList();
boolean that_present_idList = true && that.isSetIdList();
if (this_present_idList || that_present_idList) {
if (!(this_present_idList && that_present_idList))
return false;
if (!this.idList.equals(that.idList))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(releaseResource_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
releaseResource_args typedOther = (releaseResource_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(isSetIdList()).compareTo(typedOther.isSetIdList());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIdList()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.idList, typedOther.idList);
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.STRING) {
this.handle = iprot.readString();
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // ID_LIST
if (field.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
this.idList = new ArrayList<Integer>(_list24.size);
for (int _i25 = 0; _i25 < _list24.size; ++_i25)
{
int _elem26; // required
_elem26 = iprot.readI32();
this.idList.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.handle != null) {
oprot.writeFieldBegin(HANDLE_FIELD_DESC);
oprot.writeString(this.handle);
oprot.writeFieldEnd();
}
if (this.idList != null) {
oprot.writeFieldBegin(ID_LIST_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.idList.size()));
for (int _iter27 : this.idList)
{
oprot.writeI32(_iter27);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("releaseResource_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("idList:");
if (this.idList == null) {
sb.append("null");
} else {
sb.append(this.idList);
}
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 releaseResource_result implements org.apache.thrift.TBase<releaseResource_result, releaseResource_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("releaseResource_result");
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public InvalidSessionHandle e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(releaseResource_result.class, metaDataMap);
}
public releaseResource_result() {
}
public releaseResource_result(
InvalidSessionHandle e)
{
this();
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public releaseResource_result(releaseResource_result other) {
if (other.isSetE()) {
this.e = new InvalidSessionHandle(other.e);
}
}
public releaseResource_result deepCopy() {
return new releaseResource_result(this);
}
@Override
public void clear() {
this.e = null;
}
public InvalidSessionHandle getE() {
return this.e;
}
public releaseResource_result setE(InvalidSessionHandle e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case E:
if (value == null) {
unsetE();
} else {
setE((InvalidSessionHandle)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof releaseResource_result)
return this.equals((releaseResource_result)that);
return false;
}
public boolean equals(releaseResource_result that) {
if (that == null)
return false;
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(releaseResource_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
releaseResource_result typedOther = (releaseResource_result)other;
lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
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: // E
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.e = new InvalidSessionHandle();
this.e.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.isSetE()) {
oprot.writeFieldBegin(E_FIELD_DESC);
this.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("releaseResource_result(");
boolean first = true;
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 nodeHeartbeat_args implements org.apache.thrift.TBase<nodeHeartbeat_args, nodeHeartbeat_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("nodeHeartbeat_args");
private static final org.apache.thrift.protocol.TField NODE_FIELD_DESC = new org.apache.thrift.protocol.TField("node", org.apache.thrift.protocol.TType.STRUCT, (short)1);
public ClusterNodeInfo node; // 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 {
NODE((short)1, "node");
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: // NODE
return NODE;
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.NODE, new org.apache.thrift.meta_data.FieldMetaData("node", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ClusterNodeInfo.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(nodeHeartbeat_args.class, metaDataMap);
}
public nodeHeartbeat_args() {
}
public nodeHeartbeat_args(
ClusterNodeInfo node)
{
this();
this.node = node;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public nodeHeartbeat_args(nodeHeartbeat_args other) {
if (other.isSetNode()) {
this.node = new ClusterNodeInfo(other.node);
}
}
public nodeHeartbeat_args deepCopy() {
return new nodeHeartbeat_args(this);
}
@Override
public void clear() {
this.node = null;
}
public ClusterNodeInfo getNode() {
return this.node;
}
public nodeHeartbeat_args setNode(ClusterNodeInfo node) {
this.node = node;
return this;
}
public void unsetNode() {
this.node = null;
}
/** Returns true if field node is set (has been assigned a value) and false otherwise */
public boolean isSetNode() {
return this.node != null;
}
public void setNodeIsSet(boolean value) {
if (!value) {
this.node = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case NODE:
if (value == null) {
unsetNode();
} else {
setNode((ClusterNodeInfo)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case NODE:
return getNode();
}
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 NODE:
return isSetNode();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof nodeHeartbeat_args)
return this.equals((nodeHeartbeat_args)that);
return false;
}
public boolean equals(nodeHeartbeat_args that) {
if (that == null)
return false;
boolean this_present_node = true && this.isSetNode();
boolean that_present_node = true && that.isSetNode();
if (this_present_node || that_present_node) {
if (!(this_present_node && that_present_node))
return false;
if (!this.node.equals(that.node))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(nodeHeartbeat_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
nodeHeartbeat_args typedOther = (nodeHeartbeat_args)other;
lastComparison = Boolean.valueOf(isSetNode()).compareTo(typedOther.isSetNode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNode()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.node, typedOther.node);
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: // NODE
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.node = new ClusterNodeInfo();
this.node.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.node != null) {
oprot.writeFieldBegin(NODE_FIELD_DESC);
this.node.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("nodeHeartbeat_args(");
boolean first = true;
sb.append("node:");
if (this.node == null) {
sb.append("null");
} else {
sb.append(this.node);
}
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 nodeHeartbeat_result implements org.apache.thrift.TBase<nodeHeartbeat_result, nodeHeartbeat_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("nodeHeartbeat_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(nodeHeartbeat_result.class, metaDataMap);
}
public nodeHeartbeat_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public nodeHeartbeat_result(nodeHeartbeat_result other) {
}
public nodeHeartbeat_result deepCopy() {
return new nodeHeartbeat_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 nodeHeartbeat_result)
return this.equals((nodeHeartbeat_result)that);
return false;
}
public boolean equals(nodeHeartbeat_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(nodeHeartbeat_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
nodeHeartbeat_result typedOther = (nodeHeartbeat_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("nodeHeartbeat_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);
}
}
}
}