/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package com.flaptor.indextank.rpc;
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;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
@SuppressWarnings("all") public class Controller {
public interface Iface {
public boolean start_engine(String json_configuration) throws NebuException, TException;
public int kill_engine(String index_code, int base_port) throws NebuException, TException;
public WorkerMountStats get_worker_mount_stats() throws NebuException, TException;
public WorkerLoadStats get_worker_load_stats() throws NebuException, TException;
public IndexStats get_worker_index_stats(String index_code, int port) throws NebuException, TException;
public void stats() throws NebuException, TException;
public int update_worker(String source_host) throws TException;
public void restart_controller() throws TException;
public String head(String file, int lines, String index_code, int base_port) throws NebuException, TException;
public String tail(String file, int lines, String index_code, int base_port) throws NebuException, TException;
public String ps_info(String pidfile, String index_code, int base_port) throws NebuException, TException;
}
public interface AsyncIface {
public void start_engine(String json_configuration, AsyncMethodCallback<AsyncClient.start_engine_call> resultHandler) throws TException;
public void kill_engine(String index_code, int base_port, AsyncMethodCallback<AsyncClient.kill_engine_call> resultHandler) throws TException;
public void get_worker_mount_stats(AsyncMethodCallback<AsyncClient.get_worker_mount_stats_call> resultHandler) throws TException;
public void get_worker_load_stats(AsyncMethodCallback<AsyncClient.get_worker_load_stats_call> resultHandler) throws TException;
public void get_worker_index_stats(String index_code, int port, AsyncMethodCallback<AsyncClient.get_worker_index_stats_call> resultHandler) throws TException;
public void stats(AsyncMethodCallback<AsyncClient.stats_call> resultHandler) throws TException;
public void update_worker(String source_host, AsyncMethodCallback<AsyncClient.update_worker_call> resultHandler) throws TException;
public void restart_controller(AsyncMethodCallback<AsyncClient.restart_controller_call> resultHandler) throws TException;
public void head(String file, int lines, String index_code, int base_port, AsyncMethodCallback<AsyncClient.head_call> resultHandler) throws TException;
public void tail(String file, int lines, String index_code, int base_port, AsyncMethodCallback<AsyncClient.tail_call> resultHandler) throws TException;
public void ps_info(String pidfile, String index_code, int base_port, AsyncMethodCallback<AsyncClient.ps_info_call> resultHandler) throws TException;
}
public static class Client implements TServiceClient, Iface {
public static class Factory implements TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(TProtocol prot) {
return new Client(prot);
}
public Client getClient(TProtocol iprot, TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(TProtocol prot)
{
this(prot, prot);
}
public Client(TProtocol iprot, TProtocol oprot)
{
iprot_ = iprot;
oprot_ = oprot;
}
protected TProtocol iprot_;
protected TProtocol oprot_;
protected int seqid_;
public TProtocol getInputProtocol()
{
return this.iprot_;
}
public TProtocol getOutputProtocol()
{
return this.oprot_;
}
public boolean start_engine(String json_configuration) throws NebuException, TException
{
send_start_engine(json_configuration);
return recv_start_engine();
}
public void send_start_engine(String json_configuration) throws TException
{
oprot_.writeMessageBegin(new TMessage("start_engine", TMessageType.CALL, ++seqid_));
start_engine_args args = new start_engine_args();
args.set_json_configuration(json_configuration);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
public boolean recv_start_engine() throws NebuException, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
if (msg.seqid != seqid_) {
throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "start_engine failed: out of sequence response");
}
start_engine_result result = new start_engine_result();
result.read(iprot_);
iprot_.readMessageEnd();
if (result.is_set_success()) {
return result.success;
}
if (result.ne != null) {
throw result.ne;
}
throw new TApplicationException(TApplicationException.MISSING_RESULT, "start_engine failed: unknown result");
}
public int kill_engine(String index_code, int base_port) throws NebuException, TException
{
send_kill_engine(index_code, base_port);
return recv_kill_engine();
}
public void send_kill_engine(String index_code, int base_port) throws TException
{
oprot_.writeMessageBegin(new TMessage("kill_engine", TMessageType.CALL, ++seqid_));
kill_engine_args args = new kill_engine_args();
args.set_index_code(index_code);
args.set_base_port(base_port);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
public int recv_kill_engine() throws NebuException, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
if (msg.seqid != seqid_) {
throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "kill_engine failed: out of sequence response");
}
kill_engine_result result = new kill_engine_result();
result.read(iprot_);
iprot_.readMessageEnd();
if (result.is_set_success()) {
return result.success;
}
if (result.ne != null) {
throw result.ne;
}
throw new TApplicationException(TApplicationException.MISSING_RESULT, "kill_engine failed: unknown result");
}
public WorkerMountStats get_worker_mount_stats() throws NebuException, TException
{
send_get_worker_mount_stats();
return recv_get_worker_mount_stats();
}
public void send_get_worker_mount_stats() throws TException
{
oprot_.writeMessageBegin(new TMessage("get_worker_mount_stats", TMessageType.CALL, ++seqid_));
get_worker_mount_stats_args args = new get_worker_mount_stats_args();
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
public WorkerMountStats recv_get_worker_mount_stats() throws NebuException, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
if (msg.seqid != seqid_) {
throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_worker_mount_stats failed: out of sequence response");
}
get_worker_mount_stats_result result = new get_worker_mount_stats_result();
result.read(iprot_);
iprot_.readMessageEnd();
if (result.is_set_success()) {
return result.success;
}
if (result.ne != null) {
throw result.ne;
}
throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_worker_mount_stats failed: unknown result");
}
public WorkerLoadStats get_worker_load_stats() throws NebuException, TException
{
send_get_worker_load_stats();
return recv_get_worker_load_stats();
}
public void send_get_worker_load_stats() throws TException
{
oprot_.writeMessageBegin(new TMessage("get_worker_load_stats", TMessageType.CALL, ++seqid_));
get_worker_load_stats_args args = new get_worker_load_stats_args();
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
public WorkerLoadStats recv_get_worker_load_stats() throws NebuException, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
if (msg.seqid != seqid_) {
throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_worker_load_stats failed: out of sequence response");
}
get_worker_load_stats_result result = new get_worker_load_stats_result();
result.read(iprot_);
iprot_.readMessageEnd();
if (result.is_set_success()) {
return result.success;
}
if (result.ne != null) {
throw result.ne;
}
throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_worker_load_stats failed: unknown result");
}
public IndexStats get_worker_index_stats(String index_code, int port) throws NebuException, TException
{
send_get_worker_index_stats(index_code, port);
return recv_get_worker_index_stats();
}
public void send_get_worker_index_stats(String index_code, int port) throws TException
{
oprot_.writeMessageBegin(new TMessage("get_worker_index_stats", TMessageType.CALL, ++seqid_));
get_worker_index_stats_args args = new get_worker_index_stats_args();
args.set_index_code(index_code);
args.set_port(port);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
public IndexStats recv_get_worker_index_stats() throws NebuException, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
if (msg.seqid != seqid_) {
throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_worker_index_stats failed: out of sequence response");
}
get_worker_index_stats_result result = new get_worker_index_stats_result();
result.read(iprot_);
iprot_.readMessageEnd();
if (result.is_set_success()) {
return result.success;
}
if (result.ne != null) {
throw result.ne;
}
throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_worker_index_stats failed: unknown result");
}
public void stats() throws NebuException, TException
{
send_stats();
recv_stats();
}
public void send_stats() throws TException
{
oprot_.writeMessageBegin(new TMessage("stats", TMessageType.CALL, ++seqid_));
stats_args args = new stats_args();
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
public void recv_stats() throws NebuException, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
if (msg.seqid != seqid_) {
throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "stats failed: out of sequence response");
}
stats_result result = new stats_result();
result.read(iprot_);
iprot_.readMessageEnd();
if (result.ne != null) {
throw result.ne;
}
return;
}
public int update_worker(String source_host) throws TException
{
send_update_worker(source_host);
return recv_update_worker();
}
public void send_update_worker(String source_host) throws TException
{
oprot_.writeMessageBegin(new TMessage("update_worker", TMessageType.CALL, ++seqid_));
update_worker_args args = new update_worker_args();
args.set_source_host(source_host);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
public int recv_update_worker() throws TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
if (msg.seqid != seqid_) {
throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "update_worker failed: out of sequence response");
}
update_worker_result result = new update_worker_result();
result.read(iprot_);
iprot_.readMessageEnd();
if (result.is_set_success()) {
return result.success;
}
throw new TApplicationException(TApplicationException.MISSING_RESULT, "update_worker failed: unknown result");
}
public void restart_controller() throws TException
{
send_restart_controller();
recv_restart_controller();
}
public void send_restart_controller() throws TException
{
oprot_.writeMessageBegin(new TMessage("restart_controller", TMessageType.CALL, ++seqid_));
restart_controller_args args = new restart_controller_args();
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
public void recv_restart_controller() throws TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
if (msg.seqid != seqid_) {
throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "restart_controller failed: out of sequence response");
}
restart_controller_result result = new restart_controller_result();
result.read(iprot_);
iprot_.readMessageEnd();
return;
}
public String head(String file, int lines, String index_code, int base_port) throws NebuException, TException
{
send_head(file, lines, index_code, base_port);
return recv_head();
}
public void send_head(String file, int lines, String index_code, int base_port) throws TException
{
oprot_.writeMessageBegin(new TMessage("head", TMessageType.CALL, ++seqid_));
head_args args = new head_args();
args.set_file(file);
args.set_lines(lines);
args.set_index_code(index_code);
args.set_base_port(base_port);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
public String recv_head() throws NebuException, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
if (msg.seqid != seqid_) {
throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "head failed: out of sequence response");
}
head_result result = new head_result();
result.read(iprot_);
iprot_.readMessageEnd();
if (result.is_set_success()) {
return result.success;
}
if (result.ne != null) {
throw result.ne;
}
throw new TApplicationException(TApplicationException.MISSING_RESULT, "head failed: unknown result");
}
public String tail(String file, int lines, String index_code, int base_port) throws NebuException, TException
{
send_tail(file, lines, index_code, base_port);
return recv_tail();
}
public void send_tail(String file, int lines, String index_code, int base_port) throws TException
{
oprot_.writeMessageBegin(new TMessage("tail", TMessageType.CALL, ++seqid_));
tail_args args = new tail_args();
args.set_file(file);
args.set_lines(lines);
args.set_index_code(index_code);
args.set_base_port(base_port);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
public String recv_tail() throws NebuException, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
if (msg.seqid != seqid_) {
throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "tail failed: out of sequence response");
}
tail_result result = new tail_result();
result.read(iprot_);
iprot_.readMessageEnd();
if (result.is_set_success()) {
return result.success;
}
if (result.ne != null) {
throw result.ne;
}
throw new TApplicationException(TApplicationException.MISSING_RESULT, "tail failed: unknown result");
}
public String ps_info(String pidfile, String index_code, int base_port) throws NebuException, TException
{
send_ps_info(pidfile, index_code, base_port);
return recv_ps_info();
}
public void send_ps_info(String pidfile, String index_code, int base_port) throws TException
{
oprot_.writeMessageBegin(new TMessage("ps_info", TMessageType.CALL, ++seqid_));
ps_info_args args = new ps_info_args();
args.set_pidfile(pidfile);
args.set_index_code(index_code);
args.set_base_port(base_port);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
public String recv_ps_info() throws NebuException, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
if (msg.seqid != seqid_) {
throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "ps_info failed: out of sequence response");
}
ps_info_result result = new ps_info_result();
result.read(iprot_);
iprot_.readMessageEnd();
if (result.is_set_success()) {
return result.success;
}
if (result.ne != null) {
throw result.ne;
}
throw new TApplicationException(TApplicationException.MISSING_RESULT, "ps_info failed: unknown result");
}
}
public static class AsyncClient extends TAsyncClient implements AsyncIface {
public static class Factory implements TAsyncClientFactory<AsyncClient> {
private TAsyncClientManager clientManager;
private TProtocolFactory protocolFactory;
public Factory(TAsyncClientManager clientManager, TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientManager, TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void start_engine(String json_configuration, AsyncMethodCallback<start_engine_call> resultHandler) throws TException {
checkReady();
start_engine_call method_call = new start_engine_call(json_configuration, resultHandler, this, protocolFactory, transport);
manager.call(method_call);
}
public static class start_engine_call extends TAsyncMethodCall {
private String json_configuration;
public start_engine_call(String json_configuration, AsyncMethodCallback<start_engine_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.json_configuration = json_configuration;
}
public void write_args(TProtocol prot) throws TException {
prot.writeMessageBegin(new TMessage("start_engine", TMessageType.CALL, 0));
start_engine_args args = new start_engine_args();
args.set_json_configuration(json_configuration);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws NebuException, TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_start_engine();
}
}
public void kill_engine(String index_code, int base_port, AsyncMethodCallback<kill_engine_call> resultHandler) throws TException {
checkReady();
kill_engine_call method_call = new kill_engine_call(index_code, base_port, resultHandler, this, protocolFactory, transport);
manager.call(method_call);
}
public static class kill_engine_call extends TAsyncMethodCall {
private String index_code;
private int base_port;
public kill_engine_call(String index_code, int base_port, AsyncMethodCallback<kill_engine_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.index_code = index_code;
this.base_port = base_port;
}
public void write_args(TProtocol prot) throws TException {
prot.writeMessageBegin(new TMessage("kill_engine", TMessageType.CALL, 0));
kill_engine_args args = new kill_engine_args();
args.set_index_code(index_code);
args.set_base_port(base_port);
args.write(prot);
prot.writeMessageEnd();
}
public int getResult() throws NebuException, TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_kill_engine();
}
}
public void get_worker_mount_stats(AsyncMethodCallback<get_worker_mount_stats_call> resultHandler) throws TException {
checkReady();
get_worker_mount_stats_call method_call = new get_worker_mount_stats_call(resultHandler, this, protocolFactory, transport);
manager.call(method_call);
}
public static class get_worker_mount_stats_call extends TAsyncMethodCall {
public get_worker_mount_stats_call(AsyncMethodCallback<get_worker_mount_stats_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
}
public void write_args(TProtocol prot) throws TException {
prot.writeMessageBegin(new TMessage("get_worker_mount_stats", TMessageType.CALL, 0));
get_worker_mount_stats_args args = new get_worker_mount_stats_args();
args.write(prot);
prot.writeMessageEnd();
}
public WorkerMountStats getResult() throws NebuException, TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_get_worker_mount_stats();
}
}
public void get_worker_load_stats(AsyncMethodCallback<get_worker_load_stats_call> resultHandler) throws TException {
checkReady();
get_worker_load_stats_call method_call = new get_worker_load_stats_call(resultHandler, this, protocolFactory, transport);
manager.call(method_call);
}
public static class get_worker_load_stats_call extends TAsyncMethodCall {
public get_worker_load_stats_call(AsyncMethodCallback<get_worker_load_stats_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
}
public void write_args(TProtocol prot) throws TException {
prot.writeMessageBegin(new TMessage("get_worker_load_stats", TMessageType.CALL, 0));
get_worker_load_stats_args args = new get_worker_load_stats_args();
args.write(prot);
prot.writeMessageEnd();
}
public WorkerLoadStats getResult() throws NebuException, TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_get_worker_load_stats();
}
}
public void get_worker_index_stats(String index_code, int port, AsyncMethodCallback<get_worker_index_stats_call> resultHandler) throws TException {
checkReady();
get_worker_index_stats_call method_call = new get_worker_index_stats_call(index_code, port, resultHandler, this, protocolFactory, transport);
manager.call(method_call);
}
public static class get_worker_index_stats_call extends TAsyncMethodCall {
private String index_code;
private int port;
public get_worker_index_stats_call(String index_code, int port, AsyncMethodCallback<get_worker_index_stats_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.index_code = index_code;
this.port = port;
}
public void write_args(TProtocol prot) throws TException {
prot.writeMessageBegin(new TMessage("get_worker_index_stats", TMessageType.CALL, 0));
get_worker_index_stats_args args = new get_worker_index_stats_args();
args.set_index_code(index_code);
args.set_port(port);
args.write(prot);
prot.writeMessageEnd();
}
public IndexStats getResult() throws NebuException, TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_get_worker_index_stats();
}
}
public void stats(AsyncMethodCallback<stats_call> resultHandler) throws TException {
checkReady();
stats_call method_call = new stats_call(resultHandler, this, protocolFactory, transport);
manager.call(method_call);
}
public static class stats_call extends TAsyncMethodCall {
public stats_call(AsyncMethodCallback<stats_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
}
public void write_args(TProtocol prot) throws TException {
prot.writeMessageBegin(new TMessage("stats", TMessageType.CALL, 0));
stats_args args = new stats_args();
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws NebuException, TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_stats();
}
}
public void update_worker(String source_host, AsyncMethodCallback<update_worker_call> resultHandler) throws TException {
checkReady();
update_worker_call method_call = new update_worker_call(source_host, resultHandler, this, protocolFactory, transport);
manager.call(method_call);
}
public static class update_worker_call extends TAsyncMethodCall {
private String source_host;
public update_worker_call(String source_host, AsyncMethodCallback<update_worker_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.source_host = source_host;
}
public void write_args(TProtocol prot) throws TException {
prot.writeMessageBegin(new TMessage("update_worker", TMessageType.CALL, 0));
update_worker_args args = new update_worker_args();
args.set_source_host(source_host);
args.write(prot);
prot.writeMessageEnd();
}
public int getResult() throws TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_update_worker();
}
}
public void restart_controller(AsyncMethodCallback<restart_controller_call> resultHandler) throws TException {
checkReady();
restart_controller_call method_call = new restart_controller_call(resultHandler, this, protocolFactory, transport);
manager.call(method_call);
}
public static class restart_controller_call extends TAsyncMethodCall {
public restart_controller_call(AsyncMethodCallback<restart_controller_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
}
public void write_args(TProtocol prot) throws TException {
prot.writeMessageBegin(new TMessage("restart_controller", TMessageType.CALL, 0));
restart_controller_args args = new restart_controller_args();
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_restart_controller();
}
}
public void head(String file, int lines, String index_code, int base_port, AsyncMethodCallback<head_call> resultHandler) throws TException {
checkReady();
head_call method_call = new head_call(file, lines, index_code, base_port, resultHandler, this, protocolFactory, transport);
manager.call(method_call);
}
public static class head_call extends TAsyncMethodCall {
private String file;
private int lines;
private String index_code;
private int base_port;
public head_call(String file, int lines, String index_code, int base_port, AsyncMethodCallback<head_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.file = file;
this.lines = lines;
this.index_code = index_code;
this.base_port = base_port;
}
public void write_args(TProtocol prot) throws TException {
prot.writeMessageBegin(new TMessage("head", TMessageType.CALL, 0));
head_args args = new head_args();
args.set_file(file);
args.set_lines(lines);
args.set_index_code(index_code);
args.set_base_port(base_port);
args.write(prot);
prot.writeMessageEnd();
}
public String getResult() throws NebuException, TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_head();
}
}
public void tail(String file, int lines, String index_code, int base_port, AsyncMethodCallback<tail_call> resultHandler) throws TException {
checkReady();
tail_call method_call = new tail_call(file, lines, index_code, base_port, resultHandler, this, protocolFactory, transport);
manager.call(method_call);
}
public static class tail_call extends TAsyncMethodCall {
private String file;
private int lines;
private String index_code;
private int base_port;
public tail_call(String file, int lines, String index_code, int base_port, AsyncMethodCallback<tail_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.file = file;
this.lines = lines;
this.index_code = index_code;
this.base_port = base_port;
}
public void write_args(TProtocol prot) throws TException {
prot.writeMessageBegin(new TMessage("tail", TMessageType.CALL, 0));
tail_args args = new tail_args();
args.set_file(file);
args.set_lines(lines);
args.set_index_code(index_code);
args.set_base_port(base_port);
args.write(prot);
prot.writeMessageEnd();
}
public String getResult() throws NebuException, TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_tail();
}
}
public void ps_info(String pidfile, String index_code, int base_port, AsyncMethodCallback<ps_info_call> resultHandler) throws TException {
checkReady();
ps_info_call method_call = new ps_info_call(pidfile, index_code, base_port, resultHandler, this, protocolFactory, transport);
manager.call(method_call);
}
public static class ps_info_call extends TAsyncMethodCall {
private String pidfile;
private String index_code;
private int base_port;
public ps_info_call(String pidfile, String index_code, int base_port, AsyncMethodCallback<ps_info_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.pidfile = pidfile;
this.index_code = index_code;
this.base_port = base_port;
}
public void write_args(TProtocol prot) throws TException {
prot.writeMessageBegin(new TMessage("ps_info", TMessageType.CALL, 0));
ps_info_args args = new ps_info_args();
args.set_pidfile(pidfile);
args.set_index_code(index_code);
args.set_base_port(base_port);
args.write(prot);
prot.writeMessageEnd();
}
public String getResult() throws NebuException, TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_ps_info();
}
}
}
public static class Processor implements TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(Iface iface)
{
iface_ = iface;
processMap_.put("start_engine", new start_engine());
processMap_.put("kill_engine", new kill_engine());
processMap_.put("get_worker_mount_stats", new get_worker_mount_stats());
processMap_.put("get_worker_load_stats", new get_worker_load_stats());
processMap_.put("get_worker_index_stats", new get_worker_index_stats());
processMap_.put("stats", new stats());
processMap_.put("update_worker", new update_worker());
processMap_.put("restart_controller", new restart_controller());
processMap_.put("head", new head());
processMap_.put("tail", new tail());
processMap_.put("ps_info", new ps_info());
}
protected static interface ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
}
private Iface iface_;
protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
public boolean process(TProtocol iprot, TProtocol oprot) throws TException
{
TMessage msg = iprot.readMessageBegin();
ProcessFunction fn = processMap_.get(msg.name);
if (fn == null) {
TProtocolUtil.skip(iprot, TType.STRUCT);
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return true;
}
fn.process(msg.seqid, iprot, oprot);
return true;
}
private class start_engine implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
start_engine_args args = new start_engine_args();
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
oprot.writeMessageBegin(new TMessage("start_engine", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
iprot.readMessageEnd();
start_engine_result result = new start_engine_result();
try {
result.success = iface_.start_engine(args.json_configuration);
result.set_success_isSet(true);
} catch (NebuException ne) {
result.ne = ne;
} catch (Throwable th) {
LOGGER.error("Internal error processing start_engine", th);
TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing start_engine");
oprot.writeMessageBegin(new TMessage("start_engine", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
oprot.writeMessageBegin(new TMessage("start_engine", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
}
}
private class kill_engine implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
kill_engine_args args = new kill_engine_args();
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
oprot.writeMessageBegin(new TMessage("kill_engine", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
iprot.readMessageEnd();
kill_engine_result result = new kill_engine_result();
try {
result.success = iface_.kill_engine(args.index_code, args.base_port);
result.set_success_isSet(true);
} catch (NebuException ne) {
result.ne = ne;
} catch (Throwable th) {
LOGGER.error("Internal error processing kill_engine", th);
TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing kill_engine");
oprot.writeMessageBegin(new TMessage("kill_engine", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
oprot.writeMessageBegin(new TMessage("kill_engine", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
}
}
private class get_worker_mount_stats implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
get_worker_mount_stats_args args = new get_worker_mount_stats_args();
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
oprot.writeMessageBegin(new TMessage("get_worker_mount_stats", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
iprot.readMessageEnd();
get_worker_mount_stats_result result = new get_worker_mount_stats_result();
try {
result.success = iface_.get_worker_mount_stats();
} catch (NebuException ne) {
result.ne = ne;
} catch (Throwable th) {
LOGGER.error("Internal error processing get_worker_mount_stats", th);
TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_worker_mount_stats");
oprot.writeMessageBegin(new TMessage("get_worker_mount_stats", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
oprot.writeMessageBegin(new TMessage("get_worker_mount_stats", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
}
}
private class get_worker_load_stats implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
get_worker_load_stats_args args = new get_worker_load_stats_args();
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
oprot.writeMessageBegin(new TMessage("get_worker_load_stats", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
iprot.readMessageEnd();
get_worker_load_stats_result result = new get_worker_load_stats_result();
try {
result.success = iface_.get_worker_load_stats();
} catch (NebuException ne) {
result.ne = ne;
} catch (Throwable th) {
LOGGER.error("Internal error processing get_worker_load_stats", th);
TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_worker_load_stats");
oprot.writeMessageBegin(new TMessage("get_worker_load_stats", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
oprot.writeMessageBegin(new TMessage("get_worker_load_stats", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
}
}
private class get_worker_index_stats implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
get_worker_index_stats_args args = new get_worker_index_stats_args();
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
oprot.writeMessageBegin(new TMessage("get_worker_index_stats", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
iprot.readMessageEnd();
get_worker_index_stats_result result = new get_worker_index_stats_result();
try {
result.success = iface_.get_worker_index_stats(args.index_code, args.port);
} catch (NebuException ne) {
result.ne = ne;
} catch (Throwable th) {
LOGGER.error("Internal error processing get_worker_index_stats", th);
TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_worker_index_stats");
oprot.writeMessageBegin(new TMessage("get_worker_index_stats", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
oprot.writeMessageBegin(new TMessage("get_worker_index_stats", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
}
}
private class stats implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
stats_args args = new stats_args();
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
oprot.writeMessageBegin(new TMessage("stats", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
iprot.readMessageEnd();
stats_result result = new stats_result();
try {
iface_.stats();
} catch (NebuException ne) {
result.ne = ne;
} catch (Throwable th) {
LOGGER.error("Internal error processing stats", th);
TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing stats");
oprot.writeMessageBegin(new TMessage("stats", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
oprot.writeMessageBegin(new TMessage("stats", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
}
}
private class update_worker implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
update_worker_args args = new update_worker_args();
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
oprot.writeMessageBegin(new TMessage("update_worker", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
iprot.readMessageEnd();
update_worker_result result = new update_worker_result();
result.success = iface_.update_worker(args.source_host);
result.set_success_isSet(true);
oprot.writeMessageBegin(new TMessage("update_worker", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
}
}
private class restart_controller implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
restart_controller_args args = new restart_controller_args();
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
oprot.writeMessageBegin(new TMessage("restart_controller", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
iprot.readMessageEnd();
restart_controller_result result = new restart_controller_result();
iface_.restart_controller();
oprot.writeMessageBegin(new TMessage("restart_controller", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
}
}
private class head implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
head_args args = new head_args();
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
oprot.writeMessageBegin(new TMessage("head", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
iprot.readMessageEnd();
head_result result = new head_result();
try {
result.success = iface_.head(args.file, args.lines, args.index_code, args.base_port);
} catch (NebuException ne) {
result.ne = ne;
} catch (Throwable th) {
LOGGER.error("Internal error processing head", th);
TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing head");
oprot.writeMessageBegin(new TMessage("head", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
oprot.writeMessageBegin(new TMessage("head", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
}
}
private class tail implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
tail_args args = new tail_args();
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
oprot.writeMessageBegin(new TMessage("tail", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
iprot.readMessageEnd();
tail_result result = new tail_result();
try {
result.success = iface_.tail(args.file, args.lines, args.index_code, args.base_port);
} catch (NebuException ne) {
result.ne = ne;
} catch (Throwable th) {
LOGGER.error("Internal error processing tail", th);
TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing tail");
oprot.writeMessageBegin(new TMessage("tail", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
oprot.writeMessageBegin(new TMessage("tail", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
}
}
private class ps_info implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
ps_info_args args = new ps_info_args();
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
oprot.writeMessageBegin(new TMessage("ps_info", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
iprot.readMessageEnd();
ps_info_result result = new ps_info_result();
try {
result.success = iface_.ps_info(args.pidfile, args.index_code, args.base_port);
} catch (NebuException ne) {
result.ne = ne;
} catch (Throwable th) {
LOGGER.error("Internal error processing ps_info", th);
TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing ps_info");
oprot.writeMessageBegin(new TMessage("ps_info", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
oprot.writeMessageBegin(new TMessage("ps_info", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
}
}
}
public static class start_engine_args implements TBase<start_engine_args, start_engine_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("start_engine_args");
private static final TField JSON_CONFIGURATION_FIELD_DESC = new TField("json_configuration", TType.STRING, (short)1);
private String json_configuration;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
JSON_CONFIGURATION((short)1, "json_configuration");
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: // JSON_CONFIGURATION
return JSON_CONFIGURATION;
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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.JSON_CONFIGURATION, new FieldMetaData("json_configuration", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(start_engine_args.class, metaDataMap);
}
public start_engine_args() {
}
public start_engine_args(
String json_configuration)
{
this();
this.json_configuration = json_configuration;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public start_engine_args(start_engine_args other) {
if (other.is_set_json_configuration()) {
this.json_configuration = other.json_configuration;
}
}
public start_engine_args deepCopy() {
return new start_engine_args(this);
}
@Override
public void clear() {
this.json_configuration = null;
}
public String get_json_configuration() {
return this.json_configuration;
}
public start_engine_args set_json_configuration(String json_configuration) {
this.json_configuration = json_configuration;
return this;
}
public void unset_json_configuration() {
this.json_configuration = null;
}
/** Returns true if field json_configuration is set (has been asigned a value) and false otherwise */
public boolean is_set_json_configuration() {
return this.json_configuration != null;
}
public void set_json_configuration_isSet(boolean value) {
if (!value) {
this.json_configuration = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case JSON_CONFIGURATION:
if (value == null) {
unset_json_configuration();
} else {
set_json_configuration((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case JSON_CONFIGURATION:
return get_json_configuration();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case JSON_CONFIGURATION:
return is_set_json_configuration();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof start_engine_args)
return this.equals((start_engine_args)that);
return false;
}
public boolean equals(start_engine_args that) {
if (that == null)
return false;
boolean this_present_json_configuration = true && this.is_set_json_configuration();
boolean that_present_json_configuration = true && that.is_set_json_configuration();
if (this_present_json_configuration || that_present_json_configuration) {
if (!(this_present_json_configuration && that_present_json_configuration))
return false;
if (!this.json_configuration.equals(that.json_configuration))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(start_engine_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
start_engine_args typedOther = (start_engine_args)other;
lastComparison = Boolean.valueOf(is_set_json_configuration()).compareTo(typedOther.is_set_json_configuration());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_json_configuration()) {
lastComparison = TBaseHelper.compareTo(this.json_configuration, typedOther.json_configuration);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 1: // JSON_CONFIGURATION
if (field.type == TType.STRING) {
this.json_configuration = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.json_configuration != null) {
oprot.writeFieldBegin(JSON_CONFIGURATION_FIELD_DESC);
oprot.writeString(this.json_configuration);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("start_engine_args(");
boolean first = true;
sb.append("json_configuration:");
if (this.json_configuration == null) {
sb.append("null");
} else {
sb.append(this.json_configuration);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class start_engine_result implements TBase<start_engine_result, start_engine_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("start_engine_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
private static final TField NE_FIELD_DESC = new TField("ne", TType.STRUCT, (short)1);
private boolean success;
private NebuException ne;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
SUCCESS((short)0, "success"),
NE((short)1, "ne");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // NE
return NE;
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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.BOOL)));
tmpMap.put(_Fields.NE, new FieldMetaData("ne", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(start_engine_result.class, metaDataMap);
}
public start_engine_result() {
}
public start_engine_result(
boolean success,
NebuException ne)
{
this();
this.success = success;
set_success_isSet(true);
this.ne = ne;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public start_engine_result(start_engine_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
if (other.is_set_ne()) {
this.ne = new NebuException(other.ne);
}
}
public start_engine_result deepCopy() {
return new start_engine_result(this);
}
@Override
public void clear() {
set_success_isSet(false);
this.success = false;
this.ne = null;
}
public boolean is_success() {
return this.success;
}
public start_engine_result set_success(boolean success) {
this.success = success;
set_success_isSet(true);
return this;
}
public void unset_success() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been asigned 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 NebuException get_ne() {
return this.ne;
}
public start_engine_result set_ne(NebuException ne) {
this.ne = ne;
return this;
}
public void unset_ne() {
this.ne = null;
}
/** Returns true if field ne is set (has been asigned a value) and false otherwise */
public boolean is_set_ne() {
return this.ne != null;
}
public void set_ne_isSet(boolean value) {
if (!value) {
this.ne = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unset_success();
} else {
set_success((Boolean)value);
}
break;
case NE:
if (value == null) {
unset_ne();
} else {
set_ne((NebuException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return new Boolean(is_success());
case NE:
return get_ne();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return is_set_success();
case NE:
return is_set_ne();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof start_engine_result)
return this.equals((start_engine_result)that);
return false;
}
public boolean equals(start_engine_result that) {
if (that == null)
return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_ne = true && this.is_set_ne();
boolean that_present_ne = true && that.is_set_ne();
if (this_present_ne || that_present_ne) {
if (!(this_present_ne && that_present_ne))
return false;
if (!this.ne.equals(that.ne))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(start_engine_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
start_engine_result typedOther = (start_engine_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_ne()).compareTo(typedOther.is_set_ne());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_ne()) {
lastComparison = TBaseHelper.compareTo(this.ne, typedOther.ne);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == TType.BOOL) {
this.success = iprot.readBool();
set_success_isSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // NE
if (field.type == TType.STRUCT) {
this.ne = new NebuException();
this.ne.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(this.success);
oprot.writeFieldEnd();
} else if (this.is_set_ne()) {
oprot.writeFieldBegin(NE_FIELD_DESC);
this.ne.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("start_engine_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("ne:");
if (this.ne == null) {
sb.append("null");
} else {
sb.append(this.ne);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class kill_engine_args implements TBase<kill_engine_args, kill_engine_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("kill_engine_args");
private static final TField INDEX_CODE_FIELD_DESC = new TField("index_code", TType.STRING, (short)1);
private static final TField BASE_PORT_FIELD_DESC = new TField("base_port", TType.I32, (short)2);
private String index_code;
private int base_port;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
INDEX_CODE((short)1, "index_code"),
BASE_PORT((short)2, "base_port");
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: // INDEX_CODE
return INDEX_CODE;
case 2: // BASE_PORT
return BASE_PORT;
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 __BASE_PORT_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.INDEX_CODE, new FieldMetaData("index_code", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.BASE_PORT, new FieldMetaData("base_port", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(kill_engine_args.class, metaDataMap);
}
public kill_engine_args() {
}
public kill_engine_args(
String index_code,
int base_port)
{
this();
this.index_code = index_code;
this.base_port = base_port;
set_base_port_isSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public kill_engine_args(kill_engine_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.is_set_index_code()) {
this.index_code = other.index_code;
}
this.base_port = other.base_port;
}
public kill_engine_args deepCopy() {
return new kill_engine_args(this);
}
@Override
public void clear() {
this.index_code = null;
set_base_port_isSet(false);
this.base_port = 0;
}
public String get_index_code() {
return this.index_code;
}
public kill_engine_args set_index_code(String index_code) {
this.index_code = index_code;
return this;
}
public void unset_index_code() {
this.index_code = null;
}
/** Returns true if field index_code is set (has been asigned a value) and false otherwise */
public boolean is_set_index_code() {
return this.index_code != null;
}
public void set_index_code_isSet(boolean value) {
if (!value) {
this.index_code = null;
}
}
public int get_base_port() {
return this.base_port;
}
public kill_engine_args set_base_port(int base_port) {
this.base_port = base_port;
set_base_port_isSet(true);
return this;
}
public void unset_base_port() {
__isset_bit_vector.clear(__BASE_PORT_ISSET_ID);
}
/** Returns true if field base_port is set (has been asigned a value) and false otherwise */
public boolean is_set_base_port() {
return __isset_bit_vector.get(__BASE_PORT_ISSET_ID);
}
public void set_base_port_isSet(boolean value) {
__isset_bit_vector.set(__BASE_PORT_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case INDEX_CODE:
if (value == null) {
unset_index_code();
} else {
set_index_code((String)value);
}
break;
case BASE_PORT:
if (value == null) {
unset_base_port();
} else {
set_base_port((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case INDEX_CODE:
return get_index_code();
case BASE_PORT:
return new Integer(get_base_port());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case INDEX_CODE:
return is_set_index_code();
case BASE_PORT:
return is_set_base_port();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof kill_engine_args)
return this.equals((kill_engine_args)that);
return false;
}
public boolean equals(kill_engine_args that) {
if (that == null)
return false;
boolean this_present_index_code = true && this.is_set_index_code();
boolean that_present_index_code = true && that.is_set_index_code();
if (this_present_index_code || that_present_index_code) {
if (!(this_present_index_code && that_present_index_code))
return false;
if (!this.index_code.equals(that.index_code))
return false;
}
boolean this_present_base_port = true;
boolean that_present_base_port = true;
if (this_present_base_port || that_present_base_port) {
if (!(this_present_base_port && that_present_base_port))
return false;
if (this.base_port != that.base_port)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(kill_engine_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
kill_engine_args typedOther = (kill_engine_args)other;
lastComparison = Boolean.valueOf(is_set_index_code()).compareTo(typedOther.is_set_index_code());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_index_code()) {
lastComparison = TBaseHelper.compareTo(this.index_code, typedOther.index_code);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_base_port()).compareTo(typedOther.is_set_base_port());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_base_port()) {
lastComparison = TBaseHelper.compareTo(this.base_port, typedOther.base_port);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 1: // INDEX_CODE
if (field.type == TType.STRING) {
this.index_code = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // BASE_PORT
if (field.type == TType.I32) {
this.base_port = iprot.readI32();
set_base_port_isSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.index_code != null) {
oprot.writeFieldBegin(INDEX_CODE_FIELD_DESC);
oprot.writeString(this.index_code);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(BASE_PORT_FIELD_DESC);
oprot.writeI32(this.base_port);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("kill_engine_args(");
boolean first = true;
sb.append("index_code:");
if (this.index_code == null) {
sb.append("null");
} else {
sb.append(this.index_code);
}
first = false;
if (!first) sb.append(", ");
sb.append("base_port:");
sb.append(this.base_port);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class kill_engine_result implements TBase<kill_engine_result, kill_engine_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("kill_engine_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
private static final TField NE_FIELD_DESC = new TField("ne", TType.STRUCT, (short)1);
private int success;
private NebuException ne;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
SUCCESS((short)0, "success"),
NE((short)1, "ne");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // NE
return NE;
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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
tmpMap.put(_Fields.NE, new FieldMetaData("ne", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(kill_engine_result.class, metaDataMap);
}
public kill_engine_result() {
}
public kill_engine_result(
int success,
NebuException ne)
{
this();
this.success = success;
set_success_isSet(true);
this.ne = ne;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public kill_engine_result(kill_engine_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
if (other.is_set_ne()) {
this.ne = new NebuException(other.ne);
}
}
public kill_engine_result deepCopy() {
return new kill_engine_result(this);
}
@Override
public void clear() {
set_success_isSet(false);
this.success = 0;
this.ne = null;
}
public int get_success() {
return this.success;
}
public kill_engine_result set_success(int success) {
this.success = success;
set_success_isSet(true);
return this;
}
public void unset_success() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been asigned 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 NebuException get_ne() {
return this.ne;
}
public kill_engine_result set_ne(NebuException ne) {
this.ne = ne;
return this;
}
public void unset_ne() {
this.ne = null;
}
/** Returns true if field ne is set (has been asigned a value) and false otherwise */
public boolean is_set_ne() {
return this.ne != null;
}
public void set_ne_isSet(boolean value) {
if (!value) {
this.ne = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unset_success();
} else {
set_success((Integer)value);
}
break;
case NE:
if (value == null) {
unset_ne();
} else {
set_ne((NebuException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return new Integer(get_success());
case NE:
return get_ne();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return is_set_success();
case NE:
return is_set_ne();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof kill_engine_result)
return this.equals((kill_engine_result)that);
return false;
}
public boolean equals(kill_engine_result that) {
if (that == null)
return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_ne = true && this.is_set_ne();
boolean that_present_ne = true && that.is_set_ne();
if (this_present_ne || that_present_ne) {
if (!(this_present_ne && that_present_ne))
return false;
if (!this.ne.equals(that.ne))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(kill_engine_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
kill_engine_result typedOther = (kill_engine_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_ne()).compareTo(typedOther.is_set_ne());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_ne()) {
lastComparison = TBaseHelper.compareTo(this.ne, typedOther.ne);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == TType.I32) {
this.success = iprot.readI32();
set_success_isSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // NE
if (field.type == TType.STRUCT) {
this.ne = new NebuException();
this.ne.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeI32(this.success);
oprot.writeFieldEnd();
} else if (this.is_set_ne()) {
oprot.writeFieldBegin(NE_FIELD_DESC);
this.ne.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("kill_engine_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("ne:");
if (this.ne == null) {
sb.append("null");
} else {
sb.append(this.ne);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class get_worker_mount_stats_args implements TBase<get_worker_mount_stats_args, get_worker_mount_stats_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("get_worker_mount_stats_args");
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements 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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(get_worker_mount_stats_args.class, metaDataMap);
}
public get_worker_mount_stats_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public get_worker_mount_stats_args(get_worker_mount_stats_args other) {
}
public get_worker_mount_stats_args deepCopy() {
return new get_worker_mount_stats_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 asigned 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_worker_mount_stats_args)
return this.equals((get_worker_mount_stats_args)that);
return false;
}
public boolean equals(get_worker_mount_stats_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(get_worker_mount_stats_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
get_worker_mount_stats_args typedOther = (get_worker_mount_stats_args)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("get_worker_mount_stats_args(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class get_worker_mount_stats_result implements TBase<get_worker_mount_stats_result, get_worker_mount_stats_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("get_worker_mount_stats_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
private static final TField NE_FIELD_DESC = new TField("ne", TType.STRUCT, (short)1);
private WorkerMountStats success;
private NebuException ne;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
SUCCESS((short)0, "success"),
NE((short)1, "ne");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // NE
return NE;
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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
new StructMetaData(TType.STRUCT, WorkerMountStats.class)));
tmpMap.put(_Fields.NE, new FieldMetaData("ne", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(get_worker_mount_stats_result.class, metaDataMap);
}
public get_worker_mount_stats_result() {
}
public get_worker_mount_stats_result(
WorkerMountStats success,
NebuException ne)
{
this();
this.success = success;
this.ne = ne;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public get_worker_mount_stats_result(get_worker_mount_stats_result other) {
if (other.is_set_success()) {
this.success = new WorkerMountStats(other.success);
}
if (other.is_set_ne()) {
this.ne = new NebuException(other.ne);
}
}
public get_worker_mount_stats_result deepCopy() {
return new get_worker_mount_stats_result(this);
}
@Override
public void clear() {
this.success = null;
this.ne = null;
}
public WorkerMountStats get_success() {
return this.success;
}
public get_worker_mount_stats_result set_success(WorkerMountStats success) {
this.success = success;
return this;
}
public void unset_success() {
this.success = null;
}
/** Returns true if field success is set (has been asigned 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 NebuException get_ne() {
return this.ne;
}
public get_worker_mount_stats_result set_ne(NebuException ne) {
this.ne = ne;
return this;
}
public void unset_ne() {
this.ne = null;
}
/** Returns true if field ne is set (has been asigned a value) and false otherwise */
public boolean is_set_ne() {
return this.ne != null;
}
public void set_ne_isSet(boolean value) {
if (!value) {
this.ne = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unset_success();
} else {
set_success((WorkerMountStats)value);
}
break;
case NE:
if (value == null) {
unset_ne();
} else {
set_ne((NebuException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return get_success();
case NE:
return get_ne();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return is_set_success();
case NE:
return is_set_ne();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof get_worker_mount_stats_result)
return this.equals((get_worker_mount_stats_result)that);
return false;
}
public boolean equals(get_worker_mount_stats_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;
}
boolean this_present_ne = true && this.is_set_ne();
boolean that_present_ne = true && that.is_set_ne();
if (this_present_ne || that_present_ne) {
if (!(this_present_ne && that_present_ne))
return false;
if (!this.ne.equals(that.ne))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(get_worker_mount_stats_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
get_worker_mount_stats_result typedOther = (get_worker_mount_stats_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_ne()).compareTo(typedOther.is_set_ne());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_ne()) {
lastComparison = TBaseHelper.compareTo(this.ne, typedOther.ne);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == TType.STRUCT) {
this.success = new WorkerMountStats();
this.success.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // NE
if (field.type == TType.STRUCT) {
this.ne = new NebuException();
this.ne.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
this.success.write(oprot);
oprot.writeFieldEnd();
} else if (this.is_set_ne()) {
oprot.writeFieldBegin(NE_FIELD_DESC);
this.ne.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("get_worker_mount_stats_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("ne:");
if (this.ne == null) {
sb.append("null");
} else {
sb.append(this.ne);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class get_worker_load_stats_args implements TBase<get_worker_load_stats_args, get_worker_load_stats_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("get_worker_load_stats_args");
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements 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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(get_worker_load_stats_args.class, metaDataMap);
}
public get_worker_load_stats_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public get_worker_load_stats_args(get_worker_load_stats_args other) {
}
public get_worker_load_stats_args deepCopy() {
return new get_worker_load_stats_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 asigned 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_worker_load_stats_args)
return this.equals((get_worker_load_stats_args)that);
return false;
}
public boolean equals(get_worker_load_stats_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(get_worker_load_stats_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
get_worker_load_stats_args typedOther = (get_worker_load_stats_args)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("get_worker_load_stats_args(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class get_worker_load_stats_result implements TBase<get_worker_load_stats_result, get_worker_load_stats_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("get_worker_load_stats_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
private static final TField NE_FIELD_DESC = new TField("ne", TType.STRUCT, (short)1);
private WorkerLoadStats success;
private NebuException ne;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
SUCCESS((short)0, "success"),
NE((short)1, "ne");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // NE
return NE;
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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
new StructMetaData(TType.STRUCT, WorkerLoadStats.class)));
tmpMap.put(_Fields.NE, new FieldMetaData("ne", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(get_worker_load_stats_result.class, metaDataMap);
}
public get_worker_load_stats_result() {
}
public get_worker_load_stats_result(
WorkerLoadStats success,
NebuException ne)
{
this();
this.success = success;
this.ne = ne;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public get_worker_load_stats_result(get_worker_load_stats_result other) {
if (other.is_set_success()) {
this.success = new WorkerLoadStats(other.success);
}
if (other.is_set_ne()) {
this.ne = new NebuException(other.ne);
}
}
public get_worker_load_stats_result deepCopy() {
return new get_worker_load_stats_result(this);
}
@Override
public void clear() {
this.success = null;
this.ne = null;
}
public WorkerLoadStats get_success() {
return this.success;
}
public get_worker_load_stats_result set_success(WorkerLoadStats success) {
this.success = success;
return this;
}
public void unset_success() {
this.success = null;
}
/** Returns true if field success is set (has been asigned 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 NebuException get_ne() {
return this.ne;
}
public get_worker_load_stats_result set_ne(NebuException ne) {
this.ne = ne;
return this;
}
public void unset_ne() {
this.ne = null;
}
/** Returns true if field ne is set (has been asigned a value) and false otherwise */
public boolean is_set_ne() {
return this.ne != null;
}
public void set_ne_isSet(boolean value) {
if (!value) {
this.ne = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unset_success();
} else {
set_success((WorkerLoadStats)value);
}
break;
case NE:
if (value == null) {
unset_ne();
} else {
set_ne((NebuException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return get_success();
case NE:
return get_ne();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return is_set_success();
case NE:
return is_set_ne();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof get_worker_load_stats_result)
return this.equals((get_worker_load_stats_result)that);
return false;
}
public boolean equals(get_worker_load_stats_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;
}
boolean this_present_ne = true && this.is_set_ne();
boolean that_present_ne = true && that.is_set_ne();
if (this_present_ne || that_present_ne) {
if (!(this_present_ne && that_present_ne))
return false;
if (!this.ne.equals(that.ne))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(get_worker_load_stats_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
get_worker_load_stats_result typedOther = (get_worker_load_stats_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_ne()).compareTo(typedOther.is_set_ne());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_ne()) {
lastComparison = TBaseHelper.compareTo(this.ne, typedOther.ne);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == TType.STRUCT) {
this.success = new WorkerLoadStats();
this.success.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // NE
if (field.type == TType.STRUCT) {
this.ne = new NebuException();
this.ne.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
this.success.write(oprot);
oprot.writeFieldEnd();
} else if (this.is_set_ne()) {
oprot.writeFieldBegin(NE_FIELD_DESC);
this.ne.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("get_worker_load_stats_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("ne:");
if (this.ne == null) {
sb.append("null");
} else {
sb.append(this.ne);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class get_worker_index_stats_args implements TBase<get_worker_index_stats_args, get_worker_index_stats_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("get_worker_index_stats_args");
private static final TField INDEX_CODE_FIELD_DESC = new TField("index_code", TType.STRING, (short)1);
private static final TField PORT_FIELD_DESC = new TField("port", TType.I32, (short)2);
private String index_code;
private int port;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
INDEX_CODE((short)1, "index_code"),
PORT((short)2, "port");
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: // INDEX_CODE
return INDEX_CODE;
case 2: // PORT
return PORT;
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 __PORT_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.INDEX_CODE, new FieldMetaData("index_code", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.PORT, new FieldMetaData("port", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(get_worker_index_stats_args.class, metaDataMap);
}
public get_worker_index_stats_args() {
}
public get_worker_index_stats_args(
String index_code,
int port)
{
this();
this.index_code = index_code;
this.port = port;
set_port_isSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public get_worker_index_stats_args(get_worker_index_stats_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.is_set_index_code()) {
this.index_code = other.index_code;
}
this.port = other.port;
}
public get_worker_index_stats_args deepCopy() {
return new get_worker_index_stats_args(this);
}
@Override
public void clear() {
this.index_code = null;
set_port_isSet(false);
this.port = 0;
}
public String get_index_code() {
return this.index_code;
}
public get_worker_index_stats_args set_index_code(String index_code) {
this.index_code = index_code;
return this;
}
public void unset_index_code() {
this.index_code = null;
}
/** Returns true if field index_code is set (has been asigned a value) and false otherwise */
public boolean is_set_index_code() {
return this.index_code != null;
}
public void set_index_code_isSet(boolean value) {
if (!value) {
this.index_code = null;
}
}
public int get_port() {
return this.port;
}
public get_worker_index_stats_args set_port(int port) {
this.port = port;
set_port_isSet(true);
return this;
}
public void unset_port() {
__isset_bit_vector.clear(__PORT_ISSET_ID);
}
/** Returns true if field port is set (has been asigned a value) and false otherwise */
public boolean is_set_port() {
return __isset_bit_vector.get(__PORT_ISSET_ID);
}
public void set_port_isSet(boolean value) {
__isset_bit_vector.set(__PORT_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case INDEX_CODE:
if (value == null) {
unset_index_code();
} else {
set_index_code((String)value);
}
break;
case PORT:
if (value == null) {
unset_port();
} else {
set_port((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case INDEX_CODE:
return get_index_code();
case PORT:
return new Integer(get_port());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case INDEX_CODE:
return is_set_index_code();
case PORT:
return is_set_port();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof get_worker_index_stats_args)
return this.equals((get_worker_index_stats_args)that);
return false;
}
public boolean equals(get_worker_index_stats_args that) {
if (that == null)
return false;
boolean this_present_index_code = true && this.is_set_index_code();
boolean that_present_index_code = true && that.is_set_index_code();
if (this_present_index_code || that_present_index_code) {
if (!(this_present_index_code && that_present_index_code))
return false;
if (!this.index_code.equals(that.index_code))
return false;
}
boolean this_present_port = true;
boolean that_present_port = true;
if (this_present_port || that_present_port) {
if (!(this_present_port && that_present_port))
return false;
if (this.port != that.port)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(get_worker_index_stats_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
get_worker_index_stats_args typedOther = (get_worker_index_stats_args)other;
lastComparison = Boolean.valueOf(is_set_index_code()).compareTo(typedOther.is_set_index_code());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_index_code()) {
lastComparison = TBaseHelper.compareTo(this.index_code, typedOther.index_code);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_port()).compareTo(typedOther.is_set_port());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_port()) {
lastComparison = TBaseHelper.compareTo(this.port, typedOther.port);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 1: // INDEX_CODE
if (field.type == TType.STRING) {
this.index_code = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // PORT
if (field.type == TType.I32) {
this.port = iprot.readI32();
set_port_isSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.index_code != null) {
oprot.writeFieldBegin(INDEX_CODE_FIELD_DESC);
oprot.writeString(this.index_code);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(PORT_FIELD_DESC);
oprot.writeI32(this.port);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("get_worker_index_stats_args(");
boolean first = true;
sb.append("index_code:");
if (this.index_code == null) {
sb.append("null");
} else {
sb.append(this.index_code);
}
first = false;
if (!first) sb.append(", ");
sb.append("port:");
sb.append(this.port);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class get_worker_index_stats_result implements TBase<get_worker_index_stats_result, get_worker_index_stats_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("get_worker_index_stats_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
private static final TField NE_FIELD_DESC = new TField("ne", TType.STRUCT, (short)1);
private IndexStats success;
private NebuException ne;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
SUCCESS((short)0, "success"),
NE((short)1, "ne");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // NE
return NE;
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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
new StructMetaData(TType.STRUCT, IndexStats.class)));
tmpMap.put(_Fields.NE, new FieldMetaData("ne", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(get_worker_index_stats_result.class, metaDataMap);
}
public get_worker_index_stats_result() {
}
public get_worker_index_stats_result(
IndexStats success,
NebuException ne)
{
this();
this.success = success;
this.ne = ne;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public get_worker_index_stats_result(get_worker_index_stats_result other) {
if (other.is_set_success()) {
this.success = new IndexStats(other.success);
}
if (other.is_set_ne()) {
this.ne = new NebuException(other.ne);
}
}
public get_worker_index_stats_result deepCopy() {
return new get_worker_index_stats_result(this);
}
@Override
public void clear() {
this.success = null;
this.ne = null;
}
public IndexStats get_success() {
return this.success;
}
public get_worker_index_stats_result set_success(IndexStats success) {
this.success = success;
return this;
}
public void unset_success() {
this.success = null;
}
/** Returns true if field success is set (has been asigned 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 NebuException get_ne() {
return this.ne;
}
public get_worker_index_stats_result set_ne(NebuException ne) {
this.ne = ne;
return this;
}
public void unset_ne() {
this.ne = null;
}
/** Returns true if field ne is set (has been asigned a value) and false otherwise */
public boolean is_set_ne() {
return this.ne != null;
}
public void set_ne_isSet(boolean value) {
if (!value) {
this.ne = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unset_success();
} else {
set_success((IndexStats)value);
}
break;
case NE:
if (value == null) {
unset_ne();
} else {
set_ne((NebuException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return get_success();
case NE:
return get_ne();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return is_set_success();
case NE:
return is_set_ne();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof get_worker_index_stats_result)
return this.equals((get_worker_index_stats_result)that);
return false;
}
public boolean equals(get_worker_index_stats_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;
}
boolean this_present_ne = true && this.is_set_ne();
boolean that_present_ne = true && that.is_set_ne();
if (this_present_ne || that_present_ne) {
if (!(this_present_ne && that_present_ne))
return false;
if (!this.ne.equals(that.ne))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(get_worker_index_stats_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
get_worker_index_stats_result typedOther = (get_worker_index_stats_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_ne()).compareTo(typedOther.is_set_ne());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_ne()) {
lastComparison = TBaseHelper.compareTo(this.ne, typedOther.ne);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == TType.STRUCT) {
this.success = new IndexStats();
this.success.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // NE
if (field.type == TType.STRUCT) {
this.ne = new NebuException();
this.ne.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
this.success.write(oprot);
oprot.writeFieldEnd();
} else if (this.is_set_ne()) {
oprot.writeFieldBegin(NE_FIELD_DESC);
this.ne.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("get_worker_index_stats_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("ne:");
if (this.ne == null) {
sb.append("null");
} else {
sb.append(this.ne);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class stats_args implements TBase<stats_args, stats_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("stats_args");
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements 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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(stats_args.class, metaDataMap);
}
public stats_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public stats_args(stats_args other) {
}
public stats_args deepCopy() {
return new stats_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 asigned 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 stats_args)
return this.equals((stats_args)that);
return false;
}
public boolean equals(stats_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(stats_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
stats_args typedOther = (stats_args)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("stats_args(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class stats_result implements TBase<stats_result, stats_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("stats_result");
private static final TField NE_FIELD_DESC = new TField("ne", TType.STRUCT, (short)1);
private NebuException ne;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
NE((short)1, "ne");
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: // NE
return NE;
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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NE, new FieldMetaData("ne", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(stats_result.class, metaDataMap);
}
public stats_result() {
}
public stats_result(
NebuException ne)
{
this();
this.ne = ne;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public stats_result(stats_result other) {
if (other.is_set_ne()) {
this.ne = new NebuException(other.ne);
}
}
public stats_result deepCopy() {
return new stats_result(this);
}
@Override
public void clear() {
this.ne = null;
}
public NebuException get_ne() {
return this.ne;
}
public stats_result set_ne(NebuException ne) {
this.ne = ne;
return this;
}
public void unset_ne() {
this.ne = null;
}
/** Returns true if field ne is set (has been asigned a value) and false otherwise */
public boolean is_set_ne() {
return this.ne != null;
}
public void set_ne_isSet(boolean value) {
if (!value) {
this.ne = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case NE:
if (value == null) {
unset_ne();
} else {
set_ne((NebuException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case NE:
return get_ne();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case NE:
return is_set_ne();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof stats_result)
return this.equals((stats_result)that);
return false;
}
public boolean equals(stats_result that) {
if (that == null)
return false;
boolean this_present_ne = true && this.is_set_ne();
boolean that_present_ne = true && that.is_set_ne();
if (this_present_ne || that_present_ne) {
if (!(this_present_ne && that_present_ne))
return false;
if (!this.ne.equals(that.ne))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(stats_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
stats_result typedOther = (stats_result)other;
lastComparison = Boolean.valueOf(is_set_ne()).compareTo(typedOther.is_set_ne());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_ne()) {
lastComparison = TBaseHelper.compareTo(this.ne, typedOther.ne);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 1: // NE
if (field.type == TType.STRUCT) {
this.ne = new NebuException();
this.ne.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.is_set_ne()) {
oprot.writeFieldBegin(NE_FIELD_DESC);
this.ne.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("stats_result(");
boolean first = true;
sb.append("ne:");
if (this.ne == null) {
sb.append("null");
} else {
sb.append(this.ne);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class update_worker_args implements TBase<update_worker_args, update_worker_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("update_worker_args");
private static final TField SOURCE_HOST_FIELD_DESC = new TField("source_host", TType.STRING, (short)1);
private String source_host;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
SOURCE_HOST((short)1, "source_host");
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: // SOURCE_HOST
return SOURCE_HOST;
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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SOURCE_HOST, new FieldMetaData("source_host", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(update_worker_args.class, metaDataMap);
}
public update_worker_args() {
}
public update_worker_args(
String source_host)
{
this();
this.source_host = source_host;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public update_worker_args(update_worker_args other) {
if (other.is_set_source_host()) {
this.source_host = other.source_host;
}
}
public update_worker_args deepCopy() {
return new update_worker_args(this);
}
@Override
public void clear() {
this.source_host = null;
}
public String get_source_host() {
return this.source_host;
}
public update_worker_args set_source_host(String source_host) {
this.source_host = source_host;
return this;
}
public void unset_source_host() {
this.source_host = null;
}
/** Returns true if field source_host is set (has been asigned a value) and false otherwise */
public boolean is_set_source_host() {
return this.source_host != null;
}
public void set_source_host_isSet(boolean value) {
if (!value) {
this.source_host = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SOURCE_HOST:
if (value == null) {
unset_source_host();
} else {
set_source_host((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SOURCE_HOST:
return get_source_host();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SOURCE_HOST:
return is_set_source_host();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof update_worker_args)
return this.equals((update_worker_args)that);
return false;
}
public boolean equals(update_worker_args that) {
if (that == null)
return false;
boolean this_present_source_host = true && this.is_set_source_host();
boolean that_present_source_host = true && that.is_set_source_host();
if (this_present_source_host || that_present_source_host) {
if (!(this_present_source_host && that_present_source_host))
return false;
if (!this.source_host.equals(that.source_host))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(update_worker_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
update_worker_args typedOther = (update_worker_args)other;
lastComparison = Boolean.valueOf(is_set_source_host()).compareTo(typedOther.is_set_source_host());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_source_host()) {
lastComparison = TBaseHelper.compareTo(this.source_host, typedOther.source_host);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 1: // SOURCE_HOST
if (field.type == TType.STRING) {
this.source_host = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.source_host != null) {
oprot.writeFieldBegin(SOURCE_HOST_FIELD_DESC);
oprot.writeString(this.source_host);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("update_worker_args(");
boolean first = true;
sb.append("source_host:");
if (this.source_host == null) {
sb.append("null");
} else {
sb.append(this.source_host);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class update_worker_result implements TBase<update_worker_result, update_worker_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("update_worker_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
private int success;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements 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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(update_worker_result.class, metaDataMap);
}
public update_worker_result() {
}
public update_worker_result(
int success)
{
this();
this.success = success;
set_success_isSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public update_worker_result(update_worker_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
}
public update_worker_result deepCopy() {
return new update_worker_result(this);
}
@Override
public void clear() {
set_success_isSet(false);
this.success = 0;
}
public int get_success() {
return this.success;
}
public update_worker_result set_success(int success) {
this.success = success;
set_success_isSet(true);
return this;
}
public void unset_success() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been asigned 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 new Integer(get_success());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned 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 update_worker_result)
return this.equals((update_worker_result)that);
return false;
}
public boolean equals(update_worker_result that) {
if (that == null)
return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(update_worker_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
update_worker_result typedOther = (update_worker_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
lastComparison = 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(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == TType.I32) {
this.success = iprot.readI32();
set_success_isSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws 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("update_worker_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class restart_controller_args implements TBase<restart_controller_args, restart_controller_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("restart_controller_args");
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements 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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(restart_controller_args.class, metaDataMap);
}
public restart_controller_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public restart_controller_args(restart_controller_args other) {
}
public restart_controller_args deepCopy() {
return new restart_controller_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 asigned 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 restart_controller_args)
return this.equals((restart_controller_args)that);
return false;
}
public boolean equals(restart_controller_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(restart_controller_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
restart_controller_args typedOther = (restart_controller_args)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("restart_controller_args(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class restart_controller_result implements TBase<restart_controller_result, restart_controller_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("restart_controller_result");
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements 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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(restart_controller_result.class, metaDataMap);
}
public restart_controller_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public restart_controller_result(restart_controller_result other) {
}
public restart_controller_result deepCopy() {
return new restart_controller_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 asigned 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 restart_controller_result)
return this.equals((restart_controller_result)that);
return false;
}
public boolean equals(restart_controller_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(restart_controller_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
restart_controller_result typedOther = (restart_controller_result)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("restart_controller_result(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class head_args implements TBase<head_args, head_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("head_args");
private static final TField FILE_FIELD_DESC = new TField("file", TType.STRING, (short)1);
private static final TField LINES_FIELD_DESC = new TField("lines", TType.I32, (short)2);
private static final TField INDEX_CODE_FIELD_DESC = new TField("index_code", TType.STRING, (short)3);
private static final TField BASE_PORT_FIELD_DESC = new TField("base_port", TType.I32, (short)4);
private String file;
private int lines;
private String index_code;
private int base_port;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
FILE((short)1, "file"),
LINES((short)2, "lines"),
INDEX_CODE((short)3, "index_code"),
BASE_PORT((short)4, "base_port");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // FILE
return FILE;
case 2: // LINES
return LINES;
case 3: // INDEX_CODE
return INDEX_CODE;
case 4: // BASE_PORT
return BASE_PORT;
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 __LINES_ISSET_ID = 0;
private static final int __BASE_PORT_ISSET_ID = 1;
private BitSet __isset_bit_vector = new BitSet(2);
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.FILE, new FieldMetaData("file", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.LINES, new FieldMetaData("lines", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
tmpMap.put(_Fields.INDEX_CODE, new FieldMetaData("index_code", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.BASE_PORT, new FieldMetaData("base_port", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(head_args.class, metaDataMap);
}
public head_args() {
this.lines = 10;
this.index_code = "";
this.base_port = 0;
}
public head_args(
String file,
int lines,
String index_code,
int base_port)
{
this();
this.file = file;
this.lines = lines;
set_lines_isSet(true);
this.index_code = index_code;
this.base_port = base_port;
set_base_port_isSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public head_args(head_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.is_set_file()) {
this.file = other.file;
}
this.lines = other.lines;
if (other.is_set_index_code()) {
this.index_code = other.index_code;
}
this.base_port = other.base_port;
}
public head_args deepCopy() {
return new head_args(this);
}
@Override
public void clear() {
this.file = null;
this.lines = 10;
this.index_code = "";
this.base_port = 0;
}
public String get_file() {
return this.file;
}
public head_args set_file(String file) {
this.file = file;
return this;
}
public void unset_file() {
this.file = null;
}
/** Returns true if field file is set (has been asigned a value) and false otherwise */
public boolean is_set_file() {
return this.file != null;
}
public void set_file_isSet(boolean value) {
if (!value) {
this.file = null;
}
}
public int get_lines() {
return this.lines;
}
public head_args set_lines(int lines) {
this.lines = lines;
set_lines_isSet(true);
return this;
}
public void unset_lines() {
__isset_bit_vector.clear(__LINES_ISSET_ID);
}
/** Returns true if field lines is set (has been asigned a value) and false otherwise */
public boolean is_set_lines() {
return __isset_bit_vector.get(__LINES_ISSET_ID);
}
public void set_lines_isSet(boolean value) {
__isset_bit_vector.set(__LINES_ISSET_ID, value);
}
public String get_index_code() {
return this.index_code;
}
public head_args set_index_code(String index_code) {
this.index_code = index_code;
return this;
}
public void unset_index_code() {
this.index_code = null;
}
/** Returns true if field index_code is set (has been asigned a value) and false otherwise */
public boolean is_set_index_code() {
return this.index_code != null;
}
public void set_index_code_isSet(boolean value) {
if (!value) {
this.index_code = null;
}
}
public int get_base_port() {
return this.base_port;
}
public head_args set_base_port(int base_port) {
this.base_port = base_port;
set_base_port_isSet(true);
return this;
}
public void unset_base_port() {
__isset_bit_vector.clear(__BASE_PORT_ISSET_ID);
}
/** Returns true if field base_port is set (has been asigned a value) and false otherwise */
public boolean is_set_base_port() {
return __isset_bit_vector.get(__BASE_PORT_ISSET_ID);
}
public void set_base_port_isSet(boolean value) {
__isset_bit_vector.set(__BASE_PORT_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case FILE:
if (value == null) {
unset_file();
} else {
set_file((String)value);
}
break;
case LINES:
if (value == null) {
unset_lines();
} else {
set_lines((Integer)value);
}
break;
case INDEX_CODE:
if (value == null) {
unset_index_code();
} else {
set_index_code((String)value);
}
break;
case BASE_PORT:
if (value == null) {
unset_base_port();
} else {
set_base_port((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case FILE:
return get_file();
case LINES:
return new Integer(get_lines());
case INDEX_CODE:
return get_index_code();
case BASE_PORT:
return new Integer(get_base_port());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case FILE:
return is_set_file();
case LINES:
return is_set_lines();
case INDEX_CODE:
return is_set_index_code();
case BASE_PORT:
return is_set_base_port();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof head_args)
return this.equals((head_args)that);
return false;
}
public boolean equals(head_args that) {
if (that == null)
return false;
boolean this_present_file = true && this.is_set_file();
boolean that_present_file = true && that.is_set_file();
if (this_present_file || that_present_file) {
if (!(this_present_file && that_present_file))
return false;
if (!this.file.equals(that.file))
return false;
}
boolean this_present_lines = true;
boolean that_present_lines = true;
if (this_present_lines || that_present_lines) {
if (!(this_present_lines && that_present_lines))
return false;
if (this.lines != that.lines)
return false;
}
boolean this_present_index_code = true && this.is_set_index_code();
boolean that_present_index_code = true && that.is_set_index_code();
if (this_present_index_code || that_present_index_code) {
if (!(this_present_index_code && that_present_index_code))
return false;
if (!this.index_code.equals(that.index_code))
return false;
}
boolean this_present_base_port = true;
boolean that_present_base_port = true;
if (this_present_base_port || that_present_base_port) {
if (!(this_present_base_port && that_present_base_port))
return false;
if (this.base_port != that.base_port)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(head_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
head_args typedOther = (head_args)other;
lastComparison = Boolean.valueOf(is_set_file()).compareTo(typedOther.is_set_file());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_file()) {
lastComparison = TBaseHelper.compareTo(this.file, typedOther.file);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_lines()).compareTo(typedOther.is_set_lines());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_lines()) {
lastComparison = TBaseHelper.compareTo(this.lines, typedOther.lines);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_index_code()).compareTo(typedOther.is_set_index_code());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_index_code()) {
lastComparison = TBaseHelper.compareTo(this.index_code, typedOther.index_code);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_base_port()).compareTo(typedOther.is_set_base_port());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_base_port()) {
lastComparison = TBaseHelper.compareTo(this.base_port, typedOther.base_port);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 1: // FILE
if (field.type == TType.STRING) {
this.file = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // LINES
if (field.type == TType.I32) {
this.lines = iprot.readI32();
set_lines_isSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // INDEX_CODE
if (field.type == TType.STRING) {
this.index_code = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 4: // BASE_PORT
if (field.type == TType.I32) {
this.base_port = iprot.readI32();
set_base_port_isSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.file != null) {
oprot.writeFieldBegin(FILE_FIELD_DESC);
oprot.writeString(this.file);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(LINES_FIELD_DESC);
oprot.writeI32(this.lines);
oprot.writeFieldEnd();
if (this.index_code != null) {
oprot.writeFieldBegin(INDEX_CODE_FIELD_DESC);
oprot.writeString(this.index_code);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(BASE_PORT_FIELD_DESC);
oprot.writeI32(this.base_port);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("head_args(");
boolean first = true;
sb.append("file:");
if (this.file == null) {
sb.append("null");
} else {
sb.append(this.file);
}
first = false;
if (!first) sb.append(", ");
sb.append("lines:");
sb.append(this.lines);
first = false;
if (!first) sb.append(", ");
sb.append("index_code:");
if (this.index_code == null) {
sb.append("null");
} else {
sb.append(this.index_code);
}
first = false;
if (!first) sb.append(", ");
sb.append("base_port:");
sb.append(this.base_port);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class head_result implements TBase<head_result, head_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("head_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
private static final TField NE_FIELD_DESC = new TField("ne", TType.STRUCT, (short)1);
private String success;
private NebuException ne;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
SUCCESS((short)0, "success"),
NE((short)1, "ne");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // NE
return NE;
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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.NE, new FieldMetaData("ne", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(head_result.class, metaDataMap);
}
public head_result() {
}
public head_result(
String success,
NebuException ne)
{
this();
this.success = success;
this.ne = ne;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public head_result(head_result other) {
if (other.is_set_success()) {
this.success = other.success;
}
if (other.is_set_ne()) {
this.ne = new NebuException(other.ne);
}
}
public head_result deepCopy() {
return new head_result(this);
}
@Override
public void clear() {
this.success = null;
this.ne = null;
}
public String get_success() {
return this.success;
}
public head_result set_success(String success) {
this.success = success;
return this;
}
public void unset_success() {
this.success = null;
}
/** Returns true if field success is set (has been asigned 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 NebuException get_ne() {
return this.ne;
}
public head_result set_ne(NebuException ne) {
this.ne = ne;
return this;
}
public void unset_ne() {
this.ne = null;
}
/** Returns true if field ne is set (has been asigned a value) and false otherwise */
public boolean is_set_ne() {
return this.ne != null;
}
public void set_ne_isSet(boolean value) {
if (!value) {
this.ne = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unset_success();
} else {
set_success((String)value);
}
break;
case NE:
if (value == null) {
unset_ne();
} else {
set_ne((NebuException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return get_success();
case NE:
return get_ne();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return is_set_success();
case NE:
return is_set_ne();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof head_result)
return this.equals((head_result)that);
return false;
}
public boolean equals(head_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;
}
boolean this_present_ne = true && this.is_set_ne();
boolean that_present_ne = true && that.is_set_ne();
if (this_present_ne || that_present_ne) {
if (!(this_present_ne && that_present_ne))
return false;
if (!this.ne.equals(that.ne))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(head_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
head_result typedOther = (head_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_ne()).compareTo(typedOther.is_set_ne());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_ne()) {
lastComparison = TBaseHelper.compareTo(this.ne, typedOther.ne);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == TType.STRING) {
this.success = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // NE
if (field.type == TType.STRUCT) {
this.ne = new NebuException();
this.ne.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeString(this.success);
oprot.writeFieldEnd();
} else if (this.is_set_ne()) {
oprot.writeFieldBegin(NE_FIELD_DESC);
this.ne.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("head_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("ne:");
if (this.ne == null) {
sb.append("null");
} else {
sb.append(this.ne);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class tail_args implements TBase<tail_args, tail_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("tail_args");
private static final TField FILE_FIELD_DESC = new TField("file", TType.STRING, (short)1);
private static final TField LINES_FIELD_DESC = new TField("lines", TType.I32, (short)2);
private static final TField INDEX_CODE_FIELD_DESC = new TField("index_code", TType.STRING, (short)3);
private static final TField BASE_PORT_FIELD_DESC = new TField("base_port", TType.I32, (short)4);
private String file;
private int lines;
private String index_code;
private int base_port;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
FILE((short)1, "file"),
LINES((short)2, "lines"),
INDEX_CODE((short)3, "index_code"),
BASE_PORT((short)4, "base_port");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // FILE
return FILE;
case 2: // LINES
return LINES;
case 3: // INDEX_CODE
return INDEX_CODE;
case 4: // BASE_PORT
return BASE_PORT;
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 __LINES_ISSET_ID = 0;
private static final int __BASE_PORT_ISSET_ID = 1;
private BitSet __isset_bit_vector = new BitSet(2);
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.FILE, new FieldMetaData("file", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.LINES, new FieldMetaData("lines", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
tmpMap.put(_Fields.INDEX_CODE, new FieldMetaData("index_code", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.BASE_PORT, new FieldMetaData("base_port", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(tail_args.class, metaDataMap);
}
public tail_args() {
this.lines = 10;
this.index_code = "";
this.base_port = 0;
}
public tail_args(
String file,
int lines,
String index_code,
int base_port)
{
this();
this.file = file;
this.lines = lines;
set_lines_isSet(true);
this.index_code = index_code;
this.base_port = base_port;
set_base_port_isSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public tail_args(tail_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.is_set_file()) {
this.file = other.file;
}
this.lines = other.lines;
if (other.is_set_index_code()) {
this.index_code = other.index_code;
}
this.base_port = other.base_port;
}
public tail_args deepCopy() {
return new tail_args(this);
}
@Override
public void clear() {
this.file = null;
this.lines = 10;
this.index_code = "";
this.base_port = 0;
}
public String get_file() {
return this.file;
}
public tail_args set_file(String file) {
this.file = file;
return this;
}
public void unset_file() {
this.file = null;
}
/** Returns true if field file is set (has been asigned a value) and false otherwise */
public boolean is_set_file() {
return this.file != null;
}
public void set_file_isSet(boolean value) {
if (!value) {
this.file = null;
}
}
public int get_lines() {
return this.lines;
}
public tail_args set_lines(int lines) {
this.lines = lines;
set_lines_isSet(true);
return this;
}
public void unset_lines() {
__isset_bit_vector.clear(__LINES_ISSET_ID);
}
/** Returns true if field lines is set (has been asigned a value) and false otherwise */
public boolean is_set_lines() {
return __isset_bit_vector.get(__LINES_ISSET_ID);
}
public void set_lines_isSet(boolean value) {
__isset_bit_vector.set(__LINES_ISSET_ID, value);
}
public String get_index_code() {
return this.index_code;
}
public tail_args set_index_code(String index_code) {
this.index_code = index_code;
return this;
}
public void unset_index_code() {
this.index_code = null;
}
/** Returns true if field index_code is set (has been asigned a value) and false otherwise */
public boolean is_set_index_code() {
return this.index_code != null;
}
public void set_index_code_isSet(boolean value) {
if (!value) {
this.index_code = null;
}
}
public int get_base_port() {
return this.base_port;
}
public tail_args set_base_port(int base_port) {
this.base_port = base_port;
set_base_port_isSet(true);
return this;
}
public void unset_base_port() {
__isset_bit_vector.clear(__BASE_PORT_ISSET_ID);
}
/** Returns true if field base_port is set (has been asigned a value) and false otherwise */
public boolean is_set_base_port() {
return __isset_bit_vector.get(__BASE_PORT_ISSET_ID);
}
public void set_base_port_isSet(boolean value) {
__isset_bit_vector.set(__BASE_PORT_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case FILE:
if (value == null) {
unset_file();
} else {
set_file((String)value);
}
break;
case LINES:
if (value == null) {
unset_lines();
} else {
set_lines((Integer)value);
}
break;
case INDEX_CODE:
if (value == null) {
unset_index_code();
} else {
set_index_code((String)value);
}
break;
case BASE_PORT:
if (value == null) {
unset_base_port();
} else {
set_base_port((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case FILE:
return get_file();
case LINES:
return new Integer(get_lines());
case INDEX_CODE:
return get_index_code();
case BASE_PORT:
return new Integer(get_base_port());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case FILE:
return is_set_file();
case LINES:
return is_set_lines();
case INDEX_CODE:
return is_set_index_code();
case BASE_PORT:
return is_set_base_port();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof tail_args)
return this.equals((tail_args)that);
return false;
}
public boolean equals(tail_args that) {
if (that == null)
return false;
boolean this_present_file = true && this.is_set_file();
boolean that_present_file = true && that.is_set_file();
if (this_present_file || that_present_file) {
if (!(this_present_file && that_present_file))
return false;
if (!this.file.equals(that.file))
return false;
}
boolean this_present_lines = true;
boolean that_present_lines = true;
if (this_present_lines || that_present_lines) {
if (!(this_present_lines && that_present_lines))
return false;
if (this.lines != that.lines)
return false;
}
boolean this_present_index_code = true && this.is_set_index_code();
boolean that_present_index_code = true && that.is_set_index_code();
if (this_present_index_code || that_present_index_code) {
if (!(this_present_index_code && that_present_index_code))
return false;
if (!this.index_code.equals(that.index_code))
return false;
}
boolean this_present_base_port = true;
boolean that_present_base_port = true;
if (this_present_base_port || that_present_base_port) {
if (!(this_present_base_port && that_present_base_port))
return false;
if (this.base_port != that.base_port)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(tail_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
tail_args typedOther = (tail_args)other;
lastComparison = Boolean.valueOf(is_set_file()).compareTo(typedOther.is_set_file());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_file()) {
lastComparison = TBaseHelper.compareTo(this.file, typedOther.file);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_lines()).compareTo(typedOther.is_set_lines());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_lines()) {
lastComparison = TBaseHelper.compareTo(this.lines, typedOther.lines);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_index_code()).compareTo(typedOther.is_set_index_code());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_index_code()) {
lastComparison = TBaseHelper.compareTo(this.index_code, typedOther.index_code);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_base_port()).compareTo(typedOther.is_set_base_port());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_base_port()) {
lastComparison = TBaseHelper.compareTo(this.base_port, typedOther.base_port);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 1: // FILE
if (field.type == TType.STRING) {
this.file = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // LINES
if (field.type == TType.I32) {
this.lines = iprot.readI32();
set_lines_isSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // INDEX_CODE
if (field.type == TType.STRING) {
this.index_code = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 4: // BASE_PORT
if (field.type == TType.I32) {
this.base_port = iprot.readI32();
set_base_port_isSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.file != null) {
oprot.writeFieldBegin(FILE_FIELD_DESC);
oprot.writeString(this.file);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(LINES_FIELD_DESC);
oprot.writeI32(this.lines);
oprot.writeFieldEnd();
if (this.index_code != null) {
oprot.writeFieldBegin(INDEX_CODE_FIELD_DESC);
oprot.writeString(this.index_code);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(BASE_PORT_FIELD_DESC);
oprot.writeI32(this.base_port);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("tail_args(");
boolean first = true;
sb.append("file:");
if (this.file == null) {
sb.append("null");
} else {
sb.append(this.file);
}
first = false;
if (!first) sb.append(", ");
sb.append("lines:");
sb.append(this.lines);
first = false;
if (!first) sb.append(", ");
sb.append("index_code:");
if (this.index_code == null) {
sb.append("null");
} else {
sb.append(this.index_code);
}
first = false;
if (!first) sb.append(", ");
sb.append("base_port:");
sb.append(this.base_port);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class tail_result implements TBase<tail_result, tail_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("tail_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
private static final TField NE_FIELD_DESC = new TField("ne", TType.STRUCT, (short)1);
private String success;
private NebuException ne;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
SUCCESS((short)0, "success"),
NE((short)1, "ne");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // NE
return NE;
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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.NE, new FieldMetaData("ne", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(tail_result.class, metaDataMap);
}
public tail_result() {
}
public tail_result(
String success,
NebuException ne)
{
this();
this.success = success;
this.ne = ne;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public tail_result(tail_result other) {
if (other.is_set_success()) {
this.success = other.success;
}
if (other.is_set_ne()) {
this.ne = new NebuException(other.ne);
}
}
public tail_result deepCopy() {
return new tail_result(this);
}
@Override
public void clear() {
this.success = null;
this.ne = null;
}
public String get_success() {
return this.success;
}
public tail_result set_success(String success) {
this.success = success;
return this;
}
public void unset_success() {
this.success = null;
}
/** Returns true if field success is set (has been asigned 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 NebuException get_ne() {
return this.ne;
}
public tail_result set_ne(NebuException ne) {
this.ne = ne;
return this;
}
public void unset_ne() {
this.ne = null;
}
/** Returns true if field ne is set (has been asigned a value) and false otherwise */
public boolean is_set_ne() {
return this.ne != null;
}
public void set_ne_isSet(boolean value) {
if (!value) {
this.ne = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unset_success();
} else {
set_success((String)value);
}
break;
case NE:
if (value == null) {
unset_ne();
} else {
set_ne((NebuException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return get_success();
case NE:
return get_ne();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return is_set_success();
case NE:
return is_set_ne();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof tail_result)
return this.equals((tail_result)that);
return false;
}
public boolean equals(tail_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;
}
boolean this_present_ne = true && this.is_set_ne();
boolean that_present_ne = true && that.is_set_ne();
if (this_present_ne || that_present_ne) {
if (!(this_present_ne && that_present_ne))
return false;
if (!this.ne.equals(that.ne))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(tail_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
tail_result typedOther = (tail_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_ne()).compareTo(typedOther.is_set_ne());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_ne()) {
lastComparison = TBaseHelper.compareTo(this.ne, typedOther.ne);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == TType.STRING) {
this.success = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // NE
if (field.type == TType.STRUCT) {
this.ne = new NebuException();
this.ne.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeString(this.success);
oprot.writeFieldEnd();
} else if (this.is_set_ne()) {
oprot.writeFieldBegin(NE_FIELD_DESC);
this.ne.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("tail_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("ne:");
if (this.ne == null) {
sb.append("null");
} else {
sb.append(this.ne);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class ps_info_args implements TBase<ps_info_args, ps_info_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("ps_info_args");
private static final TField PIDFILE_FIELD_DESC = new TField("pidfile", TType.STRING, (short)1);
private static final TField INDEX_CODE_FIELD_DESC = new TField("index_code", TType.STRING, (short)2);
private static final TField BASE_PORT_FIELD_DESC = new TField("base_port", TType.I32, (short)3);
private String pidfile;
private String index_code;
private int base_port;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
PIDFILE((short)1, "pidfile"),
INDEX_CODE((short)2, "index_code"),
BASE_PORT((short)3, "base_port");
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: // PIDFILE
return PIDFILE;
case 2: // INDEX_CODE
return INDEX_CODE;
case 3: // BASE_PORT
return BASE_PORT;
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 __BASE_PORT_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PIDFILE, new FieldMetaData("pidfile", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.INDEX_CODE, new FieldMetaData("index_code", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.BASE_PORT, new FieldMetaData("base_port", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(ps_info_args.class, metaDataMap);
}
public ps_info_args() {
this.pidfile = "";
this.index_code = "";
this.base_port = 0;
}
public ps_info_args(
String pidfile,
String index_code,
int base_port)
{
this();
this.pidfile = pidfile;
this.index_code = index_code;
this.base_port = base_port;
set_base_port_isSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public ps_info_args(ps_info_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.is_set_pidfile()) {
this.pidfile = other.pidfile;
}
if (other.is_set_index_code()) {
this.index_code = other.index_code;
}
this.base_port = other.base_port;
}
public ps_info_args deepCopy() {
return new ps_info_args(this);
}
@Override
public void clear() {
this.pidfile = "";
this.index_code = "";
this.base_port = 0;
}
public String get_pidfile() {
return this.pidfile;
}
public ps_info_args set_pidfile(String pidfile) {
this.pidfile = pidfile;
return this;
}
public void unset_pidfile() {
this.pidfile = null;
}
/** Returns true if field pidfile is set (has been asigned a value) and false otherwise */
public boolean is_set_pidfile() {
return this.pidfile != null;
}
public void set_pidfile_isSet(boolean value) {
if (!value) {
this.pidfile = null;
}
}
public String get_index_code() {
return this.index_code;
}
public ps_info_args set_index_code(String index_code) {
this.index_code = index_code;
return this;
}
public void unset_index_code() {
this.index_code = null;
}
/** Returns true if field index_code is set (has been asigned a value) and false otherwise */
public boolean is_set_index_code() {
return this.index_code != null;
}
public void set_index_code_isSet(boolean value) {
if (!value) {
this.index_code = null;
}
}
public int get_base_port() {
return this.base_port;
}
public ps_info_args set_base_port(int base_port) {
this.base_port = base_port;
set_base_port_isSet(true);
return this;
}
public void unset_base_port() {
__isset_bit_vector.clear(__BASE_PORT_ISSET_ID);
}
/** Returns true if field base_port is set (has been asigned a value) and false otherwise */
public boolean is_set_base_port() {
return __isset_bit_vector.get(__BASE_PORT_ISSET_ID);
}
public void set_base_port_isSet(boolean value) {
__isset_bit_vector.set(__BASE_PORT_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PIDFILE:
if (value == null) {
unset_pidfile();
} else {
set_pidfile((String)value);
}
break;
case INDEX_CODE:
if (value == null) {
unset_index_code();
} else {
set_index_code((String)value);
}
break;
case BASE_PORT:
if (value == null) {
unset_base_port();
} else {
set_base_port((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PIDFILE:
return get_pidfile();
case INDEX_CODE:
return get_index_code();
case BASE_PORT:
return new Integer(get_base_port());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PIDFILE:
return is_set_pidfile();
case INDEX_CODE:
return is_set_index_code();
case BASE_PORT:
return is_set_base_port();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof ps_info_args)
return this.equals((ps_info_args)that);
return false;
}
public boolean equals(ps_info_args that) {
if (that == null)
return false;
boolean this_present_pidfile = true && this.is_set_pidfile();
boolean that_present_pidfile = true && that.is_set_pidfile();
if (this_present_pidfile || that_present_pidfile) {
if (!(this_present_pidfile && that_present_pidfile))
return false;
if (!this.pidfile.equals(that.pidfile))
return false;
}
boolean this_present_index_code = true && this.is_set_index_code();
boolean that_present_index_code = true && that.is_set_index_code();
if (this_present_index_code || that_present_index_code) {
if (!(this_present_index_code && that_present_index_code))
return false;
if (!this.index_code.equals(that.index_code))
return false;
}
boolean this_present_base_port = true;
boolean that_present_base_port = true;
if (this_present_base_port || that_present_base_port) {
if (!(this_present_base_port && that_present_base_port))
return false;
if (this.base_port != that.base_port)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(ps_info_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
ps_info_args typedOther = (ps_info_args)other;
lastComparison = Boolean.valueOf(is_set_pidfile()).compareTo(typedOther.is_set_pidfile());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_pidfile()) {
lastComparison = TBaseHelper.compareTo(this.pidfile, typedOther.pidfile);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_index_code()).compareTo(typedOther.is_set_index_code());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_index_code()) {
lastComparison = TBaseHelper.compareTo(this.index_code, typedOther.index_code);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_base_port()).compareTo(typedOther.is_set_base_port());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_base_port()) {
lastComparison = TBaseHelper.compareTo(this.base_port, typedOther.base_port);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 1: // PIDFILE
if (field.type == TType.STRING) {
this.pidfile = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // INDEX_CODE
if (field.type == TType.STRING) {
this.index_code = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // BASE_PORT
if (field.type == TType.I32) {
this.base_port = iprot.readI32();
set_base_port_isSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.pidfile != null) {
oprot.writeFieldBegin(PIDFILE_FIELD_DESC);
oprot.writeString(this.pidfile);
oprot.writeFieldEnd();
}
if (this.index_code != null) {
oprot.writeFieldBegin(INDEX_CODE_FIELD_DESC);
oprot.writeString(this.index_code);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(BASE_PORT_FIELD_DESC);
oprot.writeI32(this.base_port);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("ps_info_args(");
boolean first = true;
sb.append("pidfile:");
if (this.pidfile == null) {
sb.append("null");
} else {
sb.append(this.pidfile);
}
first = false;
if (!first) sb.append(", ");
sb.append("index_code:");
if (this.index_code == null) {
sb.append("null");
} else {
sb.append(this.index_code);
}
first = false;
if (!first) sb.append(", ");
sb.append("base_port:");
sb.append(this.base_port);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class ps_info_result implements TBase<ps_info_result, ps_info_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("ps_info_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
private static final TField NE_FIELD_DESC = new TField("ne", TType.STRUCT, (short)1);
private String success;
private NebuException ne;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
SUCCESS((short)0, "success"),
NE((short)1, "ne");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // NE
return NE;
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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.NE, new FieldMetaData("ne", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(ps_info_result.class, metaDataMap);
}
public ps_info_result() {
}
public ps_info_result(
String success,
NebuException ne)
{
this();
this.success = success;
this.ne = ne;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public ps_info_result(ps_info_result other) {
if (other.is_set_success()) {
this.success = other.success;
}
if (other.is_set_ne()) {
this.ne = new NebuException(other.ne);
}
}
public ps_info_result deepCopy() {
return new ps_info_result(this);
}
@Override
public void clear() {
this.success = null;
this.ne = null;
}
public String get_success() {
return this.success;
}
public ps_info_result set_success(String success) {
this.success = success;
return this;
}
public void unset_success() {
this.success = null;
}
/** Returns true if field success is set (has been asigned 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 NebuException get_ne() {
return this.ne;
}
public ps_info_result set_ne(NebuException ne) {
this.ne = ne;
return this;
}
public void unset_ne() {
this.ne = null;
}
/** Returns true if field ne is set (has been asigned a value) and false otherwise */
public boolean is_set_ne() {
return this.ne != null;
}
public void set_ne_isSet(boolean value) {
if (!value) {
this.ne = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unset_success();
} else {
set_success((String)value);
}
break;
case NE:
if (value == null) {
unset_ne();
} else {
set_ne((NebuException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return get_success();
case NE:
return get_ne();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return is_set_success();
case NE:
return is_set_ne();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof ps_info_result)
return this.equals((ps_info_result)that);
return false;
}
public boolean equals(ps_info_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;
}
boolean this_present_ne = true && this.is_set_ne();
boolean that_present_ne = true && that.is_set_ne();
if (this_present_ne || that_present_ne) {
if (!(this_present_ne && that_present_ne))
return false;
if (!this.ne.equals(that.ne))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(ps_info_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
ps_info_result typedOther = (ps_info_result)other;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_ne()).compareTo(typedOther.is_set_ne());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_ne()) {
lastComparison = TBaseHelper.compareTo(this.ne, typedOther.ne);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == TType.STRING) {
this.success = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 1: // NE
if (field.type == TType.STRUCT) {
this.ne = new NebuException();
this.ne.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeString(this.success);
oprot.writeFieldEnd();
} else if (this.is_set_ne()) {
oprot.writeFieldBegin(NE_FIELD_DESC);
this.ne.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("ps_info_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("ne:");
if (this.ne == null) {
sb.append("null");
} else {
sb.append(this.ne);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
}