/**
* Autogenerated by Thrift Compiler (0.7.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package net.lag.kestrel.thrift;
import org.apache.commons.lang.builder.HashCodeBuilder;
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.thrift7.TException;
public List<Item> get(String queue_name, int max_items, int timeout_msec, int auto_abort_msec) throws org.apache.thrift7.TException;
public int confirm(String queue_name, Set<Long> ids) throws org.apache.thrift7.TException;
public int abort(String queue_name, Set<Long> ids) throws org.apache.thrift7.TException;
public QueueInfo peek(String queue_name) throws org.apache.thrift7.TException;
public void flush_queue(String queue_name) throws org.apache.thrift7.TException;
public void flush_all_queues() throws org.apache.thrift7.TException;
public void delete_queue(String queue_name) throws org.apache.thrift7.TException;
public String get_version() throws org.apache.thrift7.TException;
}
public interface AsyncIface {
public void put(String queue_name, List<ByteBuffer> items, int expiration_msec, org.apache.thrift7.async.AsyncMethodCallback<AsyncClient.put_call> resultHandler) throws org.apache.thrift7.TException;
public void get(String queue_name, int max_items, int timeout_msec, int auto_abort_msec, org.apache.thrift7.async.AsyncMethodCallback<AsyncClient.get_call> resultHandler) throws org.apache.thrift7.TException;
public void confirm(String queue_name, Set<Long> ids, org.apache.thrift7.async.AsyncMethodCallback<AsyncClient.confirm_call> resultHandler) throws org.apache.thrift7.TException;
public void abort(String queue_name, Set<Long> ids, org.apache.thrift7.async.AsyncMethodCallback<AsyncClient.abort_call> resultHandler) throws org.apache.thrift7.TException;
public void peek(String queue_name, org.apache.thrift7.async.AsyncMethodCallback<AsyncClient.peek_call> resultHandler) throws org.apache.thrift7.TException;
public void flush_queue(String queue_name, org.apache.thrift7.async.AsyncMethodCallback<AsyncClient.flush_queue_call> resultHandler) throws org.apache.thrift7.TException;
public void flush_all_queues(org.apache.thrift7.async.AsyncMethodCallback<AsyncClient.flush_all_queues_call> resultHandler) throws org.apache.thrift7.TException;
public void delete_queue(String queue_name, org.apache.thrift7.async.AsyncMethodCallback<AsyncClient.delete_queue_call> resultHandler) throws org.apache.thrift7.TException;
public void get_version(org.apache.thrift7.async.AsyncMethodCallback<AsyncClient.get_version_call> resultHandler) throws org.apache.thrift7.TException;
}
public static class Client extends org.apache.thrift7.TServiceClient implements Iface {
public static class Factory implements org.apache.thrift7.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift7.protocol.TProtocol prot) {
return new Client(prot);
}
public Client getClient(org.apache.thrift7.protocol.TProtocol iprot, org.apache.thrift7.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(org.apache.thrift7.protocol.TProtocol prot)
{
super(prot, prot);
}
public Client(org.apache.thrift7.protocol.TProtocol iprot, org.apache.thrift7.protocol.TProtocol oprot) {
super(iprot, oprot);
}
public int put(String queue_name, List<ByteBuffer> items, int expiration_msec) throws org.apache.thrift7.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.thrift7.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.thrift7.TException
{
put_result result = new put_result();
receiveBase(result, "put");
if (result.is_set_success()) {
return result.success;
}
throw new org.apache.thrift7.TApplicationException(org.apache.thrift7.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.thrift7.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.thrift7.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.thrift7.TException
{
get_result result = new get_result();
receiveBase(result, "get");
if (result.is_set_success()) {
return result.success;
}
throw new org.apache.thrift7.TApplicationException(org.apache.thrift7.TApplicationException.MISSING_RESULT, "get failed: unknown result");
}
public int confirm(String queue_name, Set<Long> ids) throws org.apache.thrift7.TException
{
send_confirm(queue_name, ids);
return recv_confirm();
}
public void send_confirm(String queue_name, Set<Long> ids) throws org.apache.thrift7.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.thrift7.TException
{
confirm_result result = new confirm_result();
receiveBase(result, "confirm");
if (result.is_set_success()) {
return result.success;
}
throw new org.apache.thrift7.TApplicationException(org.apache.thrift7.TApplicationException.MISSING_RESULT, "confirm failed: unknown result");
}
public int abort(String queue_name, Set<Long> ids) throws org.apache.thrift7.TException
{
send_abort(queue_name, ids);
return recv_abort();
}
public void send_abort(String queue_name, Set<Long> ids) throws org.apache.thrift7.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.thrift7.TException
{
abort_result result = new abort_result();
receiveBase(result, "abort");
if (result.is_set_success()) {
return result.success;
}
throw new org.apache.thrift7.TApplicationException(org.apache.thrift7.TApplicationException.MISSING_RESULT, "abort failed: unknown result");
}
public QueueInfo peek(String queue_name) throws org.apache.thrift7.TException
{
send_peek(queue_name);
return recv_peek();
}
public void send_peek(String queue_name) throws org.apache.thrift7.TException
{
peek_args args = new peek_args();
args.set_queue_name(queue_name);
sendBase("peek", args);
}
public QueueInfo recv_peek() throws org.apache.thrift7.TException
{
peek_result result = new peek_result();
receiveBase(result, "peek");
if (result.is_set_success()) {
return result.success;
}
throw new org.apache.thrift7.TApplicationException(org.apache.thrift7.TApplicationException.MISSING_RESULT, "peek failed: unknown result");
}
public void flush_queue(String queue_name) throws org.apache.thrift7.TException
{
send_flush_queue(queue_name);
recv_flush_queue();
}
public void send_flush_queue(String queue_name) throws org.apache.thrift7.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.thrift7.TException
{
flush_queue_result result = new flush_queue_result();
receiveBase(result, "flush_queue");
return;
}
public void flush_all_queues() throws org.apache.thrift7.TException
{
send_flush_all_queues();
recv_flush_all_queues();
}
public void send_flush_all_queues() throws org.apache.thrift7.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.thrift7.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.thrift7.TException
{
send_delete_queue(queue_name);
recv_delete_queue();
}
public void send_delete_queue(String queue_name) throws org.apache.thrift7.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.thrift7.TException
{
delete_queue_result result = new delete_queue_result();
receiveBase(result, "delete_queue");
return;
}
public String get_version() throws org.apache.thrift7.TException
{
send_get_version();
return recv_get_version();
}
public void send_get_version() throws org.apache.thrift7.TException
{
get_version_args args = new get_version_args();
sendBase("get_version", args);
}
public String recv_get_version() throws org.apache.thrift7.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.thrift7.TApplicationException(org.apache.thrift7.TApplicationException.MISSING_RESULT, "get_version failed: unknown result");
}
}
public static class AsyncClient extends org.apache.thrift7.async.TAsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift7.async.TAsyncClientFactory<AsyncClient> {
private org.apache.thrift7.async.TAsyncClientManager clientManager;
private org.apache.thrift7.protocol.TProtocolFactory protocolFactory;
public Factory(org.apache.thrift7.async.TAsyncClientManager clientManager, org.apache.thrift7.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(org.apache.thrift7.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(org.apache.thrift7.protocol.TProtocolFactory protocolFactory, org.apache.thrift7.async.TAsyncClientManager clientManager, org.apache.thrift7.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void put(String queue_name, List<ByteBuffer> items, int expiration_msec, org.apache.thrift7.async.AsyncMethodCallback<put_call> resultHandler) throws org.apache.thrift7.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.thrift7.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.thrift7.async.AsyncMethodCallback<put_call> resultHandler, org.apache.thrift7.async.TAsyncClient client, org.apache.thrift7.protocol.TProtocolFactory protocolFactory, org.apache.thrift7.transport.TNonblockingTransport transport) throws org.apache.thrift7.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.thrift7.protocol.TProtocol prot) throws org.apache.thrift7.TException {
prot.writeMessageBegin(new org.apache.thrift7.protocol.TMessage("put", org.apache.thrift7.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.thrift7.TException {
if (getState() != org.apache.thrift7.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift7.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift7.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift7.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.thrift7.async.AsyncMethodCallback<get_call> resultHandler) throws org.apache.thrift7.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.thrift7.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.thrift7.async.AsyncMethodCallback<get_call> resultHandler, org.apache.thrift7.async.TAsyncClient client, org.apache.thrift7.protocol.TProtocolFactory protocolFactory, org.apache.thrift7.transport.TNonblockingTransport transport) throws org.apache.thrift7.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.thrift7.protocol.TProtocol prot) throws org.apache.thrift7.TException {
prot.writeMessageBegin(new org.apache.thrift7.protocol.TMessage("get", org.apache.thrift7.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.thrift7.TException {
if (getState() != org.apache.thrift7.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift7.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift7.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift7.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_get();
}
}
public void confirm(String queue_name, Set<Long> ids, org.apache.thrift7.async.AsyncMethodCallback<confirm_call> resultHandler) throws org.apache.thrift7.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.thrift7.async.TAsyncMethodCall {
private String queue_name;
private Set<Long> ids;
public confirm_call(String queue_name, Set<Long> ids, org.apache.thrift7.async.AsyncMethodCallback<confirm_call> resultHandler, org.apache.thrift7.async.TAsyncClient client, org.apache.thrift7.protocol.TProtocolFactory protocolFactory, org.apache.thrift7.transport.TNonblockingTransport transport) throws org.apache.thrift7.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.queue_name = queue_name;
this.ids = ids;
}
public void write_args(org.apache.thrift7.protocol.TProtocol prot) throws org.apache.thrift7.TException {
prot.writeMessageBegin(new org.apache.thrift7.protocol.TMessage("confirm", org.apache.thrift7.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.thrift7.TException {
if (getState() != org.apache.thrift7.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift7.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift7.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift7.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_confirm();
}
}
public void abort(String queue_name, Set<Long> ids, org.apache.thrift7.async.AsyncMethodCallback<abort_call> resultHandler) throws org.apache.thrift7.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.thrift7.async.TAsyncMethodCall {
private String queue_name;
private Set<Long> ids;
public abort_call(String queue_name, Set<Long> ids, org.apache.thrift7.async.AsyncMethodCallback<abort_call> resultHandler, org.apache.thrift7.async.TAsyncClient client, org.apache.thrift7.protocol.TProtocolFactory protocolFactory, org.apache.thrift7.transport.TNonblockingTransport transport) throws org.apache.thrift7.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.queue_name = queue_name;
this.ids = ids;
}
public void write_args(org.apache.thrift7.protocol.TProtocol prot) throws org.apache.thrift7.TException {
prot.writeMessageBegin(new org.apache.thrift7.protocol.TMessage("abort", org.apache.thrift7.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.thrift7.TException {
if (getState() != org.apache.thrift7.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift7.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift7.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift7.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_abort();
}
}
public void peek(String queue_name, org.apache.thrift7.async.AsyncMethodCallback<peek_call> resultHandler) throws org.apache.thrift7.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.thrift7.async.TAsyncMethodCall {
private String queue_name;
public peek_call(String queue_name, org.apache.thrift7.async.AsyncMethodCallback<peek_call> resultHandler, org.apache.thrift7.async.TAsyncClient client, org.apache.thrift7.protocol.TProtocolFactory protocolFactory, org.apache.thrift7.transport.TNonblockingTransport transport) throws org.apache.thrift7.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.queue_name = queue_name;
}
public void write_args(org.apache.thrift7.protocol.TProtocol prot) throws org.apache.thrift7.TException {
prot.writeMessageBegin(new org.apache.thrift7.protocol.TMessage("peek", org.apache.thrift7.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.thrift7.TException {
if (getState() != org.apache.thrift7.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift7.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift7.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift7.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_peek();
}
}
public void flush_queue(String queue_name, org.apache.thrift7.async.AsyncMethodCallback<flush_queue_call> resultHandler) throws org.apache.thrift7.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.thrift7.async.TAsyncMethodCall {
private String queue_name;
public flush_queue_call(String queue_name, org.apache.thrift7.async.AsyncMethodCallback<flush_queue_call> resultHandler, org.apache.thrift7.async.TAsyncClient client, org.apache.thrift7.protocol.TProtocolFactory protocolFactory, org.apache.thrift7.transport.TNonblockingTransport transport) throws org.apache.thrift7.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.queue_name = queue_name;
}
public void write_args(org.apache.thrift7.protocol.TProtocol prot) throws org.apache.thrift7.TException {
prot.writeMessageBegin(new org.apache.thrift7.protocol.TMessage("flush_queue", org.apache.thrift7.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.thrift7.TException {
if (getState() != org.apache.thrift7.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift7.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift7.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift7.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_flush_queue();
}
}
public void flush_all_queues(org.apache.thrift7.async.AsyncMethodCallback<flush_all_queues_call> resultHandler) throws org.apache.thrift7.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.thrift7.async.TAsyncMethodCall {
public flush_all_queues_call(org.apache.thrift7.async.AsyncMethodCallback<flush_all_queues_call> resultHandler, org.apache.thrift7.async.TAsyncClient client, org.apache.thrift7.protocol.TProtocolFactory protocolFactory, org.apache.thrift7.transport.TNonblockingTransport transport) throws org.apache.thrift7.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
public void write_args(org.apache.thrift7.protocol.TProtocol prot) throws org.apache.thrift7.TException {
prot.writeMessageBegin(new org.apache.thrift7.protocol.TMessage("flush_all_queues", org.apache.thrift7.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.thrift7.TException {
if (getState() != org.apache.thrift7.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift7.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift7.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift7.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_flush_all_queues();
}
}
public void delete_queue(String queue_name, org.apache.thrift7.async.AsyncMethodCallback<delete_queue_call> resultHandler) throws org.apache.thrift7.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.thrift7.async.TAsyncMethodCall {
private String queue_name;
public delete_queue_call(String queue_name, org.apache.thrift7.async.AsyncMethodCallback<delete_queue_call> resultHandler, org.apache.thrift7.async.TAsyncClient client, org.apache.thrift7.protocol.TProtocolFactory protocolFactory, org.apache.thrift7.transport.TNonblockingTransport transport) throws org.apache.thrift7.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.queue_name = queue_name;
}
public void write_args(org.apache.thrift7.protocol.TProtocol prot) throws org.apache.thrift7.TException {
prot.writeMessageBegin(new org.apache.thrift7.protocol.TMessage("delete_queue", org.apache.thrift7.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.thrift7.TException {
if (getState() != org.apache.thrift7.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift7.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift7.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift7.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_delete_queue();
}
}
public void get_version(org.apache.thrift7.async.AsyncMethodCallback<get_version_call> resultHandler) throws org.apache.thrift7.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.thrift7.async.TAsyncMethodCall {
public get_version_call(org.apache.thrift7.async.AsyncMethodCallback<get_version_call> resultHandler, org.apache.thrift7.async.TAsyncClient client, org.apache.thrift7.protocol.TProtocolFactory protocolFactory, org.apache.thrift7.transport.TNonblockingTransport transport) throws org.apache.thrift7.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
public void write_args(org.apache.thrift7.protocol.TProtocol prot) throws org.apache.thrift7.TException {
prot.writeMessageBegin(new org.apache.thrift7.protocol.TMessage("get_version", org.apache.thrift7.protocol.TMessageType.CALL, 0));
get_version_args args = new get_version_args();
args.write(prot);
prot.writeMessageEnd();
}
public String getResult() throws org.apache.thrift7.TException {
if (getState() != org.apache.thrift7.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift7.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift7.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift7.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_get_version();
}
}
}
public static class Processor<I extends Iface> extends org.apache.thrift7.TBaseProcessor implements org.apache.thrift7.TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new HashMap<String, org.apache.thrift7.ProcessFunction<I, ? extends org.apache.thrift7.TBase>>()));
}
protected Processor(I iface, Map<String, org.apache.thrift7.ProcessFunction<I, ? extends org.apache.thrift7.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends Iface> Map<String, org.apache.thrift7.ProcessFunction<I, ? extends org.apache.thrift7.TBase>> getProcessMap(Map<String, org.apache.thrift7.ProcessFunction<I, ? extends org.apache.thrift7.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("get_version", new get_version());
return processMap;
}
private static class put<I extends Iface> extends org.apache.thrift7.ProcessFunction<I, put_args> {
public put() {
super("put");
}
protected put_args getEmptyArgsInstance() {
return new put_args();
}
protected put_result getResult(I iface, put_args args) throws org.apache.thrift7.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;
}
}
private static class get<I extends Iface> extends org.apache.thrift7.ProcessFunction<I, get_args> {
public get() {
super("get");
}
protected get_args getEmptyArgsInstance() {
return new get_args();
}
protected get_result getResult(I iface, get_args args) throws org.apache.thrift7.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;
}
}
private static class confirm<I extends Iface> extends org.apache.thrift7.ProcessFunction<I, confirm_args> {
public confirm() {
super("confirm");
}
protected confirm_args getEmptyArgsInstance() {
return new confirm_args();
}
protected confirm_result getResult(I iface, confirm_args args) throws org.apache.thrift7.TException {
confirm_result result = new confirm_result();
result.success = iface.confirm(args.queue_name, args.ids);
result.set_success_isSet(true);
return result;
}
}
private static class abort<I extends Iface> extends org.apache.thrift7.ProcessFunction<I, abort_args> {
public abort() {
super("abort");
}
protected abort_args getEmptyArgsInstance() {
return new abort_args();
}
protected abort_result getResult(I iface, abort_args args) throws org.apache.thrift7.TException {
abort_result result = new abort_result();
result.success = iface.abort(args.queue_name, args.ids);
result.set_success_isSet(true);
return result;
}
}
private static class peek<I extends Iface> extends org.apache.thrift7.ProcessFunction<I, peek_args> {
public peek() {
super("peek");
}
protected peek_args getEmptyArgsInstance() {
return new peek_args();
}
protected peek_result getResult(I iface, peek_args args) throws org.apache.thrift7.TException {
peek_result result = new peek_result();
result.success = iface.peek(args.queue_name);
return result;
}
}
private static class flush_queue<I extends Iface> extends org.apache.thrift7.ProcessFunction<I, flush_queue_args> {
public flush_queue() {
super("flush_queue");
}
protected flush_queue_args getEmptyArgsInstance() {
return new flush_queue_args();
}
protected flush_queue_result getResult(I iface, flush_queue_args args) throws org.apache.thrift7.TException {
flush_queue_result result = new flush_queue_result();
iface.flush_queue(args.queue_name);
return result;
}
}
private static class flush_all_queues<I extends Iface> extends org.apache.thrift7.ProcessFunction<I, flush_all_queues_args> {
public flush_all_queues() {
super("flush_all_queues");
}
protected flush_all_queues_args getEmptyArgsInstance() {
return new flush_all_queues_args();
}
protected flush_all_queues_result getResult(I iface, flush_all_queues_args args) throws org.apache.thrift7.TException {
flush_all_queues_result result = new flush_all_queues_result();
iface.flush_all_queues();
return result;
}
}
private static class delete_queue<I extends Iface> extends org.apache.thrift7.ProcessFunction<I, delete_queue_args> {
public delete_queue() {
super("delete_queue");
}
protected delete_queue_args getEmptyArgsInstance() {
return new delete_queue_args();
}
protected delete_queue_result getResult(I iface, delete_queue_args args) throws org.apache.thrift7.TException {
delete_queue_result result = new delete_queue_result();
iface.delete_queue(args.queue_name);
return result;
}
}
private static class get_version<I extends Iface> extends org.apache.thrift7.ProcessFunction<I, get_version_args> {
public get_version() {
super("get_version");
}
protected get_version_args getEmptyArgsInstance() {
return new get_version_args();
}
protected get_version_result getResult(I iface, get_version_args args) throws org.apache.thrift7.TException {
get_version_result result = new get_version_result();
result.success = iface.get_version();
return result;
}
}
}
public static class put_args implements org.apache.thrift7.TBase<put_args, put_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("put_args");
private static final org.apache.thrift7.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift7.protocol.TField("queue_name", org.apache.thrift7.protocol.TType.STRING, (short)1);
private static final org.apache.thrift7.protocol.TField ITEMS_FIELD_DESC = new org.apache.thrift7.protocol.TField("items", org.apache.thrift7.protocol.TType.LIST, (short)2);
private static final org.apache.thrift7.protocol.TField EXPIRATION_MSEC_FIELD_DESC = new org.apache.thrift7.protocol.TField("expiration_msec", org.apache.thrift7.protocol.TType.I32, (short)3);
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.thrift7.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 BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift7.meta_data.FieldMetaData("queue_name", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
tmpMap.put(_Fields.ITEMS, new org.apache.thrift7.meta_data.FieldMetaData("items", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.ListMetaData(org.apache.thrift7.protocol.TType.LIST,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING , true))));
tmpMap.put(_Fields.EXPIRATION_MSEC, new org.apache.thrift7.meta_data.FieldMetaData("expiration_msec", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.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_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.is_set_queue_name()) {
this.queue_name = other.queue_name;
}
if (other.is_set_items()) {
List<ByteBuffer> __this__items = new ArrayList<ByteBuffer>();
for (ByteBuffer other_element : other.items) {
ByteBuffer temp_binary_element = org.apache.thrift7.TBaseHelper.copyBinary(other_element);
;
__this__items.add(temp_binary_element);
}
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_bit_vector.clear(__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 __isset_bit_vector.get(__EXPIRATION_MSEC_ISSET_ID);
}
public void set_expiration_msec_isSet(boolean value) {
__isset_bit_vector.set(__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();
}
public int compareTo(put_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
put_args typedOther = (put_args)other;
lastComparison = Boolean.valueOf(is_set_queue_name()).compareTo(typedOther.is_set_queue_name());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_queue_name()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.queue_name, typedOther.queue_name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_items()).compareTo(typedOther.is_set_items());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_items()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.items, typedOther.items);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_expiration_msec()).compareTo(typedOther.is_set_expiration_msec());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_expiration_msec()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.expiration_msec, typedOther.expiration_msec);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // QUEUE_NAME
if (field.type == org.apache.thrift7.protocol.TType.STRING) {
this.queue_name = iprot.readString();
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // ITEMS
if (field.type == org.apache.thrift7.protocol.TType.LIST) {
{
org.apache.thrift7.protocol.TList _list0 = iprot.readListBegin();
this.items = new ArrayList<ByteBuffer>(_list0.size);
for (int _i1 = 0; _i1 < _list0.size; ++_i1)
{
ByteBuffer _elem2; // required
_elem2 = iprot.readBinary();
this.items.add(_elem2);
}
iprot.readListEnd();
}
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // EXPIRATION_MSEC
if (field.type == org.apache.thrift7.protocol.TType.I32) {
this.expiration_msec = iprot.readI32();
set_expiration_msec_isSet(true);
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.queue_name != null) {
oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
oprot.writeString(this.queue_name);
oprot.writeFieldEnd();
}
if (this.items != null) {
oprot.writeFieldBegin(ITEMS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift7.protocol.TList(org.apache.thrift7.protocol.TType.STRING, this.items.size()));
for (ByteBuffer _iter3 : this.items)
{
oprot.writeBinary(_iter3);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(EXPIRATION_MSEC_FIELD_DESC);
oprot.writeI32(this.expiration_msec);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@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.thrift7.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bit_vector = new BitSet(1);
read(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class put_result implements org.apache.thrift7.TBase<put_result, put_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("put_result");
private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.I32, (short)0);
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.thrift7.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 BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift7.meta_data.FieldMetaData("success", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.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_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
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_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean is_set_success() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void set_success_isSet(boolean value) {
__isset_bit_vector.set(__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();
}
public int compareTo(put_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
put_result typedOther = (put_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift7.protocol.TType.I32) {
this.success = iprot.readI32();
set_success_isSet(true);
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeI32(this.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@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.thrift7.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.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.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class get_args implements org.apache.thrift7.TBase<get_args, get_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("get_args");
private static final org.apache.thrift7.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift7.protocol.TField("queue_name", org.apache.thrift7.protocol.TType.STRING, (short)1);
private static final org.apache.thrift7.protocol.TField MAX_ITEMS_FIELD_DESC = new org.apache.thrift7.protocol.TField("max_items", org.apache.thrift7.protocol.TType.I32, (short)2);
private static final org.apache.thrift7.protocol.TField TIMEOUT_MSEC_FIELD_DESC = new org.apache.thrift7.protocol.TField("timeout_msec", org.apache.thrift7.protocol.TType.I32, (short)3);
private static final org.apache.thrift7.protocol.TField AUTO_ABORT_MSEC_FIELD_DESC = new org.apache.thrift7.protocol.TField("auto_abort_msec", org.apache.thrift7.protocol.TType.I32, (short)4);
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.thrift7.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 BitSet __isset_bit_vector = new BitSet(3);
public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift7.meta_data.FieldMetaData("queue_name", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
tmpMap.put(_Fields.MAX_ITEMS, new org.apache.thrift7.meta_data.FieldMetaData("max_items", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.I32)));
tmpMap.put(_Fields.TIMEOUT_MSEC, new org.apache.thrift7.meta_data.FieldMetaData("timeout_msec", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.I32)));
tmpMap.put(_Fields.AUTO_ABORT_MSEC, new org.apache.thrift7.meta_data.FieldMetaData("auto_abort_msec", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.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_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
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_bit_vector.clear(__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 __isset_bit_vector.get(__MAX_ITEMS_ISSET_ID);
}
public void set_max_items_isSet(boolean value) {
__isset_bit_vector.set(__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_bit_vector.clear(__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 __isset_bit_vector.get(__TIMEOUT_MSEC_ISSET_ID);
}
public void set_timeout_msec_isSet(boolean value) {
__isset_bit_vector.set(__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_bit_vector.clear(__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 __isset_bit_vector.get(__AUTO_ABORT_MSEC_ISSET_ID);
}
public void set_auto_abort_msec_isSet(boolean value) {
__isset_bit_vector.set(__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();
}
public int compareTo(get_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
get_args typedOther = (get_args)other;
lastComparison = Boolean.valueOf(is_set_queue_name()).compareTo(typedOther.is_set_queue_name());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_queue_name()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.queue_name, typedOther.queue_name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_max_items()).compareTo(typedOther.is_set_max_items());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_max_items()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.max_items, typedOther.max_items);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_timeout_msec()).compareTo(typedOther.is_set_timeout_msec());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_timeout_msec()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.timeout_msec, typedOther.timeout_msec);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_auto_abort_msec()).compareTo(typedOther.is_set_auto_abort_msec());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_auto_abort_msec()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.auto_abort_msec, typedOther.auto_abort_msec);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // QUEUE_NAME
if (field.type == org.apache.thrift7.protocol.TType.STRING) {
this.queue_name = iprot.readString();
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // MAX_ITEMS
if (field.type == org.apache.thrift7.protocol.TType.I32) {
this.max_items = iprot.readI32();
set_max_items_isSet(true);
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // TIMEOUT_MSEC
if (field.type == org.apache.thrift7.protocol.TType.I32) {
this.timeout_msec = iprot.readI32();
set_timeout_msec_isSet(true);
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 4: // AUTO_ABORT_MSEC
if (field.type == org.apache.thrift7.protocol.TType.I32) {
this.auto_abort_msec = iprot.readI32();
set_auto_abort_msec_isSet(true);
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.queue_name != null) {
oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
oprot.writeString(this.queue_name);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(MAX_ITEMS_FIELD_DESC);
oprot.writeI32(this.max_items);
oprot.writeFieldEnd();
oprot.writeFieldBegin(TIMEOUT_MSEC_FIELD_DESC);
oprot.writeI32(this.timeout_msec);
oprot.writeFieldEnd();
oprot.writeFieldBegin(AUTO_ABORT_MSEC_FIELD_DESC);
oprot.writeI32(this.auto_abort_msec);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@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.thrift7.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bit_vector = new BitSet(1);
read(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class get_result implements org.apache.thrift7.TBase<get_result, get_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("get_result");
private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.LIST, (short)0);
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.thrift7.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.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift7.meta_data.FieldMetaData("success", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.ListMetaData(org.apache.thrift7.protocol.TType.LIST,
new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, Item.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.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>();
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();
}
public int compareTo(get_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
get_result typedOther = (get_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift7.protocol.TType.LIST) {
{
org.apache.thrift7.protocol.TList _list4 = iprot.readListBegin();
this.success = new ArrayList<Item>(_list4.size);
for (int _i5 = 0; _i5 < _list4.size; ++_i5)
{
Item _elem6; // required
_elem6 = new Item();
_elem6.read(iprot);
this.success.add(_elem6);
}
iprot.readListEnd();
}
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift7.protocol.TList(org.apache.thrift7.protocol.TType.STRUCT, this.success.size()));
for (Item _iter7 : this.success)
{
_iter7.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@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.thrift7.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.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.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class confirm_args implements org.apache.thrift7.TBase<confirm_args, confirm_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("confirm_args");
private static final org.apache.thrift7.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift7.protocol.TField("queue_name", org.apache.thrift7.protocol.TType.STRING, (short)1);
private static final org.apache.thrift7.protocol.TField IDS_FIELD_DESC = new org.apache.thrift7.protocol.TField("ids", org.apache.thrift7.protocol.TType.SET, (short)2);
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.thrift7.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.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift7.meta_data.FieldMetaData("queue_name", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
tmpMap.put(_Fields.IDS, new org.apache.thrift7.meta_data.FieldMetaData("ids", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.SetMetaData(org.apache.thrift7.protocol.TType.SET,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.I64))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.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>();
for (Long other_element : other.ids) {
__this__ids.add(other_element);
}
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();
}
public int compareTo(confirm_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
confirm_args typedOther = (confirm_args)other;
lastComparison = Boolean.valueOf(is_set_queue_name()).compareTo(typedOther.is_set_queue_name());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_queue_name()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.queue_name, typedOther.queue_name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_ids()).compareTo(typedOther.is_set_ids());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_ids()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.ids, typedOther.ids);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // QUEUE_NAME
if (field.type == org.apache.thrift7.protocol.TType.STRING) {
this.queue_name = iprot.readString();
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // IDS
if (field.type == org.apache.thrift7.protocol.TType.SET) {
{
org.apache.thrift7.protocol.TSet _set8 = iprot.readSetBegin();
this.ids = new HashSet<Long>(2*_set8.size);
for (int _i9 = 0; _i9 < _set8.size; ++_i9)
{
long _elem10; // required
_elem10 = iprot.readI64();
this.ids.add(_elem10);
}
iprot.readSetEnd();
}
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.queue_name != null) {
oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
oprot.writeString(this.queue_name);
oprot.writeFieldEnd();
}
if (this.ids != null) {
oprot.writeFieldBegin(IDS_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift7.protocol.TSet(org.apache.thrift7.protocol.TType.I64, this.ids.size()));
for (long _iter11 : this.ids)
{
oprot.writeI64(_iter11);
}
oprot.writeSetEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@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.thrift7.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.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.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class confirm_result implements org.apache.thrift7.TBase<confirm_result, confirm_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("confirm_result");
private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.I32, (short)0);
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.thrift7.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 BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift7.meta_data.FieldMetaData("success", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.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_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
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_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean is_set_success() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void set_success_isSet(boolean value) {
__isset_bit_vector.set(__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();
}
public int compareTo(confirm_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
confirm_result typedOther = (confirm_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift7.protocol.TType.I32) {
this.success = iprot.readI32();
set_success_isSet(true);
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeI32(this.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@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.thrift7.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.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.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class abort_args implements org.apache.thrift7.TBase<abort_args, abort_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("abort_args");
private static final org.apache.thrift7.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift7.protocol.TField("queue_name", org.apache.thrift7.protocol.TType.STRING, (short)1);
private static final org.apache.thrift7.protocol.TField IDS_FIELD_DESC = new org.apache.thrift7.protocol.TField("ids", org.apache.thrift7.protocol.TType.SET, (short)2);
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.thrift7.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.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift7.meta_data.FieldMetaData("queue_name", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
tmpMap.put(_Fields.IDS, new org.apache.thrift7.meta_data.FieldMetaData("ids", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.SetMetaData(org.apache.thrift7.protocol.TType.SET,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.I64))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.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>();
for (Long other_element : other.ids) {
__this__ids.add(other_element);
}
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();
}
public int compareTo(abort_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
abort_args typedOther = (abort_args)other;
lastComparison = Boolean.valueOf(is_set_queue_name()).compareTo(typedOther.is_set_queue_name());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_queue_name()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.queue_name, typedOther.queue_name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_ids()).compareTo(typedOther.is_set_ids());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_ids()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.ids, typedOther.ids);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // QUEUE_NAME
if (field.type == org.apache.thrift7.protocol.TType.STRING) {
this.queue_name = iprot.readString();
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // IDS
if (field.type == org.apache.thrift7.protocol.TType.SET) {
{
org.apache.thrift7.protocol.TSet _set12 = iprot.readSetBegin();
this.ids = new HashSet<Long>(2*_set12.size);
for (int _i13 = 0; _i13 < _set12.size; ++_i13)
{
long _elem14; // required
_elem14 = iprot.readI64();
this.ids.add(_elem14);
}
iprot.readSetEnd();
}
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.queue_name != null) {
oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
oprot.writeString(this.queue_name);
oprot.writeFieldEnd();
}
if (this.ids != null) {
oprot.writeFieldBegin(IDS_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift7.protocol.TSet(org.apache.thrift7.protocol.TType.I64, this.ids.size()));
for (long _iter15 : this.ids)
{
oprot.writeI64(_iter15);
}
oprot.writeSetEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@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.thrift7.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.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.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class abort_result implements org.apache.thrift7.TBase<abort_result, abort_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("abort_result");
private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.I32, (short)0);
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.thrift7.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 BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift7.meta_data.FieldMetaData("success", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.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_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
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_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean is_set_success() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void set_success_isSet(boolean value) {
__isset_bit_vector.set(__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();
}
public int compareTo(abort_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
abort_result typedOther = (abort_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift7.protocol.TType.I32) {
this.success = iprot.readI32();
set_success_isSet(true);
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeI32(this.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@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.thrift7.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.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.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class peek_args implements org.apache.thrift7.TBase<peek_args, peek_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("peek_args");
private static final org.apache.thrift7.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift7.protocol.TField("queue_name", org.apache.thrift7.protocol.TType.STRING, (short)1);
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.thrift7.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.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift7.meta_data.FieldMetaData("queue_name", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.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();
}
public int compareTo(peek_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
peek_args typedOther = (peek_args)other;
lastComparison = Boolean.valueOf(is_set_queue_name()).compareTo(typedOther.is_set_queue_name());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_queue_name()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.queue_name, typedOther.queue_name);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // QUEUE_NAME
if (field.type == org.apache.thrift7.protocol.TType.STRING) {
this.queue_name = iprot.readString();
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.queue_name != null) {
oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
oprot.writeString(this.queue_name);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@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.thrift7.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.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.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class peek_result implements org.apache.thrift7.TBase<peek_result, peek_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("peek_result");
private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.STRUCT, (short)0);
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.thrift7.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.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift7.meta_data.FieldMetaData("success", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, QueueInfo.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.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();
}
public int compareTo(peek_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
peek_result typedOther = (peek_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift7.protocol.TType.STRUCT) {
this.success = new QueueInfo();
this.success.read(iprot);
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
this.success.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@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.thrift7.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.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.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class flush_queue_args implements org.apache.thrift7.TBase<flush_queue_args, flush_queue_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("flush_queue_args");
private static final org.apache.thrift7.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift7.protocol.TField("queue_name", org.apache.thrift7.protocol.TType.STRING, (short)1);
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.thrift7.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.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift7.meta_data.FieldMetaData("queue_name", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.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();
}
public int compareTo(flush_queue_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
flush_queue_args typedOther = (flush_queue_args)other;
lastComparison = Boolean.valueOf(is_set_queue_name()).compareTo(typedOther.is_set_queue_name());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_queue_name()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.queue_name, typedOther.queue_name);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // QUEUE_NAME
if (field.type == org.apache.thrift7.protocol.TType.STRING) {
this.queue_name = iprot.readString();
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.queue_name != null) {
oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
oprot.writeString(this.queue_name);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@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.thrift7.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.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.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class flush_queue_result implements org.apache.thrift7.TBase<flush_queue_result, flush_queue_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("flush_queue_result");
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.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.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.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();
}
public int compareTo(flush_queue_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
flush_queue_result typedOther = (flush_queue_result)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@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.thrift7.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.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.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class flush_all_queues_args implements org.apache.thrift7.TBase<flush_all_queues_args, flush_all_queues_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("flush_all_queues_args");
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.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.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.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();
}
public int compareTo(flush_all_queues_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
flush_all_queues_args typedOther = (flush_all_queues_args)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@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.thrift7.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.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.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class flush_all_queues_result implements org.apache.thrift7.TBase<flush_all_queues_result, flush_all_queues_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("flush_all_queues_result");
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.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.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.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();
}
public int compareTo(flush_all_queues_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
flush_all_queues_result typedOther = (flush_all_queues_result)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@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.thrift7.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.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.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class delete_queue_args implements org.apache.thrift7.TBase<delete_queue_args, delete_queue_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("delete_queue_args");
private static final org.apache.thrift7.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift7.protocol.TField("queue_name", org.apache.thrift7.protocol.TType.STRING, (short)1);
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.thrift7.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.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift7.meta_data.FieldMetaData("queue_name", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.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();
}
public int compareTo(delete_queue_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
delete_queue_args typedOther = (delete_queue_args)other;
lastComparison = Boolean.valueOf(is_set_queue_name()).compareTo(typedOther.is_set_queue_name());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_queue_name()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.queue_name, typedOther.queue_name);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // QUEUE_NAME
if (field.type == org.apache.thrift7.protocol.TType.STRING) {
this.queue_name = iprot.readString();
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.queue_name != null) {
oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
oprot.writeString(this.queue_name);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@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.thrift7.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.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.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class delete_queue_result implements org.apache.thrift7.TBase<delete_queue_result, delete_queue_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("delete_queue_result");
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.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.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.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();
}
public int compareTo(delete_queue_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
delete_queue_result typedOther = (delete_queue_result)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@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.thrift7.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.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.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class get_version_args implements org.apache.thrift7.TBase<get_version_args, get_version_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("get_version_args");
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.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.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.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();
}
public int compareTo(get_version_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
get_version_args typedOther = (get_version_args)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@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.thrift7.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.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.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
public static class get_version_result implements org.apache.thrift7.TBase<get_version_result, get_version_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("get_version_result");
private static final org.apache.thrift7.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift7.protocol.TField("success", org.apache.thrift7.protocol.TType.STRING, (short)0);
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.thrift7.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.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift7.meta_data.FieldMetaData("success", org.apache.thrift7.TFieldRequirementType.DEFAULT,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.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();
}
public int compareTo(get_version_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
get_version_result typedOther = (get_version_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == org.apache.thrift7.protocol.TType.STRING) {
this.success = iprot.readString();
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeString(this.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@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.thrift7.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.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.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
}