/** * Autogenerated by Thrift Compiler (0.9.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package net.lag.kestrel.thrift; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; import org.apache.thrift.async.AsyncMethodCallback; import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class Kestrel { public interface Iface { public int put(String queue_name, List<ByteBuffer> items, int expiration_msec) throws org.apache.thrift.TException; public List<Item> get(String queue_name, int max_items, int timeout_msec, int auto_abort_msec) throws org.apache.thrift.TException; public int confirm(String queue_name, Set<Long> ids) throws org.apache.thrift.TException; public int abort(String queue_name, Set<Long> ids) throws org.apache.thrift.TException; public QueueInfo peek(String queue_name) throws org.apache.thrift.TException; public void flush_queue(String queue_name) throws org.apache.thrift.TException; public void flush_all_queues() throws org.apache.thrift.TException; public void delete_queue(String queue_name) throws org.apache.thrift.TException; public Status current_status() throws org.apache.thrift.TException; public void set_status(Status status) throws org.apache.thrift.TException; public String get_version() throws org.apache.thrift.TException; } public interface AsyncIface { public void put(String queue_name, List<ByteBuffer> items, int expiration_msec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void get(String queue_name, int max_items, int timeout_msec, int auto_abort_msec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void confirm(String queue_name, Set<Long> ids, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void abort(String queue_name, Set<Long> ids, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void peek(String queue_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void flush_queue(String queue_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void flush_all_queues(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void delete_queue(String queue_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void current_status(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void set_status(Status status, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void get_version(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> { public Factory() {} public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } public Client(org.apache.thrift.protocol.TProtocol prot) { super(prot, prot); } public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { super(iprot, oprot); } public int put(String queue_name, List<ByteBuffer> items, int expiration_msec) throws org.apache.thrift.TException { send_put(queue_name, items, expiration_msec); return recv_put(); } public void send_put(String queue_name, List<ByteBuffer> items, int expiration_msec) throws org.apache.thrift.TException { put_args args = new put_args(); args.set_queue_name(queue_name); args.set_items(items); args.set_expiration_msec(expiration_msec); sendBase("put", args); } public int recv_put() throws org.apache.thrift.TException { put_result result = new put_result(); receiveBase(result, "put"); if (result.is_set_success()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "put failed: unknown result"); } public List<Item> get(String queue_name, int max_items, int timeout_msec, int auto_abort_msec) throws org.apache.thrift.TException { send_get(queue_name, max_items, timeout_msec, auto_abort_msec); return recv_get(); } public void send_get(String queue_name, int max_items, int timeout_msec, int auto_abort_msec) throws org.apache.thrift.TException { get_args args = new get_args(); args.set_queue_name(queue_name); args.set_max_items(max_items); args.set_timeout_msec(timeout_msec); args.set_auto_abort_msec(auto_abort_msec); sendBase("get", args); } public List<Item> recv_get() throws org.apache.thrift.TException { get_result result = new get_result(); receiveBase(result, "get"); if (result.is_set_success()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get failed: unknown result"); } public int confirm(String queue_name, Set<Long> ids) throws org.apache.thrift.TException { send_confirm(queue_name, ids); return recv_confirm(); } public void send_confirm(String queue_name, Set<Long> ids) throws org.apache.thrift.TException { confirm_args args = new confirm_args(); args.set_queue_name(queue_name); args.set_ids(ids); sendBase("confirm", args); } public int recv_confirm() throws org.apache.thrift.TException { confirm_result result = new confirm_result(); receiveBase(result, "confirm"); if (result.is_set_success()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "confirm failed: unknown result"); } public int abort(String queue_name, Set<Long> ids) throws org.apache.thrift.TException { send_abort(queue_name, ids); return recv_abort(); } public void send_abort(String queue_name, Set<Long> ids) throws org.apache.thrift.TException { abort_args args = new abort_args(); args.set_queue_name(queue_name); args.set_ids(ids); sendBase("abort", args); } public int recv_abort() throws org.apache.thrift.TException { abort_result result = new abort_result(); receiveBase(result, "abort"); if (result.is_set_success()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "abort failed: unknown result"); } public QueueInfo peek(String queue_name) throws org.apache.thrift.TException { send_peek(queue_name); return recv_peek(); } public void send_peek(String queue_name) throws org.apache.thrift.TException { peek_args args = new peek_args(); args.set_queue_name(queue_name); sendBase("peek", args); } public QueueInfo recv_peek() throws org.apache.thrift.TException { peek_result result = new peek_result(); receiveBase(result, "peek"); if (result.is_set_success()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "peek failed: unknown result"); } public void flush_queue(String queue_name) throws org.apache.thrift.TException { send_flush_queue(queue_name); recv_flush_queue(); } public void send_flush_queue(String queue_name) throws org.apache.thrift.TException { flush_queue_args args = new flush_queue_args(); args.set_queue_name(queue_name); sendBase("flush_queue", args); } public void recv_flush_queue() throws org.apache.thrift.TException { flush_queue_result result = new flush_queue_result(); receiveBase(result, "flush_queue"); return; } public void flush_all_queues() throws org.apache.thrift.TException { send_flush_all_queues(); recv_flush_all_queues(); } public void send_flush_all_queues() throws org.apache.thrift.TException { flush_all_queues_args args = new flush_all_queues_args(); sendBase("flush_all_queues", args); } public void recv_flush_all_queues() throws org.apache.thrift.TException { flush_all_queues_result result = new flush_all_queues_result(); receiveBase(result, "flush_all_queues"); return; } public void delete_queue(String queue_name) throws org.apache.thrift.TException { send_delete_queue(queue_name); recv_delete_queue(); } public void send_delete_queue(String queue_name) throws org.apache.thrift.TException { delete_queue_args args = new delete_queue_args(); args.set_queue_name(queue_name); sendBase("delete_queue", args); } public void recv_delete_queue() throws org.apache.thrift.TException { delete_queue_result result = new delete_queue_result(); receiveBase(result, "delete_queue"); return; } public Status current_status() throws org.apache.thrift.TException { send_current_status(); return recv_current_status(); } public void send_current_status() throws org.apache.thrift.TException { current_status_args args = new current_status_args(); sendBase("current_status", args); } public Status recv_current_status() throws org.apache.thrift.TException { current_status_result result = new current_status_result(); receiveBase(result, "current_status"); if (result.is_set_success()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "current_status failed: unknown result"); } public void set_status(Status status) throws org.apache.thrift.TException { send_set_status(status); recv_set_status(); } public void send_set_status(Status status) throws org.apache.thrift.TException { set_status_args args = new set_status_args(); args.set_status(status); sendBase("set_status", args); } public void recv_set_status() throws org.apache.thrift.TException { set_status_result result = new set_status_result(); receiveBase(result, "set_status"); return; } public String get_version() throws org.apache.thrift.TException { send_get_version(); return recv_get_version(); } public void send_get_version() throws org.apache.thrift.TException { get_version_args args = new get_version_args(); sendBase("get_version", args); } public String recv_get_version() throws org.apache.thrift.TException { get_version_result result = new get_version_result(); receiveBase(result, "get_version"); if (result.is_set_success()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_version failed: unknown result"); } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> { private org.apache.thrift.async.TAsyncClientManager clientManager; private org.apache.thrift.protocol.TProtocolFactory protocolFactory; public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void put(String queue_name, List<ByteBuffer> items, int expiration_msec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); put_call method_call = new put_call(queue_name, items, expiration_msec, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class put_call extends org.apache.thrift.async.TAsyncMethodCall { private String queue_name; private List<ByteBuffer> items; private int expiration_msec; public put_call(String queue_name, List<ByteBuffer> items, int expiration_msec, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.queue_name = queue_name; this.items = items; this.expiration_msec = expiration_msec; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("put", org.apache.thrift.protocol.TMessageType.CALL, 0)); put_args args = new put_args(); args.set_queue_name(queue_name); args.set_items(items); args.set_expiration_msec(expiration_msec); args.write(prot); prot.writeMessageEnd(); } public int 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_put(); } } public void get(String queue_name, int max_items, int timeout_msec, int auto_abort_msec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_call method_call = new get_call(queue_name, max_items, timeout_msec, auto_abort_msec, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_call extends org.apache.thrift.async.TAsyncMethodCall { private String queue_name; private int max_items; private int timeout_msec; private int auto_abort_msec; public get_call(String queue_name, int max_items, int timeout_msec, int auto_abort_msec, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.queue_name = queue_name; this.max_items = max_items; this.timeout_msec = timeout_msec; this.auto_abort_msec = auto_abort_msec; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_args args = new get_args(); args.set_queue_name(queue_name); args.set_max_items(max_items); args.set_timeout_msec(timeout_msec); args.set_auto_abort_msec(auto_abort_msec); args.write(prot); prot.writeMessageEnd(); } public List<Item> 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_get(); } } public void confirm(String queue_name, Set<Long> ids, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); confirm_call method_call = new confirm_call(queue_name, ids, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class confirm_call extends org.apache.thrift.async.TAsyncMethodCall { private String queue_name; private Set<Long> ids; public confirm_call(String queue_name, Set<Long> ids, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.queue_name = queue_name; this.ids = ids; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("confirm", org.apache.thrift.protocol.TMessageType.CALL, 0)); confirm_args args = new confirm_args(); args.set_queue_name(queue_name); args.set_ids(ids); args.write(prot); prot.writeMessageEnd(); } public int 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_confirm(); } } public void abort(String queue_name, Set<Long> ids, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); abort_call method_call = new abort_call(queue_name, ids, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class abort_call extends org.apache.thrift.async.TAsyncMethodCall { private String queue_name; private Set<Long> ids; public abort_call(String queue_name, Set<Long> ids, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.queue_name = queue_name; this.ids = ids; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("abort", org.apache.thrift.protocol.TMessageType.CALL, 0)); abort_args args = new abort_args(); args.set_queue_name(queue_name); args.set_ids(ids); args.write(prot); prot.writeMessageEnd(); } public int 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_abort(); } } public void peek(String queue_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); peek_call method_call = new peek_call(queue_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class peek_call extends org.apache.thrift.async.TAsyncMethodCall { private String queue_name; public peek_call(String queue_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.queue_name = queue_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("peek", org.apache.thrift.protocol.TMessageType.CALL, 0)); peek_args args = new peek_args(); args.set_queue_name(queue_name); args.write(prot); prot.writeMessageEnd(); } public QueueInfo 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_peek(); } } public void flush_queue(String queue_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); flush_queue_call method_call = new flush_queue_call(queue_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class flush_queue_call extends org.apache.thrift.async.TAsyncMethodCall { private String queue_name; public flush_queue_call(String queue_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.queue_name = queue_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("flush_queue", org.apache.thrift.protocol.TMessageType.CALL, 0)); flush_queue_args args = new flush_queue_args(); args.set_queue_name(queue_name); 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_flush_queue(); } } public void flush_all_queues(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); flush_all_queues_call method_call = new flush_all_queues_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class flush_all_queues_call extends org.apache.thrift.async.TAsyncMethodCall { public flush_all_queues_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("flush_all_queues", org.apache.thrift.protocol.TMessageType.CALL, 0)); flush_all_queues_args args = new flush_all_queues_args(); 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_flush_all_queues(); } } public void delete_queue(String queue_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); delete_queue_call method_call = new delete_queue_call(queue_name, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class delete_queue_call extends org.apache.thrift.async.TAsyncMethodCall { private String queue_name; public delete_queue_call(String queue_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.queue_name = queue_name; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("delete_queue", org.apache.thrift.protocol.TMessageType.CALL, 0)); delete_queue_args args = new delete_queue_args(); args.set_queue_name(queue_name); 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_delete_queue(); } } public void current_status(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); current_status_call method_call = new current_status_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class current_status_call extends org.apache.thrift.async.TAsyncMethodCall { public current_status_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("current_status", org.apache.thrift.protocol.TMessageType.CALL, 0)); current_status_args args = new current_status_args(); args.write(prot); prot.writeMessageEnd(); } public Status 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_current_status(); } } public void set_status(Status status, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); set_status_call method_call = new set_status_call(status, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class set_status_call extends org.apache.thrift.async.TAsyncMethodCall { private Status status; public set_status_call(Status status, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.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("set_status", org.apache.thrift.protocol.TMessageType.CALL, 0)); set_status_args args = new set_status_args(); args.set_status(status); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_set_status(); } } public void get_version(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); get_version_call method_call = new get_version_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_version_call extends org.apache.thrift.async.TAsyncMethodCall { public get_version_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_version", org.apache.thrift.protocol.TMessageType.CALL, 0)); get_version_args args = new get_version_args(); args.write(prot); prot.writeMessageEnd(); } public String getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_version(); } } } public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>())); } protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { super(iface, getProcessMap(processMap)); } private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { processMap.put("put", new put()); processMap.put("get", new get()); processMap.put("confirm", new confirm()); processMap.put("abort", new abort()); processMap.put("peek", new peek()); processMap.put("flush_queue", new flush_queue()); processMap.put("flush_all_queues", new flush_all_queues()); processMap.put("delete_queue", new delete_queue()); processMap.put("current_status", new current_status()); processMap.put("set_status", new set_status()); processMap.put("get_version", new get_version()); return processMap; } public static class put<I extends Iface> extends org.apache.thrift.ProcessFunction<I, put_args> { public put() { super("put"); } public put_args getEmptyArgsInstance() { return new put_args(); } protected boolean isOneway() { return false; } public put_result getResult(I iface, put_args args) throws org.apache.thrift.TException { put_result result = new put_result(); result.success = iface.put(args.queue_name, args.items, args.expiration_msec); result.set_success_isSet(true); return result; } } public static class get<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_args> { public get() { super("get"); } public get_args getEmptyArgsInstance() { return new get_args(); } protected boolean isOneway() { return false; } public get_result getResult(I iface, get_args args) throws org.apache.thrift.TException { get_result result = new get_result(); result.success = iface.get(args.queue_name, args.max_items, args.timeout_msec, args.auto_abort_msec); return result; } } public static class confirm<I extends Iface> extends org.apache.thrift.ProcessFunction<I, confirm_args> { public confirm() { super("confirm"); } public confirm_args getEmptyArgsInstance() { return new confirm_args(); } protected boolean isOneway() { return false; } public confirm_result getResult(I iface, confirm_args args) throws org.apache.thrift.TException { confirm_result result = new confirm_result(); result.success = iface.confirm(args.queue_name, args.ids); result.set_success_isSet(true); return result; } } public static class abort<I extends Iface> extends org.apache.thrift.ProcessFunction<I, abort_args> { public abort() { super("abort"); } public abort_args getEmptyArgsInstance() { return new abort_args(); } protected boolean isOneway() { return false; } public abort_result getResult(I iface, abort_args args) throws org.apache.thrift.TException { abort_result result = new abort_result(); result.success = iface.abort(args.queue_name, args.ids); result.set_success_isSet(true); return result; } } public static class peek<I extends Iface> extends org.apache.thrift.ProcessFunction<I, peek_args> { public peek() { super("peek"); } public peek_args getEmptyArgsInstance() { return new peek_args(); } protected boolean isOneway() { return false; } public peek_result getResult(I iface, peek_args args) throws org.apache.thrift.TException { peek_result result = new peek_result(); result.success = iface.peek(args.queue_name); return result; } } public static class flush_queue<I extends Iface> extends org.apache.thrift.ProcessFunction<I, flush_queue_args> { public flush_queue() { super("flush_queue"); } public flush_queue_args getEmptyArgsInstance() { return new flush_queue_args(); } protected boolean isOneway() { return false; } public flush_queue_result getResult(I iface, flush_queue_args args) throws org.apache.thrift.TException { flush_queue_result result = new flush_queue_result(); iface.flush_queue(args.queue_name); return result; } } public static class flush_all_queues<I extends Iface> extends org.apache.thrift.ProcessFunction<I, flush_all_queues_args> { public flush_all_queues() { super("flush_all_queues"); } public flush_all_queues_args getEmptyArgsInstance() { return new flush_all_queues_args(); } protected boolean isOneway() { return false; } public flush_all_queues_result getResult(I iface, flush_all_queues_args args) throws org.apache.thrift.TException { flush_all_queues_result result = new flush_all_queues_result(); iface.flush_all_queues(); return result; } } public static class delete_queue<I extends Iface> extends org.apache.thrift.ProcessFunction<I, delete_queue_args> { public delete_queue() { super("delete_queue"); } public delete_queue_args getEmptyArgsInstance() { return new delete_queue_args(); } protected boolean isOneway() { return false; } public delete_queue_result getResult(I iface, delete_queue_args args) throws org.apache.thrift.TException { delete_queue_result result = new delete_queue_result(); iface.delete_queue(args.queue_name); return result; } } public static class current_status<I extends Iface> extends org.apache.thrift.ProcessFunction<I, current_status_args> { public current_status() { super("current_status"); } public current_status_args getEmptyArgsInstance() { return new current_status_args(); } protected boolean isOneway() { return false; } public current_status_result getResult(I iface, current_status_args args) throws org.apache.thrift.TException { current_status_result result = new current_status_result(); result.success = iface.current_status(); return result; } } public static class set_status<I extends Iface> extends org.apache.thrift.ProcessFunction<I, set_status_args> { public set_status() { super("set_status"); } public set_status_args getEmptyArgsInstance() { return new set_status_args(); } protected boolean isOneway() { return false; } public set_status_result getResult(I iface, set_status_args args) throws org.apache.thrift.TException { set_status_result result = new set_status_result(); iface.set_status(args.status); return result; } } public static class get_version<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_version_args> { public get_version() { super("get_version"); } public get_version_args getEmptyArgsInstance() { return new get_version_args(); } protected boolean isOneway() { return false; } public get_version_result getResult(I iface, get_version_args args) throws org.apache.thrift.TException { get_version_result result = new get_version_result(); result.success = iface.get_version(); return result; } } } public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> { private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); public AsyncProcessor(I iface) { super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>())); } protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { super(iface, getProcessMap(processMap)); } private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { processMap.put("put", new put()); processMap.put("get", new get()); processMap.put("confirm", new confirm()); processMap.put("abort", new abort()); processMap.put("peek", new peek()); processMap.put("flush_queue", new flush_queue()); processMap.put("flush_all_queues", new flush_all_queues()); processMap.put("delete_queue", new delete_queue()); processMap.put("current_status", new current_status()); processMap.put("set_status", new set_status()); processMap.put("get_version", new get_version()); return processMap; } public static class put<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, put_args, Integer> { public put() { super("put"); } public put_args getEmptyArgsInstance() { return new put_args(); } public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Integer>() { public void onComplete(Integer o) { put_result result = new put_result(); result.success = o; result.set_success_isSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; put_result result = new put_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, put_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException { iface.put(args.queue_name, args.items, args.expiration_msec,resultHandler); } } public static class get<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_args, List<Item>> { public get() { super("get"); } public get_args getEmptyArgsInstance() { return new get_args(); } public AsyncMethodCallback<List<Item>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<Item>>() { public void onComplete(List<Item> o) { get_result result = new get_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_result result = new get_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_args args, org.apache.thrift.async.AsyncMethodCallback<List<Item>> resultHandler) throws TException { iface.get(args.queue_name, args.max_items, args.timeout_msec, args.auto_abort_msec,resultHandler); } } public static class confirm<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, confirm_args, Integer> { public confirm() { super("confirm"); } public confirm_args getEmptyArgsInstance() { return new confirm_args(); } public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Integer>() { public void onComplete(Integer o) { confirm_result result = new confirm_result(); result.success = o; result.set_success_isSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; confirm_result result = new confirm_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, confirm_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException { iface.confirm(args.queue_name, args.ids,resultHandler); } } public static class abort<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, abort_args, Integer> { public abort() { super("abort"); } public abort_args getEmptyArgsInstance() { return new abort_args(); } public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Integer>() { public void onComplete(Integer o) { abort_result result = new abort_result(); result.success = o; result.set_success_isSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; abort_result result = new abort_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, abort_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException { iface.abort(args.queue_name, args.ids,resultHandler); } } public static class peek<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, peek_args, QueueInfo> { public peek() { super("peek"); } public peek_args getEmptyArgsInstance() { return new peek_args(); } public AsyncMethodCallback<QueueInfo> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<QueueInfo>() { public void onComplete(QueueInfo o) { peek_result result = new peek_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; peek_result result = new peek_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, peek_args args, org.apache.thrift.async.AsyncMethodCallback<QueueInfo> resultHandler) throws TException { iface.peek(args.queue_name,resultHandler); } } public static class flush_queue<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, flush_queue_args, Void> { public flush_queue() { super("flush_queue"); } public flush_queue_args getEmptyArgsInstance() { return new flush_queue_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { flush_queue_result result = new flush_queue_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; flush_queue_result result = new flush_queue_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, flush_queue_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.flush_queue(args.queue_name,resultHandler); } } public static class flush_all_queues<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, flush_all_queues_args, Void> { public flush_all_queues() { super("flush_all_queues"); } public flush_all_queues_args getEmptyArgsInstance() { return new flush_all_queues_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { flush_all_queues_result result = new flush_all_queues_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; flush_all_queues_result result = new flush_all_queues_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, flush_all_queues_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.flush_all_queues(resultHandler); } } public static class delete_queue<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, delete_queue_args, Void> { public delete_queue() { super("delete_queue"); } public delete_queue_args getEmptyArgsInstance() { return new delete_queue_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { delete_queue_result result = new delete_queue_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; delete_queue_result result = new delete_queue_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, delete_queue_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.delete_queue(args.queue_name,resultHandler); } } public static class current_status<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, current_status_args, Status> { public current_status() { super("current_status"); } public current_status_args getEmptyArgsInstance() { return new current_status_args(); } public AsyncMethodCallback<Status> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Status>() { public void onComplete(Status o) { current_status_result result = new current_status_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; current_status_result result = new current_status_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, current_status_args args, org.apache.thrift.async.AsyncMethodCallback<Status> resultHandler) throws TException { iface.current_status(resultHandler); } } public static class set_status<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, set_status_args, Void> { public set_status() { super("set_status"); } public set_status_args getEmptyArgsInstance() { return new set_status_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { public void onComplete(Void o) { set_status_result result = new set_status_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; set_status_result result = new set_status_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, set_status_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.set_status(args.status,resultHandler); } } public static class get_version<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_version_args, String> { public get_version() { super("get_version"); } public get_version_args getEmptyArgsInstance() { return new get_version_args(); } public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<String>() { public void onComplete(String o) { get_version_result result = new get_version_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; get_version_result result = new get_version_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, get_version_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { iface.get_version(resultHandler); } } } public static class put_args implements org.apache.thrift.TBase<put_args, put_args._Fields>, java.io.Serializable, Cloneable, Comparable<put_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("put_args"); private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queue_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField ITEMS_FIELD_DESC = new org.apache.thrift.protocol.TField("items", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField EXPIRATION_MSEC_FIELD_DESC = new org.apache.thrift.protocol.TField("expiration_msec", org.apache.thrift.protocol.TType.I32, (short)3); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new put_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new put_argsTupleSchemeFactory()); } private String queue_name; // required private List<ByteBuffer> items; // required private int expiration_msec; // 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 { QUEUE_NAME((short)1, "queue_name"), ITEMS((short)2, "items"), EXPIRATION_MSEC((short)3, "expiration_msec"); 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: // QUEUE_NAME return QUEUE_NAME; case 2: // ITEMS return ITEMS; case 3: // EXPIRATION_MSEC return EXPIRATION_MSEC; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __EXPIRATION_MSEC_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("queue_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ITEMS, new org.apache.thrift.meta_data.FieldMetaData("items", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); tmpMap.put(_Fields.EXPIRATION_MSEC, new org.apache.thrift.meta_data.FieldMetaData("expiration_msec", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_args.class, metaDataMap); } public put_args() { this.expiration_msec = 0; } public put_args( String queue_name, List<ByteBuffer> items, int expiration_msec) { this(); this.queue_name = queue_name; this.items = items; this.expiration_msec = expiration_msec; set_expiration_msec_isSet(true); } /** * Performs a deep copy on <i>other</i>. */ public put_args(put_args other) { __isset_bitfield = other.__isset_bitfield; if (other.is_set_queue_name()) { this.queue_name = other.queue_name; } if (other.is_set_items()) { List<ByteBuffer> __this__items = new ArrayList<ByteBuffer>(other.items); this.items = __this__items; } this.expiration_msec = other.expiration_msec; } public put_args deepCopy() { return new put_args(this); } @Override public void clear() { this.queue_name = null; this.items = null; this.expiration_msec = 0; } public String get_queue_name() { return this.queue_name; } public void set_queue_name(String queue_name) { this.queue_name = queue_name; } public void unset_queue_name() { this.queue_name = null; } /** Returns true if field queue_name is set (has been assigned a value) and false otherwise */ public boolean is_set_queue_name() { return this.queue_name != null; } public void set_queue_name_isSet(boolean value) { if (!value) { this.queue_name = null; } } public int get_items_size() { return (this.items == null) ? 0 : this.items.size(); } public java.util.Iterator<ByteBuffer> get_items_iterator() { return (this.items == null) ? null : this.items.iterator(); } public void add_to_items(ByteBuffer elem) { if (this.items == null) { this.items = new ArrayList<ByteBuffer>(); } this.items.add(elem); } public List<ByteBuffer> get_items() { return this.items; } public void set_items(List<ByteBuffer> items) { this.items = items; } public void unset_items() { this.items = null; } /** Returns true if field items is set (has been assigned a value) and false otherwise */ public boolean is_set_items() { return this.items != null; } public void set_items_isSet(boolean value) { if (!value) { this.items = null; } } public int get_expiration_msec() { return this.expiration_msec; } public void set_expiration_msec(int expiration_msec) { this.expiration_msec = expiration_msec; set_expiration_msec_isSet(true); } public void unset_expiration_msec() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXPIRATION_MSEC_ISSET_ID); } /** Returns true if field expiration_msec is set (has been assigned a value) and false otherwise */ public boolean is_set_expiration_msec() { return EncodingUtils.testBit(__isset_bitfield, __EXPIRATION_MSEC_ISSET_ID); } public void set_expiration_msec_isSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXPIRATION_MSEC_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case QUEUE_NAME: if (value == null) { unset_queue_name(); } else { set_queue_name((String)value); } break; case ITEMS: if (value == null) { unset_items(); } else { set_items((List<ByteBuffer>)value); } break; case EXPIRATION_MSEC: if (value == null) { unset_expiration_msec(); } else { set_expiration_msec((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case QUEUE_NAME: return get_queue_name(); case ITEMS: return get_items(); case EXPIRATION_MSEC: return Integer.valueOf(get_expiration_msec()); } 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 QUEUE_NAME: return is_set_queue_name(); case ITEMS: return is_set_items(); case EXPIRATION_MSEC: return is_set_expiration_msec(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof put_args) return this.equals((put_args)that); return false; } public boolean equals(put_args that) { if (that == null) return false; boolean this_present_queue_name = true && this.is_set_queue_name(); boolean that_present_queue_name = true && that.is_set_queue_name(); if (this_present_queue_name || that_present_queue_name) { if (!(this_present_queue_name && that_present_queue_name)) return false; if (!this.queue_name.equals(that.queue_name)) return false; } boolean this_present_items = true && this.is_set_items(); boolean that_present_items = true && that.is_set_items(); if (this_present_items || that_present_items) { if (!(this_present_items && that_present_items)) return false; if (!this.items.equals(that.items)) return false; } boolean this_present_expiration_msec = true; boolean that_present_expiration_msec = true; if (this_present_expiration_msec || that_present_expiration_msec) { if (!(this_present_expiration_msec && that_present_expiration_msec)) return false; if (this.expiration_msec != that.expiration_msec) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_queue_name = true && (is_set_queue_name()); builder.append(present_queue_name); if (present_queue_name) builder.append(queue_name); boolean present_items = true && (is_set_items()); builder.append(present_items); if (present_items) builder.append(items); boolean present_expiration_msec = true; builder.append(present_expiration_msec); if (present_expiration_msec) builder.append(expiration_msec); return builder.toHashCode(); } @Override public int compareTo(put_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_queue_name()).compareTo(other.is_set_queue_name()); if (lastComparison != 0) { return lastComparison; } if (is_set_queue_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queue_name, other.queue_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_items()).compareTo(other.is_set_items()); if (lastComparison != 0) { return lastComparison; } if (is_set_items()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.items, other.items); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_expiration_msec()).compareTo(other.is_set_expiration_msec()); if (lastComparison != 0) { return lastComparison; } if (is_set_expiration_msec()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expiration_msec, other.expiration_msec); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("put_args("); boolean first = true; sb.append("queue_name:"); if (this.queue_name == null) { sb.append("null"); } else { sb.append(this.queue_name); } first = false; if (!first) sb.append(", "); sb.append("items:"); if (this.items == null) { sb.append("null"); } else { sb.append(this.items); } first = false; if (!first) sb.append(", "); sb.append("expiration_msec:"); sb.append(this.expiration_msec); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class put_argsStandardSchemeFactory implements SchemeFactory { public put_argsStandardScheme getScheme() { return new put_argsStandardScheme(); } } private static class put_argsStandardScheme extends StandardScheme<put_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, put_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // QUEUE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.queue_name = iprot.readString(); struct.set_queue_name_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ITEMS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); struct.items = new ArrayList<ByteBuffer>(_list0.size); for (int _i1 = 0; _i1 < _list0.size; ++_i1) { ByteBuffer _elem2; _elem2 = iprot.readBinary(); struct.items.add(_elem2); } iprot.readListEnd(); } struct.set_items_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // EXPIRATION_MSEC if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.expiration_msec = iprot.readI32(); struct.set_expiration_msec_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, put_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.queue_name != null) { oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC); oprot.writeString(struct.queue_name); oprot.writeFieldEnd(); } if (struct.items != null) { oprot.writeFieldBegin(ITEMS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.items.size())); for (ByteBuffer _iter3 : struct.items) { oprot.writeBinary(_iter3); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(EXPIRATION_MSEC_FIELD_DESC); oprot.writeI32(struct.expiration_msec); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class put_argsTupleSchemeFactory implements SchemeFactory { public put_argsTupleScheme getScheme() { return new put_argsTupleScheme(); } } private static class put_argsTupleScheme extends TupleScheme<put_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, put_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_queue_name()) { optionals.set(0); } if (struct.is_set_items()) { optionals.set(1); } if (struct.is_set_expiration_msec()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.is_set_queue_name()) { oprot.writeString(struct.queue_name); } if (struct.is_set_items()) { { oprot.writeI32(struct.items.size()); for (ByteBuffer _iter4 : struct.items) { oprot.writeBinary(_iter4); } } } if (struct.is_set_expiration_msec()) { oprot.writeI32(struct.expiration_msec); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, put_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.queue_name = iprot.readString(); struct.set_queue_name_isSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.items = new ArrayList<ByteBuffer>(_list5.size); for (int _i6 = 0; _i6 < _list5.size; ++_i6) { ByteBuffer _elem7; _elem7 = iprot.readBinary(); struct.items.add(_elem7); } } struct.set_items_isSet(true); } if (incoming.get(2)) { struct.expiration_msec = iprot.readI32(); struct.set_expiration_msec_isSet(true); } } } } public static class put_result implements org.apache.thrift.TBase<put_result, put_result._Fields>, java.io.Serializable, Cloneable, Comparable<put_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("put_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new put_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new put_resultTupleSchemeFactory()); } private int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_result.class, metaDataMap); } public put_result() { } public put_result( int success) { this(); this.success = success; set_success_isSet(true); } /** * Performs a deep copy on <i>other</i>. */ public put_result(put_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public put_result deepCopy() { return new put_result(this); } @Override public void clear() { set_success_isSet(false); this.success = 0; } public int get_success() { return this.success; } public void set_success(int success) { this.success = success; set_success_isSet(true); } public void unset_success() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean is_set_success() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void set_success_isSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unset_success(); } else { set_success((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(get_success()); } 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 is_set_success(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof put_result) return this.equals((put_result)that); return false; } public boolean equals(put_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); return builder.toHashCode(); } @Override public int compareTo(put_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success()); if (lastComparison != 0) { return lastComparison; } if (is_set_success()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("put_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class put_resultStandardSchemeFactory implements SchemeFactory { public put_resultStandardScheme getScheme() { return new put_resultStandardScheme(); } } private static class put_resultStandardScheme extends StandardScheme<put_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, put_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.set_success_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, put_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.is_set_success()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class put_resultTupleSchemeFactory implements SchemeFactory { public put_resultTupleScheme getScheme() { return new put_resultTupleScheme(); } } private static class put_resultTupleScheme extends TupleScheme<put_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, put_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_success()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.is_set_success()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, put_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.set_success_isSet(true); } } } } public static class get_args implements org.apache.thrift.TBase<get_args, get_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_args"); private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queue_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField MAX_ITEMS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_items", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField TIMEOUT_MSEC_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout_msec", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.protocol.TField AUTO_ABORT_MSEC_FIELD_DESC = new org.apache.thrift.protocol.TField("auto_abort_msec", org.apache.thrift.protocol.TType.I32, (short)4); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_argsTupleSchemeFactory()); } private String queue_name; // required private int max_items; // required private int timeout_msec; // required private int auto_abort_msec; // 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 { QUEUE_NAME((short)1, "queue_name"), MAX_ITEMS((short)2, "max_items"), TIMEOUT_MSEC((short)3, "timeout_msec"), AUTO_ABORT_MSEC((short)4, "auto_abort_msec"); 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: // QUEUE_NAME return QUEUE_NAME; case 2: // MAX_ITEMS return MAX_ITEMS; case 3: // TIMEOUT_MSEC return TIMEOUT_MSEC; case 4: // AUTO_ABORT_MSEC return AUTO_ABORT_MSEC; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __MAX_ITEMS_ISSET_ID = 0; private static final int __TIMEOUT_MSEC_ISSET_ID = 1; private static final int __AUTO_ABORT_MSEC_ISSET_ID = 2; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("queue_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.MAX_ITEMS, new org.apache.thrift.meta_data.FieldMetaData("max_items", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.TIMEOUT_MSEC, new org.apache.thrift.meta_data.FieldMetaData("timeout_msec", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.AUTO_ABORT_MSEC, new org.apache.thrift.meta_data.FieldMetaData("auto_abort_msec", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_args.class, metaDataMap); } public get_args() { this.timeout_msec = 0; this.auto_abort_msec = 0; } public get_args( String queue_name, int max_items, int timeout_msec, int auto_abort_msec) { this(); this.queue_name = queue_name; this.max_items = max_items; set_max_items_isSet(true); this.timeout_msec = timeout_msec; set_timeout_msec_isSet(true); this.auto_abort_msec = auto_abort_msec; set_auto_abort_msec_isSet(true); } /** * Performs a deep copy on <i>other</i>. */ public get_args(get_args other) { __isset_bitfield = other.__isset_bitfield; if (other.is_set_queue_name()) { this.queue_name = other.queue_name; } this.max_items = other.max_items; this.timeout_msec = other.timeout_msec; this.auto_abort_msec = other.auto_abort_msec; } public get_args deepCopy() { return new get_args(this); } @Override public void clear() { this.queue_name = null; set_max_items_isSet(false); this.max_items = 0; this.timeout_msec = 0; this.auto_abort_msec = 0; } public String get_queue_name() { return this.queue_name; } public void set_queue_name(String queue_name) { this.queue_name = queue_name; } public void unset_queue_name() { this.queue_name = null; } /** Returns true if field queue_name is set (has been assigned a value) and false otherwise */ public boolean is_set_queue_name() { return this.queue_name != null; } public void set_queue_name_isSet(boolean value) { if (!value) { this.queue_name = null; } } public int get_max_items() { return this.max_items; } public void set_max_items(int max_items) { this.max_items = max_items; set_max_items_isSet(true); } public void unset_max_items() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_ITEMS_ISSET_ID); } /** Returns true if field max_items is set (has been assigned a value) and false otherwise */ public boolean is_set_max_items() { return EncodingUtils.testBit(__isset_bitfield, __MAX_ITEMS_ISSET_ID); } public void set_max_items_isSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_ITEMS_ISSET_ID, value); } public int get_timeout_msec() { return this.timeout_msec; } public void set_timeout_msec(int timeout_msec) { this.timeout_msec = timeout_msec; set_timeout_msec_isSet(true); } public void unset_timeout_msec() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_MSEC_ISSET_ID); } /** Returns true if field timeout_msec is set (has been assigned a value) and false otherwise */ public boolean is_set_timeout_msec() { return EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_MSEC_ISSET_ID); } public void set_timeout_msec_isSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_MSEC_ISSET_ID, value); } public int get_auto_abort_msec() { return this.auto_abort_msec; } public void set_auto_abort_msec(int auto_abort_msec) { this.auto_abort_msec = auto_abort_msec; set_auto_abort_msec_isSet(true); } public void unset_auto_abort_msec() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AUTO_ABORT_MSEC_ISSET_ID); } /** Returns true if field auto_abort_msec is set (has been assigned a value) and false otherwise */ public boolean is_set_auto_abort_msec() { return EncodingUtils.testBit(__isset_bitfield, __AUTO_ABORT_MSEC_ISSET_ID); } public void set_auto_abort_msec_isSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AUTO_ABORT_MSEC_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case QUEUE_NAME: if (value == null) { unset_queue_name(); } else { set_queue_name((String)value); } break; case MAX_ITEMS: if (value == null) { unset_max_items(); } else { set_max_items((Integer)value); } break; case TIMEOUT_MSEC: if (value == null) { unset_timeout_msec(); } else { set_timeout_msec((Integer)value); } break; case AUTO_ABORT_MSEC: if (value == null) { unset_auto_abort_msec(); } else { set_auto_abort_msec((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case QUEUE_NAME: return get_queue_name(); case MAX_ITEMS: return Integer.valueOf(get_max_items()); case TIMEOUT_MSEC: return Integer.valueOf(get_timeout_msec()); case AUTO_ABORT_MSEC: return Integer.valueOf(get_auto_abort_msec()); } 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 QUEUE_NAME: return is_set_queue_name(); case MAX_ITEMS: return is_set_max_items(); case TIMEOUT_MSEC: return is_set_timeout_msec(); case AUTO_ABORT_MSEC: return is_set_auto_abort_msec(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_args) return this.equals((get_args)that); return false; } public boolean equals(get_args that) { if (that == null) return false; boolean this_present_queue_name = true && this.is_set_queue_name(); boolean that_present_queue_name = true && that.is_set_queue_name(); if (this_present_queue_name || that_present_queue_name) { if (!(this_present_queue_name && that_present_queue_name)) return false; if (!this.queue_name.equals(that.queue_name)) return false; } boolean this_present_max_items = true; boolean that_present_max_items = true; if (this_present_max_items || that_present_max_items) { if (!(this_present_max_items && that_present_max_items)) return false; if (this.max_items != that.max_items) return false; } boolean this_present_timeout_msec = true; boolean that_present_timeout_msec = true; if (this_present_timeout_msec || that_present_timeout_msec) { if (!(this_present_timeout_msec && that_present_timeout_msec)) return false; if (this.timeout_msec != that.timeout_msec) return false; } boolean this_present_auto_abort_msec = true; boolean that_present_auto_abort_msec = true; if (this_present_auto_abort_msec || that_present_auto_abort_msec) { if (!(this_present_auto_abort_msec && that_present_auto_abort_msec)) return false; if (this.auto_abort_msec != that.auto_abort_msec) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_queue_name = true && (is_set_queue_name()); builder.append(present_queue_name); if (present_queue_name) builder.append(queue_name); boolean present_max_items = true; builder.append(present_max_items); if (present_max_items) builder.append(max_items); boolean present_timeout_msec = true; builder.append(present_timeout_msec); if (present_timeout_msec) builder.append(timeout_msec); boolean present_auto_abort_msec = true; builder.append(present_auto_abort_msec); if (present_auto_abort_msec) builder.append(auto_abort_msec); return builder.toHashCode(); } @Override public int compareTo(get_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_queue_name()).compareTo(other.is_set_queue_name()); if (lastComparison != 0) { return lastComparison; } if (is_set_queue_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queue_name, other.queue_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_max_items()).compareTo(other.is_set_max_items()); if (lastComparison != 0) { return lastComparison; } if (is_set_max_items()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_items, other.max_items); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_timeout_msec()).compareTo(other.is_set_timeout_msec()); if (lastComparison != 0) { return lastComparison; } if (is_set_timeout_msec()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout_msec, other.timeout_msec); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_auto_abort_msec()).compareTo(other.is_set_auto_abort_msec()); if (lastComparison != 0) { return lastComparison; } if (is_set_auto_abort_msec()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.auto_abort_msec, other.auto_abort_msec); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_args("); boolean first = true; sb.append("queue_name:"); if (this.queue_name == null) { sb.append("null"); } else { sb.append(this.queue_name); } first = false; if (!first) sb.append(", "); sb.append("max_items:"); sb.append(this.max_items); first = false; if (!first) sb.append(", "); sb.append("timeout_msec:"); sb.append(this.timeout_msec); first = false; if (!first) sb.append(", "); sb.append("auto_abort_msec:"); sb.append(this.auto_abort_msec); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_argsStandardSchemeFactory implements SchemeFactory { public get_argsStandardScheme getScheme() { return new get_argsStandardScheme(); } } private static class get_argsStandardScheme extends StandardScheme<get_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // QUEUE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.queue_name = iprot.readString(); struct.set_queue_name_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // MAX_ITEMS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.max_items = iprot.readI32(); struct.set_max_items_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // TIMEOUT_MSEC if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.timeout_msec = iprot.readI32(); struct.set_timeout_msec_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // AUTO_ABORT_MSEC if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.auto_abort_msec = iprot.readI32(); struct.set_auto_abort_msec_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.queue_name != null) { oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC); oprot.writeString(struct.queue_name); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_ITEMS_FIELD_DESC); oprot.writeI32(struct.max_items); oprot.writeFieldEnd(); oprot.writeFieldBegin(TIMEOUT_MSEC_FIELD_DESC); oprot.writeI32(struct.timeout_msec); oprot.writeFieldEnd(); oprot.writeFieldBegin(AUTO_ABORT_MSEC_FIELD_DESC); oprot.writeI32(struct.auto_abort_msec); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_argsTupleSchemeFactory implements SchemeFactory { public get_argsTupleScheme getScheme() { return new get_argsTupleScheme(); } } private static class get_argsTupleScheme extends TupleScheme<get_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_queue_name()) { optionals.set(0); } if (struct.is_set_max_items()) { optionals.set(1); } if (struct.is_set_timeout_msec()) { optionals.set(2); } if (struct.is_set_auto_abort_msec()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.is_set_queue_name()) { oprot.writeString(struct.queue_name); } if (struct.is_set_max_items()) { oprot.writeI32(struct.max_items); } if (struct.is_set_timeout_msec()) { oprot.writeI32(struct.timeout_msec); } if (struct.is_set_auto_abort_msec()) { oprot.writeI32(struct.auto_abort_msec); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.queue_name = iprot.readString(); struct.set_queue_name_isSet(true); } if (incoming.get(1)) { struct.max_items = iprot.readI32(); struct.set_max_items_isSet(true); } if (incoming.get(2)) { struct.timeout_msec = iprot.readI32(); struct.set_timeout_msec_isSet(true); } if (incoming.get(3)) { struct.auto_abort_msec = iprot.readI32(); struct.set_auto_abort_msec_isSet(true); } } } } public static class get_result implements org.apache.thrift.TBase<get_result, get_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_resultTupleSchemeFactory()); } private List<Item> 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.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Item.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_result.class, metaDataMap); } public get_result() { } public get_result( List<Item> success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public get_result(get_result other) { if (other.is_set_success()) { List<Item> __this__success = new ArrayList<Item>(other.success.size()); for (Item other_element : other.success) { __this__success.add(new Item(other_element)); } this.success = __this__success; } } public get_result deepCopy() { return new get_result(this); } @Override public void clear() { this.success = null; } public int get_success_size() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<Item> get_success_iterator() { return (this.success == null) ? null : this.success.iterator(); } public void add_to_success(Item elem) { if (this.success == null) { this.success = new ArrayList<Item>(); } this.success.add(elem); } public List<Item> get_success() { return this.success; } public void set_success(List<Item> success) { this.success = success; } public void unset_success() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean is_set_success() { return this.success != null; } public void set_success_isSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unset_success(); } else { set_success((List<Item>)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return get_success(); } 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 is_set_success(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_result) return this.equals((get_result)that); return false; } public boolean equals(get_result that) { if (that == null) return false; boolean this_present_success = true && this.is_set_success(); boolean that_present_success = true && that.is_set_success(); 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() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (is_set_success()); builder.append(present_success); if (present_success) builder.append(success); return builder.toHashCode(); } @Override public int compareTo(get_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success()); if (lastComparison != 0) { return lastComparison; } if (is_set_success()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_resultStandardSchemeFactory implements SchemeFactory { public get_resultStandardScheme getScheme() { return new get_resultStandardScheme(); } } private static class get_resultStandardScheme extends StandardScheme<get_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); struct.success = new ArrayList<Item>(_list8.size); for (int _i9 = 0; _i9 < _list8.size; ++_i9) { Item _elem10; _elem10 = new Item(); _elem10.read(iprot); struct.success.add(_elem10); } iprot.readListEnd(); } struct.set_success_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (Item _iter11 : struct.success) { _iter11.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_resultTupleSchemeFactory implements SchemeFactory { public get_resultTupleScheme getScheme() { return new get_resultTupleScheme(); } } private static class get_resultTupleScheme extends TupleScheme<get_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_success()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.is_set_success()) { { oprot.writeI32(struct.success.size()); for (Item _iter12 : struct.success) { _iter12.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<Item>(_list13.size); for (int _i14 = 0; _i14 < _list13.size; ++_i14) { Item _elem15; _elem15 = new Item(); _elem15.read(iprot); struct.success.add(_elem15); } } struct.set_success_isSet(true); } } } } public static class confirm_args implements org.apache.thrift.TBase<confirm_args, confirm_args._Fields>, java.io.Serializable, Cloneable, Comparable<confirm_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("confirm_args"); private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queue_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("ids", org.apache.thrift.protocol.TType.SET, (short)2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new confirm_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new confirm_argsTupleSchemeFactory()); } private String queue_name; // required private Set<Long> ids; // 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 { QUEUE_NAME((short)1, "queue_name"), IDS((short)2, "ids"); 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: // QUEUE_NAME return QUEUE_NAME; case 2: // IDS return IDS; 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.QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("queue_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.IDS, new org.apache.thrift.meta_data.FieldMetaData("ids", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(confirm_args.class, metaDataMap); } public confirm_args() { } public confirm_args( String queue_name, Set<Long> ids) { this(); this.queue_name = queue_name; this.ids = ids; } /** * Performs a deep copy on <i>other</i>. */ public confirm_args(confirm_args other) { if (other.is_set_queue_name()) { this.queue_name = other.queue_name; } if (other.is_set_ids()) { Set<Long> __this__ids = new HashSet<Long>(other.ids); this.ids = __this__ids; } } public confirm_args deepCopy() { return new confirm_args(this); } @Override public void clear() { this.queue_name = null; this.ids = null; } public String get_queue_name() { return this.queue_name; } public void set_queue_name(String queue_name) { this.queue_name = queue_name; } public void unset_queue_name() { this.queue_name = null; } /** Returns true if field queue_name is set (has been assigned a value) and false otherwise */ public boolean is_set_queue_name() { return this.queue_name != null; } public void set_queue_name_isSet(boolean value) { if (!value) { this.queue_name = null; } } public int get_ids_size() { return (this.ids == null) ? 0 : this.ids.size(); } public java.util.Iterator<Long> get_ids_iterator() { return (this.ids == null) ? null : this.ids.iterator(); } public void add_to_ids(long elem) { if (this.ids == null) { this.ids = new HashSet<Long>(); } this.ids.add(elem); } public Set<Long> get_ids() { return this.ids; } public void set_ids(Set<Long> ids) { this.ids = ids; } public void unset_ids() { this.ids = null; } /** Returns true if field ids is set (has been assigned a value) and false otherwise */ public boolean is_set_ids() { return this.ids != null; } public void set_ids_isSet(boolean value) { if (!value) { this.ids = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case QUEUE_NAME: if (value == null) { unset_queue_name(); } else { set_queue_name((String)value); } break; case IDS: if (value == null) { unset_ids(); } else { set_ids((Set<Long>)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case QUEUE_NAME: return get_queue_name(); case IDS: return get_ids(); } 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 QUEUE_NAME: return is_set_queue_name(); case IDS: return is_set_ids(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof confirm_args) return this.equals((confirm_args)that); return false; } public boolean equals(confirm_args that) { if (that == null) return false; boolean this_present_queue_name = true && this.is_set_queue_name(); boolean that_present_queue_name = true && that.is_set_queue_name(); if (this_present_queue_name || that_present_queue_name) { if (!(this_present_queue_name && that_present_queue_name)) return false; if (!this.queue_name.equals(that.queue_name)) return false; } boolean this_present_ids = true && this.is_set_ids(); boolean that_present_ids = true && that.is_set_ids(); if (this_present_ids || that_present_ids) { if (!(this_present_ids && that_present_ids)) return false; if (!this.ids.equals(that.ids)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_queue_name = true && (is_set_queue_name()); builder.append(present_queue_name); if (present_queue_name) builder.append(queue_name); boolean present_ids = true && (is_set_ids()); builder.append(present_ids); if (present_ids) builder.append(ids); return builder.toHashCode(); } @Override public int compareTo(confirm_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_queue_name()).compareTo(other.is_set_queue_name()); if (lastComparison != 0) { return lastComparison; } if (is_set_queue_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queue_name, other.queue_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_ids()).compareTo(other.is_set_ids()); if (lastComparison != 0) { return lastComparison; } if (is_set_ids()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ids, other.ids); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("confirm_args("); boolean first = true; sb.append("queue_name:"); if (this.queue_name == null) { sb.append("null"); } else { sb.append(this.queue_name); } first = false; if (!first) sb.append(", "); sb.append("ids:"); if (this.ids == null) { sb.append("null"); } else { sb.append(this.ids); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class confirm_argsStandardSchemeFactory implements SchemeFactory { public confirm_argsStandardScheme getScheme() { return new confirm_argsStandardScheme(); } } private static class confirm_argsStandardScheme extends StandardScheme<confirm_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, confirm_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // QUEUE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.queue_name = iprot.readString(); struct.set_queue_name_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // IDS if (schemeField.type == org.apache.thrift.protocol.TType.SET) { { org.apache.thrift.protocol.TSet _set16 = iprot.readSetBegin(); struct.ids = new HashSet<Long>(2*_set16.size); for (int _i17 = 0; _i17 < _set16.size; ++_i17) { long _elem18; _elem18 = iprot.readI64(); struct.ids.add(_elem18); } iprot.readSetEnd(); } struct.set_ids_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, confirm_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.queue_name != null) { oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC); oprot.writeString(struct.queue_name); oprot.writeFieldEnd(); } if (struct.ids != null) { oprot.writeFieldBegin(IDS_FIELD_DESC); { oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.ids.size())); for (long _iter19 : struct.ids) { oprot.writeI64(_iter19); } oprot.writeSetEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class confirm_argsTupleSchemeFactory implements SchemeFactory { public confirm_argsTupleScheme getScheme() { return new confirm_argsTupleScheme(); } } private static class confirm_argsTupleScheme extends TupleScheme<confirm_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, confirm_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_queue_name()) { optionals.set(0); } if (struct.is_set_ids()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.is_set_queue_name()) { oprot.writeString(struct.queue_name); } if (struct.is_set_ids()) { { oprot.writeI32(struct.ids.size()); for (long _iter20 : struct.ids) { oprot.writeI64(_iter20); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, confirm_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.queue_name = iprot.readString(); struct.set_queue_name_isSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TSet _set21 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32()); struct.ids = new HashSet<Long>(2*_set21.size); for (int _i22 = 0; _i22 < _set21.size; ++_i22) { long _elem23; _elem23 = iprot.readI64(); struct.ids.add(_elem23); } } struct.set_ids_isSet(true); } } } } public static class confirm_result implements org.apache.thrift.TBase<confirm_result, confirm_result._Fields>, java.io.Serializable, Cloneable, Comparable<confirm_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("confirm_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new confirm_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new confirm_resultTupleSchemeFactory()); } private int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(confirm_result.class, metaDataMap); } public confirm_result() { } public confirm_result( int success) { this(); this.success = success; set_success_isSet(true); } /** * Performs a deep copy on <i>other</i>. */ public confirm_result(confirm_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public confirm_result deepCopy() { return new confirm_result(this); } @Override public void clear() { set_success_isSet(false); this.success = 0; } public int get_success() { return this.success; } public void set_success(int success) { this.success = success; set_success_isSet(true); } public void unset_success() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean is_set_success() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void set_success_isSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unset_success(); } else { set_success((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(get_success()); } 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 is_set_success(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof confirm_result) return this.equals((confirm_result)that); return false; } public boolean equals(confirm_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); return builder.toHashCode(); } @Override public int compareTo(confirm_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success()); if (lastComparison != 0) { return lastComparison; } if (is_set_success()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("confirm_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class confirm_resultStandardSchemeFactory implements SchemeFactory { public confirm_resultStandardScheme getScheme() { return new confirm_resultStandardScheme(); } } private static class confirm_resultStandardScheme extends StandardScheme<confirm_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, confirm_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.set_success_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, confirm_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.is_set_success()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class confirm_resultTupleSchemeFactory implements SchemeFactory { public confirm_resultTupleScheme getScheme() { return new confirm_resultTupleScheme(); } } private static class confirm_resultTupleScheme extends TupleScheme<confirm_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, confirm_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_success()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.is_set_success()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, confirm_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.set_success_isSet(true); } } } } public static class abort_args implements org.apache.thrift.TBase<abort_args, abort_args._Fields>, java.io.Serializable, Cloneable, Comparable<abort_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abort_args"); private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queue_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("ids", org.apache.thrift.protocol.TType.SET, (short)2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new abort_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new abort_argsTupleSchemeFactory()); } private String queue_name; // required private Set<Long> ids; // 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 { QUEUE_NAME((short)1, "queue_name"), IDS((short)2, "ids"); 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: // QUEUE_NAME return QUEUE_NAME; case 2: // IDS return IDS; 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.QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("queue_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.IDS, new org.apache.thrift.meta_data.FieldMetaData("ids", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(abort_args.class, metaDataMap); } public abort_args() { } public abort_args( String queue_name, Set<Long> ids) { this(); this.queue_name = queue_name; this.ids = ids; } /** * Performs a deep copy on <i>other</i>. */ public abort_args(abort_args other) { if (other.is_set_queue_name()) { this.queue_name = other.queue_name; } if (other.is_set_ids()) { Set<Long> __this__ids = new HashSet<Long>(other.ids); this.ids = __this__ids; } } public abort_args deepCopy() { return new abort_args(this); } @Override public void clear() { this.queue_name = null; this.ids = null; } public String get_queue_name() { return this.queue_name; } public void set_queue_name(String queue_name) { this.queue_name = queue_name; } public void unset_queue_name() { this.queue_name = null; } /** Returns true if field queue_name is set (has been assigned a value) and false otherwise */ public boolean is_set_queue_name() { return this.queue_name != null; } public void set_queue_name_isSet(boolean value) { if (!value) { this.queue_name = null; } } public int get_ids_size() { return (this.ids == null) ? 0 : this.ids.size(); } public java.util.Iterator<Long> get_ids_iterator() { return (this.ids == null) ? null : this.ids.iterator(); } public void add_to_ids(long elem) { if (this.ids == null) { this.ids = new HashSet<Long>(); } this.ids.add(elem); } public Set<Long> get_ids() { return this.ids; } public void set_ids(Set<Long> ids) { this.ids = ids; } public void unset_ids() { this.ids = null; } /** Returns true if field ids is set (has been assigned a value) and false otherwise */ public boolean is_set_ids() { return this.ids != null; } public void set_ids_isSet(boolean value) { if (!value) { this.ids = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case QUEUE_NAME: if (value == null) { unset_queue_name(); } else { set_queue_name((String)value); } break; case IDS: if (value == null) { unset_ids(); } else { set_ids((Set<Long>)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case QUEUE_NAME: return get_queue_name(); case IDS: return get_ids(); } 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 QUEUE_NAME: return is_set_queue_name(); case IDS: return is_set_ids(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof abort_args) return this.equals((abort_args)that); return false; } public boolean equals(abort_args that) { if (that == null) return false; boolean this_present_queue_name = true && this.is_set_queue_name(); boolean that_present_queue_name = true && that.is_set_queue_name(); if (this_present_queue_name || that_present_queue_name) { if (!(this_present_queue_name && that_present_queue_name)) return false; if (!this.queue_name.equals(that.queue_name)) return false; } boolean this_present_ids = true && this.is_set_ids(); boolean that_present_ids = true && that.is_set_ids(); if (this_present_ids || that_present_ids) { if (!(this_present_ids && that_present_ids)) return false; if (!this.ids.equals(that.ids)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_queue_name = true && (is_set_queue_name()); builder.append(present_queue_name); if (present_queue_name) builder.append(queue_name); boolean present_ids = true && (is_set_ids()); builder.append(present_ids); if (present_ids) builder.append(ids); return builder.toHashCode(); } @Override public int compareTo(abort_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_queue_name()).compareTo(other.is_set_queue_name()); if (lastComparison != 0) { return lastComparison; } if (is_set_queue_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queue_name, other.queue_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_ids()).compareTo(other.is_set_ids()); if (lastComparison != 0) { return lastComparison; } if (is_set_ids()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ids, other.ids); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("abort_args("); boolean first = true; sb.append("queue_name:"); if (this.queue_name == null) { sb.append("null"); } else { sb.append(this.queue_name); } first = false; if (!first) sb.append(", "); sb.append("ids:"); if (this.ids == null) { sb.append("null"); } else { sb.append(this.ids); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class abort_argsStandardSchemeFactory implements SchemeFactory { public abort_argsStandardScheme getScheme() { return new abort_argsStandardScheme(); } } private static class abort_argsStandardScheme extends StandardScheme<abort_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, abort_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // QUEUE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.queue_name = iprot.readString(); struct.set_queue_name_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // IDS if (schemeField.type == org.apache.thrift.protocol.TType.SET) { { org.apache.thrift.protocol.TSet _set24 = iprot.readSetBegin(); struct.ids = new HashSet<Long>(2*_set24.size); for (int _i25 = 0; _i25 < _set24.size; ++_i25) { long _elem26; _elem26 = iprot.readI64(); struct.ids.add(_elem26); } iprot.readSetEnd(); } struct.set_ids_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, abort_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.queue_name != null) { oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC); oprot.writeString(struct.queue_name); oprot.writeFieldEnd(); } if (struct.ids != null) { oprot.writeFieldBegin(IDS_FIELD_DESC); { oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.ids.size())); for (long _iter27 : struct.ids) { oprot.writeI64(_iter27); } oprot.writeSetEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class abort_argsTupleSchemeFactory implements SchemeFactory { public abort_argsTupleScheme getScheme() { return new abort_argsTupleScheme(); } } private static class abort_argsTupleScheme extends TupleScheme<abort_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, abort_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_queue_name()) { optionals.set(0); } if (struct.is_set_ids()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.is_set_queue_name()) { oprot.writeString(struct.queue_name); } if (struct.is_set_ids()) { { oprot.writeI32(struct.ids.size()); for (long _iter28 : struct.ids) { oprot.writeI64(_iter28); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, abort_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.queue_name = iprot.readString(); struct.set_queue_name_isSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TSet _set29 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32()); struct.ids = new HashSet<Long>(2*_set29.size); for (int _i30 = 0; _i30 < _set29.size; ++_i30) { long _elem31; _elem31 = iprot.readI64(); struct.ids.add(_elem31); } } struct.set_ids_isSet(true); } } } } public static class abort_result implements org.apache.thrift.TBase<abort_result, abort_result._Fields>, java.io.Serializable, Cloneable, Comparable<abort_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abort_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new abort_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new abort_resultTupleSchemeFactory()); } private int success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(abort_result.class, metaDataMap); } public abort_result() { } public abort_result( int success) { this(); this.success = success; set_success_isSet(true); } /** * Performs a deep copy on <i>other</i>. */ public abort_result(abort_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public abort_result deepCopy() { return new abort_result(this); } @Override public void clear() { set_success_isSet(false); this.success = 0; } public int get_success() { return this.success; } public void set_success(int success) { this.success = success; set_success_isSet(true); } public void unset_success() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean is_set_success() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void set_success_isSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unset_success(); } else { set_success((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(get_success()); } 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 is_set_success(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof abort_result) return this.equals((abort_result)that); return false; } public boolean equals(abort_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); return builder.toHashCode(); } @Override public int compareTo(abort_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success()); if (lastComparison != 0) { return lastComparison; } if (is_set_success()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("abort_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class abort_resultStandardSchemeFactory implements SchemeFactory { public abort_resultStandardScheme getScheme() { return new abort_resultStandardScheme(); } } private static class abort_resultStandardScheme extends StandardScheme<abort_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, abort_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.set_success_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, abort_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.is_set_success()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class abort_resultTupleSchemeFactory implements SchemeFactory { public abort_resultTupleScheme getScheme() { return new abort_resultTupleScheme(); } } private static class abort_resultTupleScheme extends TupleScheme<abort_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, abort_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_success()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.is_set_success()) { oprot.writeI32(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, abort_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI32(); struct.set_success_isSet(true); } } } } public static class peek_args implements org.apache.thrift.TBase<peek_args, peek_args._Fields>, java.io.Serializable, Cloneable, Comparable<peek_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("peek_args"); private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queue_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new peek_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new peek_argsTupleSchemeFactory()); } private String queue_name; // 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 { QUEUE_NAME((short)1, "queue_name"); 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: // QUEUE_NAME return QUEUE_NAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("queue_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(peek_args.class, metaDataMap); } public peek_args() { } public peek_args( String queue_name) { this(); this.queue_name = queue_name; } /** * Performs a deep copy on <i>other</i>. */ public peek_args(peek_args other) { if (other.is_set_queue_name()) { this.queue_name = other.queue_name; } } public peek_args deepCopy() { return new peek_args(this); } @Override public void clear() { this.queue_name = null; } public String get_queue_name() { return this.queue_name; } public void set_queue_name(String queue_name) { this.queue_name = queue_name; } public void unset_queue_name() { this.queue_name = null; } /** Returns true if field queue_name is set (has been assigned a value) and false otherwise */ public boolean is_set_queue_name() { return this.queue_name != null; } public void set_queue_name_isSet(boolean value) { if (!value) { this.queue_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case QUEUE_NAME: if (value == null) { unset_queue_name(); } else { set_queue_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case QUEUE_NAME: return get_queue_name(); } 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 QUEUE_NAME: return is_set_queue_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof peek_args) return this.equals((peek_args)that); return false; } public boolean equals(peek_args that) { if (that == null) return false; boolean this_present_queue_name = true && this.is_set_queue_name(); boolean that_present_queue_name = true && that.is_set_queue_name(); if (this_present_queue_name || that_present_queue_name) { if (!(this_present_queue_name && that_present_queue_name)) return false; if (!this.queue_name.equals(that.queue_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_queue_name = true && (is_set_queue_name()); builder.append(present_queue_name); if (present_queue_name) builder.append(queue_name); return builder.toHashCode(); } @Override public int compareTo(peek_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_queue_name()).compareTo(other.is_set_queue_name()); if (lastComparison != 0) { return lastComparison; } if (is_set_queue_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queue_name, other.queue_name); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("peek_args("); boolean first = true; sb.append("queue_name:"); if (this.queue_name == null) { sb.append("null"); } else { sb.append(this.queue_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class peek_argsStandardSchemeFactory implements SchemeFactory { public peek_argsStandardScheme getScheme() { return new peek_argsStandardScheme(); } } private static class peek_argsStandardScheme extends StandardScheme<peek_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, peek_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // QUEUE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.queue_name = iprot.readString(); struct.set_queue_name_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, peek_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.queue_name != null) { oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC); oprot.writeString(struct.queue_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class peek_argsTupleSchemeFactory implements SchemeFactory { public peek_argsTupleScheme getScheme() { return new peek_argsTupleScheme(); } } private static class peek_argsTupleScheme extends TupleScheme<peek_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, peek_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_queue_name()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.is_set_queue_name()) { oprot.writeString(struct.queue_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, peek_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.queue_name = iprot.readString(); struct.set_queue_name_isSet(true); } } } } public static class peek_result implements org.apache.thrift.TBase<peek_result, peek_result._Fields>, java.io.Serializable, Cloneable, Comparable<peek_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("peek_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new peek_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new peek_resultTupleSchemeFactory()); } private QueueInfo 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, QueueInfo.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(peek_result.class, metaDataMap); } public peek_result() { } public peek_result( QueueInfo success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public peek_result(peek_result other) { if (other.is_set_success()) { this.success = new QueueInfo(other.success); } } public peek_result deepCopy() { return new peek_result(this); } @Override public void clear() { this.success = null; } public QueueInfo get_success() { return this.success; } public void set_success(QueueInfo success) { this.success = success; } public void unset_success() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean is_set_success() { return this.success != null; } public void set_success_isSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unset_success(); } else { set_success((QueueInfo)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return get_success(); } 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 is_set_success(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof peek_result) return this.equals((peek_result)that); return false; } public boolean equals(peek_result that) { if (that == null) return false; boolean this_present_success = true && this.is_set_success(); boolean that_present_success = true && that.is_set_success(); 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() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (is_set_success()); builder.append(present_success); if (present_success) builder.append(success); return builder.toHashCode(); } @Override public int compareTo(peek_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success()); if (lastComparison != 0) { return lastComparison; } if (is_set_success()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("peek_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class peek_resultStandardSchemeFactory implements SchemeFactory { public peek_resultStandardScheme getScheme() { return new peek_resultStandardScheme(); } } private static class peek_resultStandardScheme extends StandardScheme<peek_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, peek_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new QueueInfo(); struct.success.read(iprot); struct.set_success_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, peek_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class peek_resultTupleSchemeFactory implements SchemeFactory { public peek_resultTupleScheme getScheme() { return new peek_resultTupleScheme(); } } private static class peek_resultTupleScheme extends TupleScheme<peek_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, peek_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_success()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.is_set_success()) { struct.success.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, peek_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new QueueInfo(); struct.success.read(iprot); struct.set_success_isSet(true); } } } } public static class flush_queue_args implements org.apache.thrift.TBase<flush_queue_args, flush_queue_args._Fields>, java.io.Serializable, Cloneable, Comparable<flush_queue_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("flush_queue_args"); private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queue_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new flush_queue_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new flush_queue_argsTupleSchemeFactory()); } private String queue_name; // 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 { QUEUE_NAME((short)1, "queue_name"); 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: // QUEUE_NAME return QUEUE_NAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("queue_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(flush_queue_args.class, metaDataMap); } public flush_queue_args() { } public flush_queue_args( String queue_name) { this(); this.queue_name = queue_name; } /** * Performs a deep copy on <i>other</i>. */ public flush_queue_args(flush_queue_args other) { if (other.is_set_queue_name()) { this.queue_name = other.queue_name; } } public flush_queue_args deepCopy() { return new flush_queue_args(this); } @Override public void clear() { this.queue_name = null; } public String get_queue_name() { return this.queue_name; } public void set_queue_name(String queue_name) { this.queue_name = queue_name; } public void unset_queue_name() { this.queue_name = null; } /** Returns true if field queue_name is set (has been assigned a value) and false otherwise */ public boolean is_set_queue_name() { return this.queue_name != null; } public void set_queue_name_isSet(boolean value) { if (!value) { this.queue_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case QUEUE_NAME: if (value == null) { unset_queue_name(); } else { set_queue_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case QUEUE_NAME: return get_queue_name(); } 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 QUEUE_NAME: return is_set_queue_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof flush_queue_args) return this.equals((flush_queue_args)that); return false; } public boolean equals(flush_queue_args that) { if (that == null) return false; boolean this_present_queue_name = true && this.is_set_queue_name(); boolean that_present_queue_name = true && that.is_set_queue_name(); if (this_present_queue_name || that_present_queue_name) { if (!(this_present_queue_name && that_present_queue_name)) return false; if (!this.queue_name.equals(that.queue_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_queue_name = true && (is_set_queue_name()); builder.append(present_queue_name); if (present_queue_name) builder.append(queue_name); return builder.toHashCode(); } @Override public int compareTo(flush_queue_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_queue_name()).compareTo(other.is_set_queue_name()); if (lastComparison != 0) { return lastComparison; } if (is_set_queue_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queue_name, other.queue_name); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("flush_queue_args("); boolean first = true; sb.append("queue_name:"); if (this.queue_name == null) { sb.append("null"); } else { sb.append(this.queue_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class flush_queue_argsStandardSchemeFactory implements SchemeFactory { public flush_queue_argsStandardScheme getScheme() { return new flush_queue_argsStandardScheme(); } } private static class flush_queue_argsStandardScheme extends StandardScheme<flush_queue_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, flush_queue_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // QUEUE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.queue_name = iprot.readString(); struct.set_queue_name_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, flush_queue_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.queue_name != null) { oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC); oprot.writeString(struct.queue_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class flush_queue_argsTupleSchemeFactory implements SchemeFactory { public flush_queue_argsTupleScheme getScheme() { return new flush_queue_argsTupleScheme(); } } private static class flush_queue_argsTupleScheme extends TupleScheme<flush_queue_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, flush_queue_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_queue_name()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.is_set_queue_name()) { oprot.writeString(struct.queue_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, flush_queue_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.queue_name = iprot.readString(); struct.set_queue_name_isSet(true); } } } } public static class flush_queue_result implements org.apache.thrift.TBase<flush_queue_result, flush_queue_result._Fields>, java.io.Serializable, Cloneable, Comparable<flush_queue_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("flush_queue_result"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new flush_queue_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new flush_queue_resultTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(flush_queue_result.class, metaDataMap); } public flush_queue_result() { } /** * Performs a deep copy on <i>other</i>. */ public flush_queue_result(flush_queue_result other) { } public flush_queue_result deepCopy() { return new flush_queue_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 flush_queue_result) return this.equals((flush_queue_result)that); return false; } public boolean equals(flush_queue_result that) { if (that == null) return false; return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); return builder.toHashCode(); } @Override public int compareTo(flush_queue_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("flush_queue_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class flush_queue_resultStandardSchemeFactory implements SchemeFactory { public flush_queue_resultStandardScheme getScheme() { return new flush_queue_resultStandardScheme(); } } private static class flush_queue_resultStandardScheme extends StandardScheme<flush_queue_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, flush_queue_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, flush_queue_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class flush_queue_resultTupleSchemeFactory implements SchemeFactory { public flush_queue_resultTupleScheme getScheme() { return new flush_queue_resultTupleScheme(); } } private static class flush_queue_resultTupleScheme extends TupleScheme<flush_queue_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, flush_queue_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, flush_queue_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class flush_all_queues_args implements org.apache.thrift.TBase<flush_all_queues_args, flush_all_queues_args._Fields>, java.io.Serializable, Cloneable, Comparable<flush_all_queues_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("flush_all_queues_args"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new flush_all_queues_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new flush_all_queues_argsTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(flush_all_queues_args.class, metaDataMap); } public flush_all_queues_args() { } /** * Performs a deep copy on <i>other</i>. */ public flush_all_queues_args(flush_all_queues_args other) { } public flush_all_queues_args deepCopy() { return new flush_all_queues_args(this); } @Override public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof flush_all_queues_args) return this.equals((flush_all_queues_args)that); return false; } public boolean equals(flush_all_queues_args that) { if (that == null) return false; return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); return builder.toHashCode(); } @Override public int compareTo(flush_all_queues_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("flush_all_queues_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class flush_all_queues_argsStandardSchemeFactory implements SchemeFactory { public flush_all_queues_argsStandardScheme getScheme() { return new flush_all_queues_argsStandardScheme(); } } private static class flush_all_queues_argsStandardScheme extends StandardScheme<flush_all_queues_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, flush_all_queues_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, flush_all_queues_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class flush_all_queues_argsTupleSchemeFactory implements SchemeFactory { public flush_all_queues_argsTupleScheme getScheme() { return new flush_all_queues_argsTupleScheme(); } } private static class flush_all_queues_argsTupleScheme extends TupleScheme<flush_all_queues_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, flush_all_queues_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, flush_all_queues_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class flush_all_queues_result implements org.apache.thrift.TBase<flush_all_queues_result, flush_all_queues_result._Fields>, java.io.Serializable, Cloneable, Comparable<flush_all_queues_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("flush_all_queues_result"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new flush_all_queues_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new flush_all_queues_resultTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(flush_all_queues_result.class, metaDataMap); } public flush_all_queues_result() { } /** * Performs a deep copy on <i>other</i>. */ public flush_all_queues_result(flush_all_queues_result other) { } public flush_all_queues_result deepCopy() { return new flush_all_queues_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 flush_all_queues_result) return this.equals((flush_all_queues_result)that); return false; } public boolean equals(flush_all_queues_result that) { if (that == null) return false; return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); return builder.toHashCode(); } @Override public int compareTo(flush_all_queues_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("flush_all_queues_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class flush_all_queues_resultStandardSchemeFactory implements SchemeFactory { public flush_all_queues_resultStandardScheme getScheme() { return new flush_all_queues_resultStandardScheme(); } } private static class flush_all_queues_resultStandardScheme extends StandardScheme<flush_all_queues_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, flush_all_queues_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, flush_all_queues_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class flush_all_queues_resultTupleSchemeFactory implements SchemeFactory { public flush_all_queues_resultTupleScheme getScheme() { return new flush_all_queues_resultTupleScheme(); } } private static class flush_all_queues_resultTupleScheme extends TupleScheme<flush_all_queues_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, flush_all_queues_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, flush_all_queues_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class delete_queue_args implements org.apache.thrift.TBase<delete_queue_args, delete_queue_args._Fields>, java.io.Serializable, Cloneable, Comparable<delete_queue_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_queue_args"); private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queue_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new delete_queue_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new delete_queue_argsTupleSchemeFactory()); } private String queue_name; // 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 { QUEUE_NAME((short)1, "queue_name"); 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: // QUEUE_NAME return QUEUE_NAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("queue_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_queue_args.class, metaDataMap); } public delete_queue_args() { } public delete_queue_args( String queue_name) { this(); this.queue_name = queue_name; } /** * Performs a deep copy on <i>other</i>. */ public delete_queue_args(delete_queue_args other) { if (other.is_set_queue_name()) { this.queue_name = other.queue_name; } } public delete_queue_args deepCopy() { return new delete_queue_args(this); } @Override public void clear() { this.queue_name = null; } public String get_queue_name() { return this.queue_name; } public void set_queue_name(String queue_name) { this.queue_name = queue_name; } public void unset_queue_name() { this.queue_name = null; } /** Returns true if field queue_name is set (has been assigned a value) and false otherwise */ public boolean is_set_queue_name() { return this.queue_name != null; } public void set_queue_name_isSet(boolean value) { if (!value) { this.queue_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case QUEUE_NAME: if (value == null) { unset_queue_name(); } else { set_queue_name((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case QUEUE_NAME: return get_queue_name(); } 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 QUEUE_NAME: return is_set_queue_name(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof delete_queue_args) return this.equals((delete_queue_args)that); return false; } public boolean equals(delete_queue_args that) { if (that == null) return false; boolean this_present_queue_name = true && this.is_set_queue_name(); boolean that_present_queue_name = true && that.is_set_queue_name(); if (this_present_queue_name || that_present_queue_name) { if (!(this_present_queue_name && that_present_queue_name)) return false; if (!this.queue_name.equals(that.queue_name)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_queue_name = true && (is_set_queue_name()); builder.append(present_queue_name); if (present_queue_name) builder.append(queue_name); return builder.toHashCode(); } @Override public int compareTo(delete_queue_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_queue_name()).compareTo(other.is_set_queue_name()); if (lastComparison != 0) { return lastComparison; } if (is_set_queue_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queue_name, other.queue_name); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("delete_queue_args("); boolean first = true; sb.append("queue_name:"); if (this.queue_name == null) { sb.append("null"); } else { sb.append(this.queue_name); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class delete_queue_argsStandardSchemeFactory implements SchemeFactory { public delete_queue_argsStandardScheme getScheme() { return new delete_queue_argsStandardScheme(); } } private static class delete_queue_argsStandardScheme extends StandardScheme<delete_queue_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, delete_queue_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // QUEUE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.queue_name = iprot.readString(); struct.set_queue_name_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, delete_queue_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.queue_name != null) { oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC); oprot.writeString(struct.queue_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class delete_queue_argsTupleSchemeFactory implements SchemeFactory { public delete_queue_argsTupleScheme getScheme() { return new delete_queue_argsTupleScheme(); } } private static class delete_queue_argsTupleScheme extends TupleScheme<delete_queue_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, delete_queue_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_queue_name()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.is_set_queue_name()) { oprot.writeString(struct.queue_name); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, delete_queue_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.queue_name = iprot.readString(); struct.set_queue_name_isSet(true); } } } } public static class delete_queue_result implements org.apache.thrift.TBase<delete_queue_result, delete_queue_result._Fields>, java.io.Serializable, Cloneable, Comparable<delete_queue_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_queue_result"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new delete_queue_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new delete_queue_resultTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_queue_result.class, metaDataMap); } public delete_queue_result() { } /** * Performs a deep copy on <i>other</i>. */ public delete_queue_result(delete_queue_result other) { } public delete_queue_result deepCopy() { return new delete_queue_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 delete_queue_result) return this.equals((delete_queue_result)that); return false; } public boolean equals(delete_queue_result that) { if (that == null) return false; return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); return builder.toHashCode(); } @Override public int compareTo(delete_queue_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("delete_queue_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class delete_queue_resultStandardSchemeFactory implements SchemeFactory { public delete_queue_resultStandardScheme getScheme() { return new delete_queue_resultStandardScheme(); } } private static class delete_queue_resultStandardScheme extends StandardScheme<delete_queue_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, delete_queue_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, delete_queue_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class delete_queue_resultTupleSchemeFactory implements SchemeFactory { public delete_queue_resultTupleScheme getScheme() { return new delete_queue_resultTupleScheme(); } } private static class delete_queue_resultTupleScheme extends TupleScheme<delete_queue_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, delete_queue_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, delete_queue_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class current_status_args implements org.apache.thrift.TBase<current_status_args, current_status_args._Fields>, java.io.Serializable, Cloneable, Comparable<current_status_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("current_status_args"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new current_status_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new current_status_argsTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(current_status_args.class, metaDataMap); } public current_status_args() { } /** * Performs a deep copy on <i>other</i>. */ public current_status_args(current_status_args other) { } public current_status_args deepCopy() { return new current_status_args(this); } @Override public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof current_status_args) return this.equals((current_status_args)that); return false; } public boolean equals(current_status_args that) { if (that == null) return false; return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); return builder.toHashCode(); } @Override public int compareTo(current_status_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("current_status_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class current_status_argsStandardSchemeFactory implements SchemeFactory { public current_status_argsStandardScheme getScheme() { return new current_status_argsStandardScheme(); } } private static class current_status_argsStandardScheme extends StandardScheme<current_status_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, current_status_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, current_status_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class current_status_argsTupleSchemeFactory implements SchemeFactory { public current_status_argsTupleScheme getScheme() { return new current_status_argsTupleScheme(); } } private static class current_status_argsTupleScheme extends TupleScheme<current_status_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, current_status_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, current_status_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class current_status_result implements org.apache.thrift.TBase<current_status_result, current_status_result._Fields>, java.io.Serializable, Cloneable, Comparable<current_status_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("current_status_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new current_status_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new current_status_resultTupleSchemeFactory()); } private Status 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 { /** * * @see Status */ 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.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, Status.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(current_status_result.class, metaDataMap); } public current_status_result() { } public current_status_result( Status success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public current_status_result(current_status_result other) { if (other.is_set_success()) { this.success = other.success; } } public current_status_result deepCopy() { return new current_status_result(this); } @Override public void clear() { this.success = null; } /** * * @see Status */ public Status get_success() { return this.success; } /** * * @see Status */ public void set_success(Status success) { this.success = success; } public void unset_success() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean is_set_success() { return this.success != null; } public void set_success_isSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unset_success(); } else { set_success((Status)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return get_success(); } 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 is_set_success(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof current_status_result) return this.equals((current_status_result)that); return false; } public boolean equals(current_status_result that) { if (that == null) return false; boolean this_present_success = true && this.is_set_success(); boolean that_present_success = true && that.is_set_success(); 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() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (is_set_success()); builder.append(present_success); if (present_success) builder.append(success.getValue()); return builder.toHashCode(); } @Override public int compareTo(current_status_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success()); if (lastComparison != 0) { return lastComparison; } if (is_set_success()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("current_status_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class current_status_resultStandardSchemeFactory implements SchemeFactory { public current_status_resultStandardScheme getScheme() { return new current_status_resultStandardScheme(); } } private static class current_status_resultStandardScheme extends StandardScheme<current_status_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, current_status_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = Status.findByValue(iprot.readI32()); struct.set_success_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, current_status_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class current_status_resultTupleSchemeFactory implements SchemeFactory { public current_status_resultTupleScheme getScheme() { return new current_status_resultTupleScheme(); } } private static class current_status_resultTupleScheme extends TupleScheme<current_status_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, current_status_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_success()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.is_set_success()) { oprot.writeI32(struct.success.getValue()); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, current_status_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = Status.findByValue(iprot.readI32()); struct.set_success_isSet(true); } } } } public static class set_status_args implements org.apache.thrift.TBase<set_status_args, set_status_args._Fields>, java.io.Serializable, Cloneable, Comparable<set_status_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_status_args"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I32, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new set_status_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new set_status_argsTupleSchemeFactory()); } private Status 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 { /** * * @see Status */ STATUS((short)1, "status"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // STATUS return STATUS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, Status.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_status_args.class, metaDataMap); } public set_status_args() { } public set_status_args( Status status) { this(); this.status = status; } /** * Performs a deep copy on <i>other</i>. */ public set_status_args(set_status_args other) { if (other.is_set_status()) { this.status = other.status; } } public set_status_args deepCopy() { return new set_status_args(this); } @Override public void clear() { this.status = null; } /** * * @see Status */ public Status get_status() { return this.status; } /** * * @see Status */ public void set_status(Status status) { this.status = status; } public void unset_status() { this.status = null; } /** Returns true if field status is set (has been assigned a value) and false otherwise */ public boolean is_set_status() { return this.status != null; } public void set_status_isSet(boolean value) { if (!value) { this.status = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case STATUS: if (value == null) { unset_status(); } else { set_status((Status)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case STATUS: return get_status(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case STATUS: return is_set_status(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof set_status_args) return this.equals((set_status_args)that); return false; } public boolean equals(set_status_args that) { if (that == null) return false; boolean this_present_status = true && this.is_set_status(); boolean that_present_status = true && that.is_set_status(); 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() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_status = true && (is_set_status()); builder.append(present_status); if (present_status) builder.append(status.getValue()); return builder.toHashCode(); } @Override public int compareTo(set_status_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_status()).compareTo(other.is_set_status()); if (lastComparison != 0) { return lastComparison; } if (is_set_status()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.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 { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("set_status_args("); boolean first = true; 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 // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_status_argsStandardSchemeFactory implements SchemeFactory { public set_status_argsStandardScheme getScheme() { return new set_status_argsStandardScheme(); } } private static class set_status_argsStandardScheme extends StandardScheme<set_status_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, set_status_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // STATUS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.status = Status.findByValue(iprot.readI32()); struct.set_status_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_status_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.status != null) { oprot.writeFieldBegin(STATUS_FIELD_DESC); oprot.writeI32(struct.status.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_status_argsTupleSchemeFactory implements SchemeFactory { public set_status_argsTupleScheme getScheme() { return new set_status_argsTupleScheme(); } } private static class set_status_argsTupleScheme extends TupleScheme<set_status_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_status_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_status()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.is_set_status()) { oprot.writeI32(struct.status.getValue()); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_status_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.status = Status.findByValue(iprot.readI32()); struct.set_status_isSet(true); } } } } public static class set_status_result implements org.apache.thrift.TBase<set_status_result, set_status_result._Fields>, java.io.Serializable, Cloneable, Comparable<set_status_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_status_result"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new set_status_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new set_status_resultTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_status_result.class, metaDataMap); } public set_status_result() { } /** * Performs a deep copy on <i>other</i>. */ public set_status_result(set_status_result other) { } public set_status_result deepCopy() { return new set_status_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 set_status_result) return this.equals((set_status_result)that); return false; } public boolean equals(set_status_result that) { if (that == null) return false; return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); return builder.toHashCode(); } @Override public int compareTo(set_status_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("set_status_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class set_status_resultStandardSchemeFactory implements SchemeFactory { public set_status_resultStandardScheme getScheme() { return new set_status_resultStandardScheme(); } } private static class set_status_resultStandardScheme extends StandardScheme<set_status_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, set_status_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, set_status_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class set_status_resultTupleSchemeFactory implements SchemeFactory { public set_status_resultTupleScheme getScheme() { return new set_status_resultTupleScheme(); } } private static class set_status_resultTupleScheme extends TupleScheme<set_status_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, set_status_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, set_status_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class get_version_args implements org.apache.thrift.TBase<get_version_args, get_version_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_version_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_version_args"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_version_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_version_argsTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_version_args.class, metaDataMap); } public get_version_args() { } /** * Performs a deep copy on <i>other</i>. */ public get_version_args(get_version_args other) { } public get_version_args deepCopy() { return new get_version_args(this); } @Override public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_version_args) return this.equals((get_version_args)that); return false; } public boolean equals(get_version_args that) { if (that == null) return false; return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); return builder.toHashCode(); } @Override public int compareTo(get_version_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_version_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_version_argsStandardSchemeFactory implements SchemeFactory { public get_version_argsStandardScheme getScheme() { return new get_version_argsStandardScheme(); } } private static class get_version_argsStandardScheme extends StandardScheme<get_version_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_version_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_version_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_version_argsTupleSchemeFactory implements SchemeFactory { public get_version_argsTupleScheme getScheme() { return new get_version_argsTupleScheme(); } } private static class get_version_argsTupleScheme extends TupleScheme<get_version_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_version_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_version_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class get_version_result implements org.apache.thrift.TBase<get_version_result, get_version_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_version_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_version_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new get_version_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new get_version_resultTupleSchemeFactory()); } private String success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_version_result.class, metaDataMap); } public get_version_result() { } public get_version_result( String success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public get_version_result(get_version_result other) { if (other.is_set_success()) { this.success = other.success; } } public get_version_result deepCopy() { return new get_version_result(this); } @Override public void clear() { this.success = null; } public String get_success() { return this.success; } public void set_success(String success) { this.success = success; } public void unset_success() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean is_set_success() { return this.success != null; } public void set_success_isSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unset_success(); } else { set_success((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return get_success(); } 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 is_set_success(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_version_result) return this.equals((get_version_result)that); return false; } public boolean equals(get_version_result that) { if (that == null) return false; boolean this_present_success = true && this.is_set_success(); boolean that_present_success = true && that.is_set_success(); 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() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (is_set_success()); builder.append(present_success); if (present_success) builder.append(success); return builder.toHashCode(); } @Override public int compareTo(get_version_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success()); if (lastComparison != 0) { return lastComparison; } if (is_set_success()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_version_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class get_version_resultStandardSchemeFactory implements SchemeFactory { public get_version_resultStandardScheme getScheme() { return new get_version_resultStandardScheme(); } } private static class get_version_resultStandardScheme extends StandardScheme<get_version_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, get_version_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.set_success_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, get_version_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class get_version_resultTupleSchemeFactory implements SchemeFactory { public get_version_resultTupleScheme getScheme() { return new get_version_resultTupleScheme(); } } private static class get_version_resultTupleScheme extends TupleScheme<get_version_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, get_version_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_success()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.is_set_success()) { oprot.writeString(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, get_version_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readString(); struct.set_success_isSet(true); } } } } }