/*
* Copyright (C) 2012-2016 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.facebook.nifty.perf;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import 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;
public class LoadTest {
public interface Iface {
/**
* noop() returns immediately, to test behavior of fast, cheap operations
*/
public void noop() throws org.apache.thrift.TException;
public void onewayNoop() throws org.apache.thrift.TException;
/**
* asyncNoop() is like noop() except for one minor difference in the async
* implementation.
*
* In the async handler, noop() invokes the callback immediately, while
* asyncNoop() uses runInLoop() to invoke the callback.
*/
public void asyncNoop() throws org.apache.thrift.TException;
/**
* sleep() waits for the specified time period before returning,
* to test slow, but not CPU-intensive operations
*
* @param microseconds
*/
public void sleep(long microseconds) throws org.apache.thrift.TException;
public void onewaySleep(long microseconds) throws org.apache.thrift.TException;
/**
* burn() uses as much CPU as possible for the desired time period,
* to test CPU-intensive operations
*
* @param microseconds
*/
public void burn(long microseconds) throws org.apache.thrift.TException;
public void onewayBurn(long microseconds) throws org.apache.thrift.TException;
/**
* badSleep() is like sleep(), except that it exhibits bad behavior in the
* async implementation.
*
* Instead of returning control to the event loop, it actually sleeps in the
* worker thread for the specified duration. This tests how well the thrift
* infrastructure responds to badly written handler code.
*
* @param microseconds
*/
public void badSleep(long microseconds) throws org.apache.thrift.TException;
/**
* badBurn() is like burn(), except that it exhibits bad behavior in the
* async implementation.
*
* The normal burn() call periodically yields to the event loop, while
* badBurn() does not. This tests how well the thrift infrastructure
* responds to badly written handler code.
*
* @param microseconds
*/
public void badBurn(long microseconds) throws org.apache.thrift.TException;
/**
* throw an error
*
* @param code
*/
public void throwError(int code) throws LoadError, org.apache.thrift.TException;
/**
* throw an unexpected error (not declared in the .thrift file)
*
* @param code
*/
public void throwUnexpected(int code) throws org.apache.thrift.TException;
/**
* throw an error in a oneway call,
* just to make sure the internal thrift code handles it properly
*
* @param code
*/
public void onewayThrow(int code) throws org.apache.thrift.TException;
/**
* Send some data to the server.
*
* The data is ignored. This is primarily to test the server I/O
* performance.
*
* @param data
*/
public void send(ByteBuffer data) throws org.apache.thrift.TException;
/**
* Send some data to the server.
*
* The data is ignored. This is primarily to test the server I/O
* performance.
*
* @param data
*/
public void onewaySend(ByteBuffer data) throws org.apache.thrift.TException;
/**
* Receive some data from the server.
*
* The contents of the data are undefined. This is primarily to test the
* server I/O performance.
*
* @param bytes
*/
public ByteBuffer recv(long bytes) throws org.apache.thrift.TException;
/**
* Send and receive data
*
* @param data
* @param recvBytes
*/
public ByteBuffer sendrecv(ByteBuffer data, long recvBytes) throws org.apache.thrift.TException;
/**
* Echo data back to the client.
*
* @param data
*/
public ByteBuffer echo(ByteBuffer data) throws org.apache.thrift.TException;
/**
* Add the two integers
*
* @param a
* @param b
*/
public long add(long a, long b) throws org.apache.thrift.TException;
}
public interface AsyncIface {
public void noop(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.noop_call> resultHandler) throws org.apache.thrift.TException;
public void onewayNoop(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.onewayNoop_call> resultHandler) throws org.apache.thrift.TException;
public void asyncNoop(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.asyncNoop_call> resultHandler) throws org.apache.thrift.TException;
public void sleep(long microseconds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.sleep_call> resultHandler) throws org.apache.thrift.TException;
public void onewaySleep(long microseconds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.onewaySleep_call> resultHandler) throws org.apache.thrift.TException;
public void burn(long microseconds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.burn_call> resultHandler) throws org.apache.thrift.TException;
public void onewayBurn(long microseconds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.onewayBurn_call> resultHandler) throws org.apache.thrift.TException;
public void badSleep(long microseconds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.badSleep_call> resultHandler) throws org.apache.thrift.TException;
public void badBurn(long microseconds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.badBurn_call> resultHandler) throws org.apache.thrift.TException;
public void throwError(int code, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.throwError_call> resultHandler) throws org.apache.thrift.TException;
public void throwUnexpected(int code, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.throwUnexpected_call> resultHandler) throws org.apache.thrift.TException;
public void onewayThrow(int code, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.onewayThrow_call> resultHandler) throws org.apache.thrift.TException;
public void send(ByteBuffer data, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.send_call> resultHandler) throws org.apache.thrift.TException;
public void onewaySend(ByteBuffer data, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.onewaySend_call> resultHandler) throws org.apache.thrift.TException;
public void recv(long bytes, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.recv_call> resultHandler) throws org.apache.thrift.TException;
public void sendrecv(ByteBuffer data, long recvBytes, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.sendrecv_call> resultHandler) throws org.apache.thrift.TException;
public void echo(ByteBuffer data, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.echo_call> resultHandler) throws org.apache.thrift.TException;
public void add(long a, long b, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.add_call> resultHandler) throws org.apache.thrift.TException;
}
public static class Client extends org.apache.thrift.TServiceClient implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
return new Client(prot);
}
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(org.apache.thrift.protocol.TProtocol prot)
{
super(prot, prot);
}
public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
super(iprot, oprot);
}
public void noop() throws org.apache.thrift.TException
{
send_noop();
recv_noop();
}
public void send_noop() throws org.apache.thrift.TException
{
noop_args args = new noop_args();
sendBase("noop", args);
}
public void recv_noop() throws org.apache.thrift.TException
{
noop_result result = new noop_result();
receiveBase(result, "noop");
return;
}
public void onewayNoop() throws org.apache.thrift.TException
{
send_onewayNoop();
}
public void send_onewayNoop() throws org.apache.thrift.TException
{
onewayNoop_args args = new onewayNoop_args();
sendBase("onewayNoop", args);
}
public void asyncNoop() throws org.apache.thrift.TException
{
send_asyncNoop();
recv_asyncNoop();
}
public void send_asyncNoop() throws org.apache.thrift.TException
{
asyncNoop_args args = new asyncNoop_args();
sendBase("asyncNoop", args);
}
public void recv_asyncNoop() throws org.apache.thrift.TException
{
asyncNoop_result result = new asyncNoop_result();
receiveBase(result, "asyncNoop");
return;
}
public void sleep(long microseconds) throws org.apache.thrift.TException
{
send_sleep(microseconds);
recv_sleep();
}
public void send_sleep(long microseconds) throws org.apache.thrift.TException
{
sleep_args args = new sleep_args();
args.setMicroseconds(microseconds);
sendBase("sleep", args);
}
public void recv_sleep() throws org.apache.thrift.TException
{
sleep_result result = new sleep_result();
receiveBase(result, "sleep");
return;
}
public void onewaySleep(long microseconds) throws org.apache.thrift.TException
{
send_onewaySleep(microseconds);
}
public void send_onewaySleep(long microseconds) throws org.apache.thrift.TException
{
onewaySleep_args args = new onewaySleep_args();
args.setMicroseconds(microseconds);
sendBase("onewaySleep", args);
}
public void burn(long microseconds) throws org.apache.thrift.TException
{
send_burn(microseconds);
recv_burn();
}
public void send_burn(long microseconds) throws org.apache.thrift.TException
{
burn_args args = new burn_args();
args.setMicroseconds(microseconds);
sendBase("burn", args);
}
public void recv_burn() throws org.apache.thrift.TException
{
burn_result result = new burn_result();
receiveBase(result, "burn");
return;
}
public void onewayBurn(long microseconds) throws org.apache.thrift.TException
{
send_onewayBurn(microseconds);
}
public void send_onewayBurn(long microseconds) throws org.apache.thrift.TException
{
onewayBurn_args args = new onewayBurn_args();
args.setMicroseconds(microseconds);
sendBase("onewayBurn", args);
}
public void badSleep(long microseconds) throws org.apache.thrift.TException
{
send_badSleep(microseconds);
recv_badSleep();
}
public void send_badSleep(long microseconds) throws org.apache.thrift.TException
{
badSleep_args args = new badSleep_args();
args.setMicroseconds(microseconds);
sendBase("badSleep", args);
}
public void recv_badSleep() throws org.apache.thrift.TException
{
badSleep_result result = new badSleep_result();
receiveBase(result, "badSleep");
return;
}
public void badBurn(long microseconds) throws org.apache.thrift.TException
{
send_badBurn(microseconds);
recv_badBurn();
}
public void send_badBurn(long microseconds) throws org.apache.thrift.TException
{
badBurn_args args = new badBurn_args();
args.setMicroseconds(microseconds);
sendBase("badBurn", args);
}
public void recv_badBurn() throws org.apache.thrift.TException
{
badBurn_result result = new badBurn_result();
receiveBase(result, "badBurn");
return;
}
public void throwError(int code) throws LoadError, org.apache.thrift.TException
{
send_throwError(code);
recv_throwError();
}
public void send_throwError(int code) throws org.apache.thrift.TException
{
throwError_args args = new throwError_args();
args.setCode(code);
sendBase("throwError", args);
}
public void recv_throwError() throws LoadError, org.apache.thrift.TException
{
throwError_result result = new throwError_result();
receiveBase(result, "throwError");
if (result.error != null) {
throw result.error;
}
return;
}
public void throwUnexpected(int code) throws org.apache.thrift.TException
{
send_throwUnexpected(code);
recv_throwUnexpected();
}
public void send_throwUnexpected(int code) throws org.apache.thrift.TException
{
throwUnexpected_args args = new throwUnexpected_args();
args.setCode(code);
sendBase("throwUnexpected", args);
}
public void recv_throwUnexpected() throws org.apache.thrift.TException
{
throwUnexpected_result result = new throwUnexpected_result();
receiveBase(result, "throwUnexpected");
return;
}
public void onewayThrow(int code) throws org.apache.thrift.TException
{
send_onewayThrow(code);
}
public void send_onewayThrow(int code) throws org.apache.thrift.TException
{
onewayThrow_args args = new onewayThrow_args();
args.setCode(code);
sendBase("onewayThrow", args);
}
public void send(ByteBuffer data) throws org.apache.thrift.TException
{
send_send(data);
recv_send();
}
public void send_send(ByteBuffer data) throws org.apache.thrift.TException
{
send_args args = new send_args();
args.setData(data);
sendBase("send", args);
}
public void recv_send() throws org.apache.thrift.TException
{
send_result result = new send_result();
receiveBase(result, "send");
return;
}
public void onewaySend(ByteBuffer data) throws org.apache.thrift.TException
{
send_onewaySend(data);
}
public void send_onewaySend(ByteBuffer data) throws org.apache.thrift.TException
{
onewaySend_args args = new onewaySend_args();
args.setData(data);
sendBase("onewaySend", args);
}
public ByteBuffer recv(long bytes) throws org.apache.thrift.TException
{
send_recv(bytes);
return recv_recv();
}
public void send_recv(long bytes) throws org.apache.thrift.TException
{
recv_args args = new recv_args();
args.setBytes(bytes);
sendBase("recv", args);
}
public ByteBuffer recv_recv() throws org.apache.thrift.TException
{
recv_result result = new recv_result();
receiveBase(result, "recv");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "recv failed: unknown result");
}
public ByteBuffer sendrecv(ByteBuffer data, long recvBytes) throws org.apache.thrift.TException
{
send_sendrecv(data, recvBytes);
return recv_sendrecv();
}
public void send_sendrecv(ByteBuffer data, long recvBytes) throws org.apache.thrift.TException
{
sendrecv_args args = new sendrecv_args();
args.setData(data);
args.setRecvBytes(recvBytes);
sendBase("sendrecv", args);
}
public ByteBuffer recv_sendrecv() throws org.apache.thrift.TException
{
sendrecv_result result = new sendrecv_result();
receiveBase(result, "sendrecv");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "sendrecv failed: unknown result");
}
public ByteBuffer echo(ByteBuffer data) throws org.apache.thrift.TException
{
send_echo(data);
return recv_echo();
}
public void send_echo(ByteBuffer data) throws org.apache.thrift.TException
{
echo_args args = new echo_args();
args.setData(data);
sendBase("echo", args);
}
public ByteBuffer recv_echo() throws org.apache.thrift.TException
{
echo_result result = new echo_result();
receiveBase(result, "echo");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "echo failed: unknown result");
}
public long add(long a, long b) throws org.apache.thrift.TException
{
send_add(a, b);
return recv_add();
}
public void send_add(long a, long b) throws org.apache.thrift.TException
{
add_args args = new add_args();
args.setA(a);
args.setB(b);
sendBase("add", args);
}
public long recv_add() throws org.apache.thrift.TException
{
add_result result = new add_result();
receiveBase(result, "add");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add failed: unknown result");
}
}
public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
private org.apache.thrift.async.TAsyncClientManager clientManager;
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void noop(org.apache.thrift.async.AsyncMethodCallback<noop_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
noop_call method_call = new noop_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class noop_call extends org.apache.thrift.async.TAsyncMethodCall {
public noop_call(org.apache.thrift.async.AsyncMethodCallback<noop_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("noop", org.apache.thrift.protocol.TMessageType.CALL, 0));
noop_args args = new noop_args();
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_noop();
}
}
public void onewayNoop(org.apache.thrift.async.AsyncMethodCallback<onewayNoop_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
onewayNoop_call method_call = new onewayNoop_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class onewayNoop_call extends org.apache.thrift.async.TAsyncMethodCall {
public onewayNoop_call(org.apache.thrift.async.AsyncMethodCallback<onewayNoop_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, true);
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onewayNoop", org.apache.thrift.protocol.TMessageType.CALL, 0));
onewayNoop_args args = new onewayNoop_args();
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
}
}
public void asyncNoop(org.apache.thrift.async.AsyncMethodCallback<asyncNoop_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
asyncNoop_call method_call = new asyncNoop_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class asyncNoop_call extends org.apache.thrift.async.TAsyncMethodCall {
public asyncNoop_call(org.apache.thrift.async.AsyncMethodCallback<asyncNoop_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("asyncNoop", org.apache.thrift.protocol.TMessageType.CALL, 0));
asyncNoop_args args = new asyncNoop_args();
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_asyncNoop();
}
}
public void sleep(long microseconds, org.apache.thrift.async.AsyncMethodCallback<sleep_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
sleep_call method_call = new sleep_call(microseconds, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class sleep_call extends org.apache.thrift.async.TAsyncMethodCall {
private long microseconds;
public sleep_call(long microseconds, org.apache.thrift.async.AsyncMethodCallback<sleep_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.microseconds = microseconds;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sleep", org.apache.thrift.protocol.TMessageType.CALL, 0));
sleep_args args = new sleep_args();
args.setMicroseconds(microseconds);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_sleep();
}
}
public void onewaySleep(long microseconds, org.apache.thrift.async.AsyncMethodCallback<onewaySleep_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
onewaySleep_call method_call = new onewaySleep_call(microseconds, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class onewaySleep_call extends org.apache.thrift.async.TAsyncMethodCall {
private long microseconds;
public onewaySleep_call(long microseconds, org.apache.thrift.async.AsyncMethodCallback<onewaySleep_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, true);
this.microseconds = microseconds;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onewaySleep", org.apache.thrift.protocol.TMessageType.CALL, 0));
onewaySleep_args args = new onewaySleep_args();
args.setMicroseconds(microseconds);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
}
}
public void burn(long microseconds, org.apache.thrift.async.AsyncMethodCallback<burn_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
burn_call method_call = new burn_call(microseconds, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class burn_call extends org.apache.thrift.async.TAsyncMethodCall {
private long microseconds;
public burn_call(long microseconds, org.apache.thrift.async.AsyncMethodCallback<burn_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.microseconds = microseconds;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("burn", org.apache.thrift.protocol.TMessageType.CALL, 0));
burn_args args = new burn_args();
args.setMicroseconds(microseconds);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_burn();
}
}
public void onewayBurn(long microseconds, org.apache.thrift.async.AsyncMethodCallback<onewayBurn_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
onewayBurn_call method_call = new onewayBurn_call(microseconds, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class onewayBurn_call extends org.apache.thrift.async.TAsyncMethodCall {
private long microseconds;
public onewayBurn_call(long microseconds, org.apache.thrift.async.AsyncMethodCallback<onewayBurn_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, true);
this.microseconds = microseconds;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onewayBurn", org.apache.thrift.protocol.TMessageType.CALL, 0));
onewayBurn_args args = new onewayBurn_args();
args.setMicroseconds(microseconds);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
}
}
public void badSleep(long microseconds, org.apache.thrift.async.AsyncMethodCallback<badSleep_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
badSleep_call method_call = new badSleep_call(microseconds, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class badSleep_call extends org.apache.thrift.async.TAsyncMethodCall {
private long microseconds;
public badSleep_call(long microseconds, org.apache.thrift.async.AsyncMethodCallback<badSleep_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.microseconds = microseconds;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("badSleep", org.apache.thrift.protocol.TMessageType.CALL, 0));
badSleep_args args = new badSleep_args();
args.setMicroseconds(microseconds);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_badSleep();
}
}
public void badBurn(long microseconds, org.apache.thrift.async.AsyncMethodCallback<badBurn_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
badBurn_call method_call = new badBurn_call(microseconds, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class badBurn_call extends org.apache.thrift.async.TAsyncMethodCall {
private long microseconds;
public badBurn_call(long microseconds, org.apache.thrift.async.AsyncMethodCallback<badBurn_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.microseconds = microseconds;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("badBurn", org.apache.thrift.protocol.TMessageType.CALL, 0));
badBurn_args args = new badBurn_args();
args.setMicroseconds(microseconds);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_badBurn();
}
}
public void throwError(int code, org.apache.thrift.async.AsyncMethodCallback<throwError_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
throwError_call method_call = new throwError_call(code, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class throwError_call extends org.apache.thrift.async.TAsyncMethodCall {
private int code;
public throwError_call(int code, org.apache.thrift.async.AsyncMethodCallback<throwError_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.code = code;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("throwError", org.apache.thrift.protocol.TMessageType.CALL, 0));
throwError_args args = new throwError_args();
args.setCode(code);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws LoadError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_throwError();
}
}
public void throwUnexpected(int code, org.apache.thrift.async.AsyncMethodCallback<throwUnexpected_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
throwUnexpected_call method_call = new throwUnexpected_call(code, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class throwUnexpected_call extends org.apache.thrift.async.TAsyncMethodCall {
private int code;
public throwUnexpected_call(int code, org.apache.thrift.async.AsyncMethodCallback<throwUnexpected_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.code = code;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("throwUnexpected", org.apache.thrift.protocol.TMessageType.CALL, 0));
throwUnexpected_args args = new throwUnexpected_args();
args.setCode(code);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_throwUnexpected();
}
}
public void onewayThrow(int code, org.apache.thrift.async.AsyncMethodCallback<onewayThrow_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
onewayThrow_call method_call = new onewayThrow_call(code, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class onewayThrow_call extends org.apache.thrift.async.TAsyncMethodCall {
private int code;
public onewayThrow_call(int code, org.apache.thrift.async.AsyncMethodCallback<onewayThrow_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, true);
this.code = code;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onewayThrow", org.apache.thrift.protocol.TMessageType.CALL, 0));
onewayThrow_args args = new onewayThrow_args();
args.setCode(code);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
}
}
public void send(ByteBuffer data, org.apache.thrift.async.AsyncMethodCallback<send_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
send_call method_call = new send_call(data, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class send_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer data;
public send_call(ByteBuffer data, org.apache.thrift.async.AsyncMethodCallback<send_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.data = data;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("send", org.apache.thrift.protocol.TMessageType.CALL, 0));
send_args args = new send_args();
args.setData(data);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_send();
}
}
public void onewaySend(ByteBuffer data, org.apache.thrift.async.AsyncMethodCallback<onewaySend_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
onewaySend_call method_call = new onewaySend_call(data, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class onewaySend_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer data;
public onewaySend_call(ByteBuffer data, org.apache.thrift.async.AsyncMethodCallback<onewaySend_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, true);
this.data = data;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onewaySend", org.apache.thrift.protocol.TMessageType.CALL, 0));
onewaySend_args args = new onewaySend_args();
args.setData(data);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
}
}
public void recv(long bytes, org.apache.thrift.async.AsyncMethodCallback<recv_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
recv_call method_call = new recv_call(bytes, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class recv_call extends org.apache.thrift.async.TAsyncMethodCall {
private long bytes;
public recv_call(long bytes, org.apache.thrift.async.AsyncMethodCallback<recv_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.bytes = bytes;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("recv", org.apache.thrift.protocol.TMessageType.CALL, 0));
recv_args args = new recv_args();
args.setBytes(bytes);
args.write(prot);
prot.writeMessageEnd();
}
public ByteBuffer getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_recv();
}
}
public void sendrecv(ByteBuffer data, long recvBytes, org.apache.thrift.async.AsyncMethodCallback<sendrecv_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
sendrecv_call method_call = new sendrecv_call(data, recvBytes, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class sendrecv_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer data;
private long recvBytes;
public sendrecv_call(ByteBuffer data, long recvBytes, org.apache.thrift.async.AsyncMethodCallback<sendrecv_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.data = data;
this.recvBytes = recvBytes;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sendrecv", org.apache.thrift.protocol.TMessageType.CALL, 0));
sendrecv_args args = new sendrecv_args();
args.setData(data);
args.setRecvBytes(recvBytes);
args.write(prot);
prot.writeMessageEnd();
}
public ByteBuffer getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_sendrecv();
}
}
public void echo(ByteBuffer data, org.apache.thrift.async.AsyncMethodCallback<echo_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
echo_call method_call = new echo_call(data, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class echo_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer data;
public echo_call(ByteBuffer data, org.apache.thrift.async.AsyncMethodCallback<echo_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.data = data;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("echo", org.apache.thrift.protocol.TMessageType.CALL, 0));
echo_args args = new echo_args();
args.setData(data);
args.write(prot);
prot.writeMessageEnd();
}
public ByteBuffer getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_echo();
}
}
public void add(long a, long b, org.apache.thrift.async.AsyncMethodCallback<add_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
add_call method_call = new add_call(a, b, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class add_call extends org.apache.thrift.async.TAsyncMethodCall {
private long a;
private long b;
public add_call(long a, long b, org.apache.thrift.async.AsyncMethodCallback<add_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.a = a;
this.b = b;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add", org.apache.thrift.protocol.TMessageType.CALL, 0));
add_args args = new add_args();
args.setA(a);
args.setB(b);
args.write(prot);
prot.writeMessageEnd();
}
public long getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_add();
}
}
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
public Processor(I iface) {
super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("noop", new noop());
processMap.put("onewayNoop", new onewayNoop());
processMap.put("asyncNoop", new asyncNoop());
processMap.put("sleep", new sleep());
processMap.put("onewaySleep", new onewaySleep());
processMap.put("burn", new burn());
processMap.put("onewayBurn", new onewayBurn());
processMap.put("badSleep", new badSleep());
processMap.put("badBurn", new badBurn());
processMap.put("throwError", new throwError());
processMap.put("throwUnexpected", new throwUnexpected());
processMap.put("onewayThrow", new onewayThrow());
processMap.put("send", new send());
processMap.put("onewaySend", new onewaySend());
processMap.put("recv", new recv());
processMap.put("sendrecv", new sendrecv());
processMap.put("echo", new echo());
processMap.put("add", new add());
return processMap;
}
public static class noop<I extends Iface> extends org.apache.thrift.ProcessFunction<I, noop_args> {
public noop() {
super("noop");
}
public noop_args getEmptyArgsInstance() {
return new noop_args();
}
protected boolean isOneway() {
return false;
}
public noop_result getResult(I iface, noop_args args) throws org.apache.thrift.TException {
noop_result result = new noop_result();
iface.noop();
return result;
}
}
public static class onewayNoop<I extends Iface> extends org.apache.thrift.ProcessFunction<I, onewayNoop_args> {
public onewayNoop() {
super("onewayNoop");
}
public onewayNoop_args getEmptyArgsInstance() {
return new onewayNoop_args();
}
protected boolean isOneway() {
return true;
}
public org.apache.thrift.TBase getResult(I iface, onewayNoop_args args) throws org.apache.thrift.TException {
iface.onewayNoop();
return null;
}
}
public static class asyncNoop<I extends Iface> extends org.apache.thrift.ProcessFunction<I, asyncNoop_args> {
public asyncNoop() {
super("asyncNoop");
}
public asyncNoop_args getEmptyArgsInstance() {
return new asyncNoop_args();
}
protected boolean isOneway() {
return false;
}
public asyncNoop_result getResult(I iface, asyncNoop_args args) throws org.apache.thrift.TException {
asyncNoop_result result = new asyncNoop_result();
iface.asyncNoop();
return result;
}
}
public static class sleep<I extends Iface> extends org.apache.thrift.ProcessFunction<I, sleep_args> {
public sleep() {
super("sleep");
}
public sleep_args getEmptyArgsInstance() {
return new sleep_args();
}
protected boolean isOneway() {
return false;
}
public sleep_result getResult(I iface, sleep_args args) throws org.apache.thrift.TException {
sleep_result result = new sleep_result();
iface.sleep(args.microseconds);
return result;
}
}
public static class onewaySleep<I extends Iface> extends org.apache.thrift.ProcessFunction<I, onewaySleep_args> {
public onewaySleep() {
super("onewaySleep");
}
public onewaySleep_args getEmptyArgsInstance() {
return new onewaySleep_args();
}
protected boolean isOneway() {
return true;
}
public org.apache.thrift.TBase getResult(I iface, onewaySleep_args args) throws org.apache.thrift.TException {
iface.onewaySleep(args.microseconds);
return null;
}
}
public static class burn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, burn_args> {
public burn() {
super("burn");
}
public burn_args getEmptyArgsInstance() {
return new burn_args();
}
protected boolean isOneway() {
return false;
}
public burn_result getResult(I iface, burn_args args) throws org.apache.thrift.TException {
burn_result result = new burn_result();
iface.burn(args.microseconds);
return result;
}
}
public static class onewayBurn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, onewayBurn_args> {
public onewayBurn() {
super("onewayBurn");
}
public onewayBurn_args getEmptyArgsInstance() {
return new onewayBurn_args();
}
protected boolean isOneway() {
return true;
}
public org.apache.thrift.TBase getResult(I iface, onewayBurn_args args) throws org.apache.thrift.TException {
iface.onewayBurn(args.microseconds);
return null;
}
}
public static class badSleep<I extends Iface> extends org.apache.thrift.ProcessFunction<I, badSleep_args> {
public badSleep() {
super("badSleep");
}
public badSleep_args getEmptyArgsInstance() {
return new badSleep_args();
}
protected boolean isOneway() {
return false;
}
public badSleep_result getResult(I iface, badSleep_args args) throws org.apache.thrift.TException {
badSleep_result result = new badSleep_result();
iface.badSleep(args.microseconds);
return result;
}
}
public static class badBurn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, badBurn_args> {
public badBurn() {
super("badBurn");
}
public badBurn_args getEmptyArgsInstance() {
return new badBurn_args();
}
protected boolean isOneway() {
return false;
}
public badBurn_result getResult(I iface, badBurn_args args) throws org.apache.thrift.TException {
badBurn_result result = new badBurn_result();
iface.badBurn(args.microseconds);
return result;
}
}
public static class throwError<I extends Iface> extends org.apache.thrift.ProcessFunction<I, throwError_args> {
public throwError() {
super("throwError");
}
public throwError_args getEmptyArgsInstance() {
return new throwError_args();
}
protected boolean isOneway() {
return false;
}
public throwError_result getResult(I iface, throwError_args args) throws org.apache.thrift.TException {
throwError_result result = new throwError_result();
try {
iface.throwError(args.code);
} catch (LoadError error) {
result.error = error;
}
return result;
}
}
public static class throwUnexpected<I extends Iface> extends org.apache.thrift.ProcessFunction<I, throwUnexpected_args> {
public throwUnexpected() {
super("throwUnexpected");
}
public throwUnexpected_args getEmptyArgsInstance() {
return new throwUnexpected_args();
}
protected boolean isOneway() {
return false;
}
public throwUnexpected_result getResult(I iface, throwUnexpected_args args) throws org.apache.thrift.TException {
throwUnexpected_result result = new throwUnexpected_result();
iface.throwUnexpected(args.code);
return result;
}
}
public static class onewayThrow<I extends Iface> extends org.apache.thrift.ProcessFunction<I, onewayThrow_args> {
public onewayThrow() {
super("onewayThrow");
}
public onewayThrow_args getEmptyArgsInstance() {
return new onewayThrow_args();
}
protected boolean isOneway() {
return true;
}
public org.apache.thrift.TBase getResult(I iface, onewayThrow_args args) throws org.apache.thrift.TException {
iface.onewayThrow(args.code);
return null;
}
}
public static class send<I extends Iface> extends org.apache.thrift.ProcessFunction<I, send_args> {
public send() {
super("send");
}
public send_args getEmptyArgsInstance() {
return new send_args();
}
protected boolean isOneway() {
return false;
}
public send_result getResult(I iface, send_args args) throws org.apache.thrift.TException {
send_result result = new send_result();
iface.send(args.data);
return result;
}
}
public static class onewaySend<I extends Iface> extends org.apache.thrift.ProcessFunction<I, onewaySend_args> {
public onewaySend() {
super("onewaySend");
}
public onewaySend_args getEmptyArgsInstance() {
return new onewaySend_args();
}
protected boolean isOneway() {
return true;
}
public org.apache.thrift.TBase getResult(I iface, onewaySend_args args) throws org.apache.thrift.TException {
iface.onewaySend(args.data);
return null;
}
}
public static class recv<I extends Iface> extends org.apache.thrift.ProcessFunction<I, recv_args> {
public recv() {
super("recv");
}
public recv_args getEmptyArgsInstance() {
return new recv_args();
}
protected boolean isOneway() {
return false;
}
public recv_result getResult(I iface, recv_args args) throws org.apache.thrift.TException {
recv_result result = new recv_result();
result.success = iface.recv(args.bytes);
return result;
}
}
public static class sendrecv<I extends Iface> extends org.apache.thrift.ProcessFunction<I, sendrecv_args> {
public sendrecv() {
super("sendrecv");
}
public sendrecv_args getEmptyArgsInstance() {
return new sendrecv_args();
}
protected boolean isOneway() {
return false;
}
public sendrecv_result getResult(I iface, sendrecv_args args) throws org.apache.thrift.TException {
sendrecv_result result = new sendrecv_result();
result.success = iface.sendrecv(args.data, args.recvBytes);
return result;
}
}
public static class echo<I extends Iface> extends org.apache.thrift.ProcessFunction<I, echo_args> {
public echo() {
super("echo");
}
public echo_args getEmptyArgsInstance() {
return new echo_args();
}
protected boolean isOneway() {
return false;
}
public echo_result getResult(I iface, echo_args args) throws org.apache.thrift.TException {
echo_result result = new echo_result();
result.success = iface.echo(args.data);
return result;
}
}
public static class add<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_args> {
public add() {
super("add");
}
public add_args getEmptyArgsInstance() {
return new add_args();
}
protected boolean isOneway() {
return false;
}
public add_result getResult(I iface, add_args args) throws org.apache.thrift.TException {
add_result result = new add_result();
result.success = iface.add(args.a, args.b);
result.setSuccessIsSet(true);
return result;
}
}
}
public static class noop_args implements org.apache.thrift.TBase<noop_args, noop_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("noop_args");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new noop_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new noop_argsTupleSchemeFactory());
}
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(noop_args.class, metaDataMap);
}
public noop_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public noop_args(noop_args other) {
}
public noop_args deepCopy() {
return new noop_args(this);
}
@Override
public void clear() {
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof noop_args)
return this.equals((noop_args)that);
return false;
}
public boolean equals(noop_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(noop_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
noop_args typedOther = (noop_args)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("noop_args(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class noop_argsStandardSchemeFactory implements SchemeFactory {
public noop_argsStandardScheme getScheme() {
return new noop_argsStandardScheme();
}
}
private static class noop_argsStandardScheme extends StandardScheme<noop_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, noop_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, noop_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class noop_argsTupleSchemeFactory implements SchemeFactory {
public noop_argsTupleScheme getScheme() {
return new noop_argsTupleScheme();
}
}
private static class noop_argsTupleScheme extends TupleScheme<noop_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, noop_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, noop_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class noop_result implements org.apache.thrift.TBase<noop_result, noop_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("noop_result");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new noop_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new noop_resultTupleSchemeFactory());
}
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(noop_result.class, metaDataMap);
}
public noop_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public noop_result(noop_result other) {
}
public noop_result deepCopy() {
return new noop_result(this);
}
@Override
public void clear() {
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof noop_result)
return this.equals((noop_result)that);
return false;
}
public boolean equals(noop_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(noop_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
noop_result typedOther = (noop_result)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("noop_result(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class noop_resultStandardSchemeFactory implements SchemeFactory {
public noop_resultStandardScheme getScheme() {
return new noop_resultStandardScheme();
}
}
private static class noop_resultStandardScheme extends StandardScheme<noop_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, noop_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, noop_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class noop_resultTupleSchemeFactory implements SchemeFactory {
public noop_resultTupleScheme getScheme() {
return new noop_resultTupleScheme();
}
}
private static class noop_resultTupleScheme extends TupleScheme<noop_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, noop_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, noop_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class onewayNoop_args implements org.apache.thrift.TBase<onewayNoop_args, onewayNoop_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onewayNoop_args");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new onewayNoop_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new onewayNoop_argsTupleSchemeFactory());
}
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onewayNoop_args.class, metaDataMap);
}
public onewayNoop_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public onewayNoop_args(onewayNoop_args other) {
}
public onewayNoop_args deepCopy() {
return new onewayNoop_args(this);
}
@Override
public void clear() {
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof onewayNoop_args)
return this.equals((onewayNoop_args)that);
return false;
}
public boolean equals(onewayNoop_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(onewayNoop_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
onewayNoop_args typedOther = (onewayNoop_args)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("onewayNoop_args(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class onewayNoop_argsStandardSchemeFactory implements SchemeFactory {
public onewayNoop_argsStandardScheme getScheme() {
return new onewayNoop_argsStandardScheme();
}
}
private static class onewayNoop_argsStandardScheme extends StandardScheme<onewayNoop_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, onewayNoop_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, onewayNoop_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class onewayNoop_argsTupleSchemeFactory implements SchemeFactory {
public onewayNoop_argsTupleScheme getScheme() {
return new onewayNoop_argsTupleScheme();
}
}
private static class onewayNoop_argsTupleScheme extends TupleScheme<onewayNoop_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, onewayNoop_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, onewayNoop_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class asyncNoop_args implements org.apache.thrift.TBase<asyncNoop_args, asyncNoop_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("asyncNoop_args");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new asyncNoop_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new asyncNoop_argsTupleSchemeFactory());
}
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(asyncNoop_args.class, metaDataMap);
}
public asyncNoop_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public asyncNoop_args(asyncNoop_args other) {
}
public asyncNoop_args deepCopy() {
return new asyncNoop_args(this);
}
@Override
public void clear() {
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof asyncNoop_args)
return this.equals((asyncNoop_args)that);
return false;
}
public boolean equals(asyncNoop_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(asyncNoop_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
asyncNoop_args typedOther = (asyncNoop_args)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("asyncNoop_args(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class asyncNoop_argsStandardSchemeFactory implements SchemeFactory {
public asyncNoop_argsStandardScheme getScheme() {
return new asyncNoop_argsStandardScheme();
}
}
private static class asyncNoop_argsStandardScheme extends StandardScheme<asyncNoop_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, asyncNoop_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, asyncNoop_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class asyncNoop_argsTupleSchemeFactory implements SchemeFactory {
public asyncNoop_argsTupleScheme getScheme() {
return new asyncNoop_argsTupleScheme();
}
}
private static class asyncNoop_argsTupleScheme extends TupleScheme<asyncNoop_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, asyncNoop_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, asyncNoop_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class asyncNoop_result implements org.apache.thrift.TBase<asyncNoop_result, asyncNoop_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("asyncNoop_result");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new asyncNoop_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new asyncNoop_resultTupleSchemeFactory());
}
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(asyncNoop_result.class, metaDataMap);
}
public asyncNoop_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public asyncNoop_result(asyncNoop_result other) {
}
public asyncNoop_result deepCopy() {
return new asyncNoop_result(this);
}
@Override
public void clear() {
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof asyncNoop_result)
return this.equals((asyncNoop_result)that);
return false;
}
public boolean equals(asyncNoop_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(asyncNoop_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
asyncNoop_result typedOther = (asyncNoop_result)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("asyncNoop_result(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class asyncNoop_resultStandardSchemeFactory implements SchemeFactory {
public asyncNoop_resultStandardScheme getScheme() {
return new asyncNoop_resultStandardScheme();
}
}
private static class asyncNoop_resultStandardScheme extends StandardScheme<asyncNoop_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, asyncNoop_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, asyncNoop_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class asyncNoop_resultTupleSchemeFactory implements SchemeFactory {
public asyncNoop_resultTupleScheme getScheme() {
return new asyncNoop_resultTupleScheme();
}
}
private static class asyncNoop_resultTupleScheme extends TupleScheme<asyncNoop_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, asyncNoop_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, asyncNoop_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class sleep_args implements org.apache.thrift.TBase<sleep_args, sleep_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sleep_args");
private static final org.apache.thrift.protocol.TField MICROSECONDS_FIELD_DESC = new org.apache.thrift.protocol.TField("microseconds", org.apache.thrift.protocol.TType.I64, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new sleep_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new sleep_argsTupleSchemeFactory());
}
public long microseconds; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MICROSECONDS((short)1, "microseconds");
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: // MICROSECONDS
return MICROSECONDS;
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 __MICROSECONDS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MICROSECONDS, new org.apache.thrift.meta_data.FieldMetaData("microseconds", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sleep_args.class, metaDataMap);
}
public sleep_args() {
}
public sleep_args(
long microseconds)
{
this();
this.microseconds = microseconds;
setMicrosecondsIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public sleep_args(sleep_args other) {
__isset_bitfield = other.__isset_bitfield;
this.microseconds = other.microseconds;
}
public sleep_args deepCopy() {
return new sleep_args(this);
}
@Override
public void clear() {
setMicrosecondsIsSet(false);
this.microseconds = 0;
}
public long getMicroseconds() {
return this.microseconds;
}
public sleep_args setMicroseconds(long microseconds) {
this.microseconds = microseconds;
setMicrosecondsIsSet(true);
return this;
}
public void unsetMicroseconds() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MICROSECONDS_ISSET_ID);
}
/** Returns true if field microseconds is set (has been assigned a value) and false otherwise */
public boolean isSetMicroseconds() {
return EncodingUtils.testBit(__isset_bitfield, __MICROSECONDS_ISSET_ID);
}
public void setMicrosecondsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MICROSECONDS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case MICROSECONDS:
if (value == null) {
unsetMicroseconds();
} else {
setMicroseconds((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case MICROSECONDS:
return Long.valueOf(getMicroseconds());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case MICROSECONDS:
return isSetMicroseconds();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sleep_args)
return this.equals((sleep_args)that);
return false;
}
public boolean equals(sleep_args that) {
if (that == null)
return false;
boolean this_present_microseconds = true;
boolean that_present_microseconds = true;
if (this_present_microseconds || that_present_microseconds) {
if (!(this_present_microseconds && that_present_microseconds))
return false;
if (this.microseconds != that.microseconds)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(sleep_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
sleep_args typedOther = (sleep_args)other;
lastComparison = Boolean.valueOf(isSetMicroseconds()).compareTo(typedOther.isSetMicroseconds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMicroseconds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.microseconds, typedOther.microseconds);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("sleep_args(");
boolean first = true;
sb.append("microseconds:");
sb.append(this.microseconds);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class sleep_argsStandardSchemeFactory implements SchemeFactory {
public sleep_argsStandardScheme getScheme() {
return new sleep_argsStandardScheme();
}
}
private static class sleep_argsStandardScheme extends StandardScheme<sleep_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, sleep_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // MICROSECONDS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.microseconds = iprot.readI64();
struct.setMicrosecondsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, sleep_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(MICROSECONDS_FIELD_DESC);
oprot.writeI64(struct.microseconds);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class sleep_argsTupleSchemeFactory implements SchemeFactory {
public sleep_argsTupleScheme getScheme() {
return new sleep_argsTupleScheme();
}
}
private static class sleep_argsTupleScheme extends TupleScheme<sleep_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, sleep_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetMicroseconds()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetMicroseconds()) {
oprot.writeI64(struct.microseconds);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, sleep_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.microseconds = iprot.readI64();
struct.setMicrosecondsIsSet(true);
}
}
}
}
public static class sleep_result implements org.apache.thrift.TBase<sleep_result, sleep_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sleep_result");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new sleep_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new sleep_resultTupleSchemeFactory());
}
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sleep_result.class, metaDataMap);
}
public sleep_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public sleep_result(sleep_result other) {
}
public sleep_result deepCopy() {
return new sleep_result(this);
}
@Override
public void clear() {
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sleep_result)
return this.equals((sleep_result)that);
return false;
}
public boolean equals(sleep_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(sleep_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
sleep_result typedOther = (sleep_result)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("sleep_result(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class sleep_resultStandardSchemeFactory implements SchemeFactory {
public sleep_resultStandardScheme getScheme() {
return new sleep_resultStandardScheme();
}
}
private static class sleep_resultStandardScheme extends StandardScheme<sleep_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, sleep_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, sleep_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class sleep_resultTupleSchemeFactory implements SchemeFactory {
public sleep_resultTupleScheme getScheme() {
return new sleep_resultTupleScheme();
}
}
private static class sleep_resultTupleScheme extends TupleScheme<sleep_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, sleep_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, sleep_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class onewaySleep_args implements org.apache.thrift.TBase<onewaySleep_args, onewaySleep_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onewaySleep_args");
private static final org.apache.thrift.protocol.TField MICROSECONDS_FIELD_DESC = new org.apache.thrift.protocol.TField("microseconds", org.apache.thrift.protocol.TType.I64, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new onewaySleep_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new onewaySleep_argsTupleSchemeFactory());
}
public long microseconds; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MICROSECONDS((short)1, "microseconds");
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: // MICROSECONDS
return MICROSECONDS;
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 __MICROSECONDS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MICROSECONDS, new org.apache.thrift.meta_data.FieldMetaData("microseconds", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onewaySleep_args.class, metaDataMap);
}
public onewaySleep_args() {
}
public onewaySleep_args(
long microseconds)
{
this();
this.microseconds = microseconds;
setMicrosecondsIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public onewaySleep_args(onewaySleep_args other) {
__isset_bitfield = other.__isset_bitfield;
this.microseconds = other.microseconds;
}
public onewaySleep_args deepCopy() {
return new onewaySleep_args(this);
}
@Override
public void clear() {
setMicrosecondsIsSet(false);
this.microseconds = 0;
}
public long getMicroseconds() {
return this.microseconds;
}
public onewaySleep_args setMicroseconds(long microseconds) {
this.microseconds = microseconds;
setMicrosecondsIsSet(true);
return this;
}
public void unsetMicroseconds() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MICROSECONDS_ISSET_ID);
}
/** Returns true if field microseconds is set (has been assigned a value) and false otherwise */
public boolean isSetMicroseconds() {
return EncodingUtils.testBit(__isset_bitfield, __MICROSECONDS_ISSET_ID);
}
public void setMicrosecondsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MICROSECONDS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case MICROSECONDS:
if (value == null) {
unsetMicroseconds();
} else {
setMicroseconds((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case MICROSECONDS:
return Long.valueOf(getMicroseconds());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case MICROSECONDS:
return isSetMicroseconds();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof onewaySleep_args)
return this.equals((onewaySleep_args)that);
return false;
}
public boolean equals(onewaySleep_args that) {
if (that == null)
return false;
boolean this_present_microseconds = true;
boolean that_present_microseconds = true;
if (this_present_microseconds || that_present_microseconds) {
if (!(this_present_microseconds && that_present_microseconds))
return false;
if (this.microseconds != that.microseconds)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(onewaySleep_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
onewaySleep_args typedOther = (onewaySleep_args)other;
lastComparison = Boolean.valueOf(isSetMicroseconds()).compareTo(typedOther.isSetMicroseconds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMicroseconds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.microseconds, typedOther.microseconds);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("onewaySleep_args(");
boolean first = true;
sb.append("microseconds:");
sb.append(this.microseconds);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class onewaySleep_argsStandardSchemeFactory implements SchemeFactory {
public onewaySleep_argsStandardScheme getScheme() {
return new onewaySleep_argsStandardScheme();
}
}
private static class onewaySleep_argsStandardScheme extends StandardScheme<onewaySleep_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, onewaySleep_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // MICROSECONDS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.microseconds = iprot.readI64();
struct.setMicrosecondsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, onewaySleep_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(MICROSECONDS_FIELD_DESC);
oprot.writeI64(struct.microseconds);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class onewaySleep_argsTupleSchemeFactory implements SchemeFactory {
public onewaySleep_argsTupleScheme getScheme() {
return new onewaySleep_argsTupleScheme();
}
}
private static class onewaySleep_argsTupleScheme extends TupleScheme<onewaySleep_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, onewaySleep_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetMicroseconds()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetMicroseconds()) {
oprot.writeI64(struct.microseconds);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, onewaySleep_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.microseconds = iprot.readI64();
struct.setMicrosecondsIsSet(true);
}
}
}
}
public static class burn_args implements org.apache.thrift.TBase<burn_args, burn_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("burn_args");
private static final org.apache.thrift.protocol.TField MICROSECONDS_FIELD_DESC = new org.apache.thrift.protocol.TField("microseconds", org.apache.thrift.protocol.TType.I64, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new burn_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new burn_argsTupleSchemeFactory());
}
public long microseconds; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MICROSECONDS((short)1, "microseconds");
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: // MICROSECONDS
return MICROSECONDS;
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 __MICROSECONDS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MICROSECONDS, new org.apache.thrift.meta_data.FieldMetaData("microseconds", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(burn_args.class, metaDataMap);
}
public burn_args() {
}
public burn_args(
long microseconds)
{
this();
this.microseconds = microseconds;
setMicrosecondsIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public burn_args(burn_args other) {
__isset_bitfield = other.__isset_bitfield;
this.microseconds = other.microseconds;
}
public burn_args deepCopy() {
return new burn_args(this);
}
@Override
public void clear() {
setMicrosecondsIsSet(false);
this.microseconds = 0;
}
public long getMicroseconds() {
return this.microseconds;
}
public burn_args setMicroseconds(long microseconds) {
this.microseconds = microseconds;
setMicrosecondsIsSet(true);
return this;
}
public void unsetMicroseconds() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MICROSECONDS_ISSET_ID);
}
/** Returns true if field microseconds is set (has been assigned a value) and false otherwise */
public boolean isSetMicroseconds() {
return EncodingUtils.testBit(__isset_bitfield, __MICROSECONDS_ISSET_ID);
}
public void setMicrosecondsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MICROSECONDS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case MICROSECONDS:
if (value == null) {
unsetMicroseconds();
} else {
setMicroseconds((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case MICROSECONDS:
return Long.valueOf(getMicroseconds());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case MICROSECONDS:
return isSetMicroseconds();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof burn_args)
return this.equals((burn_args)that);
return false;
}
public boolean equals(burn_args that) {
if (that == null)
return false;
boolean this_present_microseconds = true;
boolean that_present_microseconds = true;
if (this_present_microseconds || that_present_microseconds) {
if (!(this_present_microseconds && that_present_microseconds))
return false;
if (this.microseconds != that.microseconds)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(burn_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
burn_args typedOther = (burn_args)other;
lastComparison = Boolean.valueOf(isSetMicroseconds()).compareTo(typedOther.isSetMicroseconds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMicroseconds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.microseconds, typedOther.microseconds);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("burn_args(");
boolean first = true;
sb.append("microseconds:");
sb.append(this.microseconds);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class burn_argsStandardSchemeFactory implements SchemeFactory {
public burn_argsStandardScheme getScheme() {
return new burn_argsStandardScheme();
}
}
private static class burn_argsStandardScheme extends StandardScheme<burn_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, burn_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // MICROSECONDS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.microseconds = iprot.readI64();
struct.setMicrosecondsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, burn_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(MICROSECONDS_FIELD_DESC);
oprot.writeI64(struct.microseconds);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class burn_argsTupleSchemeFactory implements SchemeFactory {
public burn_argsTupleScheme getScheme() {
return new burn_argsTupleScheme();
}
}
private static class burn_argsTupleScheme extends TupleScheme<burn_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, burn_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetMicroseconds()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetMicroseconds()) {
oprot.writeI64(struct.microseconds);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, burn_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.microseconds = iprot.readI64();
struct.setMicrosecondsIsSet(true);
}
}
}
}
public static class burn_result implements org.apache.thrift.TBase<burn_result, burn_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("burn_result");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new burn_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new burn_resultTupleSchemeFactory());
}
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(burn_result.class, metaDataMap);
}
public burn_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public burn_result(burn_result other) {
}
public burn_result deepCopy() {
return new burn_result(this);
}
@Override
public void clear() {
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof burn_result)
return this.equals((burn_result)that);
return false;
}
public boolean equals(burn_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(burn_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
burn_result typedOther = (burn_result)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("burn_result(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class burn_resultStandardSchemeFactory implements SchemeFactory {
public burn_resultStandardScheme getScheme() {
return new burn_resultStandardScheme();
}
}
private static class burn_resultStandardScheme extends StandardScheme<burn_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, burn_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, burn_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class burn_resultTupleSchemeFactory implements SchemeFactory {
public burn_resultTupleScheme getScheme() {
return new burn_resultTupleScheme();
}
}
private static class burn_resultTupleScheme extends TupleScheme<burn_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, burn_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, burn_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class onewayBurn_args implements org.apache.thrift.TBase<onewayBurn_args, onewayBurn_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onewayBurn_args");
private static final org.apache.thrift.protocol.TField MICROSECONDS_FIELD_DESC = new org.apache.thrift.protocol.TField("microseconds", org.apache.thrift.protocol.TType.I64, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new onewayBurn_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new onewayBurn_argsTupleSchemeFactory());
}
public long microseconds; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MICROSECONDS((short)1, "microseconds");
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: // MICROSECONDS
return MICROSECONDS;
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 __MICROSECONDS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MICROSECONDS, new org.apache.thrift.meta_data.FieldMetaData("microseconds", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onewayBurn_args.class, metaDataMap);
}
public onewayBurn_args() {
}
public onewayBurn_args(
long microseconds)
{
this();
this.microseconds = microseconds;
setMicrosecondsIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public onewayBurn_args(onewayBurn_args other) {
__isset_bitfield = other.__isset_bitfield;
this.microseconds = other.microseconds;
}
public onewayBurn_args deepCopy() {
return new onewayBurn_args(this);
}
@Override
public void clear() {
setMicrosecondsIsSet(false);
this.microseconds = 0;
}
public long getMicroseconds() {
return this.microseconds;
}
public onewayBurn_args setMicroseconds(long microseconds) {
this.microseconds = microseconds;
setMicrosecondsIsSet(true);
return this;
}
public void unsetMicroseconds() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MICROSECONDS_ISSET_ID);
}
/** Returns true if field microseconds is set (has been assigned a value) and false otherwise */
public boolean isSetMicroseconds() {
return EncodingUtils.testBit(__isset_bitfield, __MICROSECONDS_ISSET_ID);
}
public void setMicrosecondsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MICROSECONDS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case MICROSECONDS:
if (value == null) {
unsetMicroseconds();
} else {
setMicroseconds((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case MICROSECONDS:
return Long.valueOf(getMicroseconds());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case MICROSECONDS:
return isSetMicroseconds();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof onewayBurn_args)
return this.equals((onewayBurn_args)that);
return false;
}
public boolean equals(onewayBurn_args that) {
if (that == null)
return false;
boolean this_present_microseconds = true;
boolean that_present_microseconds = true;
if (this_present_microseconds || that_present_microseconds) {
if (!(this_present_microseconds && that_present_microseconds))
return false;
if (this.microseconds != that.microseconds)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(onewayBurn_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
onewayBurn_args typedOther = (onewayBurn_args)other;
lastComparison = Boolean.valueOf(isSetMicroseconds()).compareTo(typedOther.isSetMicroseconds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMicroseconds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.microseconds, typedOther.microseconds);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("onewayBurn_args(");
boolean first = true;
sb.append("microseconds:");
sb.append(this.microseconds);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class onewayBurn_argsStandardSchemeFactory implements SchemeFactory {
public onewayBurn_argsStandardScheme getScheme() {
return new onewayBurn_argsStandardScheme();
}
}
private static class onewayBurn_argsStandardScheme extends StandardScheme<onewayBurn_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, onewayBurn_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // MICROSECONDS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.microseconds = iprot.readI64();
struct.setMicrosecondsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, onewayBurn_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(MICROSECONDS_FIELD_DESC);
oprot.writeI64(struct.microseconds);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class onewayBurn_argsTupleSchemeFactory implements SchemeFactory {
public onewayBurn_argsTupleScheme getScheme() {
return new onewayBurn_argsTupleScheme();
}
}
private static class onewayBurn_argsTupleScheme extends TupleScheme<onewayBurn_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, onewayBurn_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetMicroseconds()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetMicroseconds()) {
oprot.writeI64(struct.microseconds);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, onewayBurn_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.microseconds = iprot.readI64();
struct.setMicrosecondsIsSet(true);
}
}
}
}
public static class badSleep_args implements org.apache.thrift.TBase<badSleep_args, badSleep_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("badSleep_args");
private static final org.apache.thrift.protocol.TField MICROSECONDS_FIELD_DESC = new org.apache.thrift.protocol.TField("microseconds", org.apache.thrift.protocol.TType.I64, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new badSleep_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new badSleep_argsTupleSchemeFactory());
}
public long microseconds; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MICROSECONDS((short)1, "microseconds");
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: // MICROSECONDS
return MICROSECONDS;
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 __MICROSECONDS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MICROSECONDS, new org.apache.thrift.meta_data.FieldMetaData("microseconds", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(badSleep_args.class, metaDataMap);
}
public badSleep_args() {
}
public badSleep_args(
long microseconds)
{
this();
this.microseconds = microseconds;
setMicrosecondsIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public badSleep_args(badSleep_args other) {
__isset_bitfield = other.__isset_bitfield;
this.microseconds = other.microseconds;
}
public badSleep_args deepCopy() {
return new badSleep_args(this);
}
@Override
public void clear() {
setMicrosecondsIsSet(false);
this.microseconds = 0;
}
public long getMicroseconds() {
return this.microseconds;
}
public badSleep_args setMicroseconds(long microseconds) {
this.microseconds = microseconds;
setMicrosecondsIsSet(true);
return this;
}
public void unsetMicroseconds() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MICROSECONDS_ISSET_ID);
}
/** Returns true if field microseconds is set (has been assigned a value) and false otherwise */
public boolean isSetMicroseconds() {
return EncodingUtils.testBit(__isset_bitfield, __MICROSECONDS_ISSET_ID);
}
public void setMicrosecondsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MICROSECONDS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case MICROSECONDS:
if (value == null) {
unsetMicroseconds();
} else {
setMicroseconds((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case MICROSECONDS:
return Long.valueOf(getMicroseconds());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case MICROSECONDS:
return isSetMicroseconds();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof badSleep_args)
return this.equals((badSleep_args)that);
return false;
}
public boolean equals(badSleep_args that) {
if (that == null)
return false;
boolean this_present_microseconds = true;
boolean that_present_microseconds = true;
if (this_present_microseconds || that_present_microseconds) {
if (!(this_present_microseconds && that_present_microseconds))
return false;
if (this.microseconds != that.microseconds)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(badSleep_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
badSleep_args typedOther = (badSleep_args)other;
lastComparison = Boolean.valueOf(isSetMicroseconds()).compareTo(typedOther.isSetMicroseconds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMicroseconds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.microseconds, typedOther.microseconds);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("badSleep_args(");
boolean first = true;
sb.append("microseconds:");
sb.append(this.microseconds);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class badSleep_argsStandardSchemeFactory implements SchemeFactory {
public badSleep_argsStandardScheme getScheme() {
return new badSleep_argsStandardScheme();
}
}
private static class badSleep_argsStandardScheme extends StandardScheme<badSleep_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, badSleep_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // MICROSECONDS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.microseconds = iprot.readI64();
struct.setMicrosecondsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, badSleep_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(MICROSECONDS_FIELD_DESC);
oprot.writeI64(struct.microseconds);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class badSleep_argsTupleSchemeFactory implements SchemeFactory {
public badSleep_argsTupleScheme getScheme() {
return new badSleep_argsTupleScheme();
}
}
private static class badSleep_argsTupleScheme extends TupleScheme<badSleep_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, badSleep_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetMicroseconds()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetMicroseconds()) {
oprot.writeI64(struct.microseconds);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, badSleep_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.microseconds = iprot.readI64();
struct.setMicrosecondsIsSet(true);
}
}
}
}
public static class badSleep_result implements org.apache.thrift.TBase<badSleep_result, badSleep_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("badSleep_result");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new badSleep_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new badSleep_resultTupleSchemeFactory());
}
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(badSleep_result.class, metaDataMap);
}
public badSleep_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public badSleep_result(badSleep_result other) {
}
public badSleep_result deepCopy() {
return new badSleep_result(this);
}
@Override
public void clear() {
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof badSleep_result)
return this.equals((badSleep_result)that);
return false;
}
public boolean equals(badSleep_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(badSleep_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
badSleep_result typedOther = (badSleep_result)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("badSleep_result(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class badSleep_resultStandardSchemeFactory implements SchemeFactory {
public badSleep_resultStandardScheme getScheme() {
return new badSleep_resultStandardScheme();
}
}
private static class badSleep_resultStandardScheme extends StandardScheme<badSleep_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, badSleep_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, badSleep_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class badSleep_resultTupleSchemeFactory implements SchemeFactory {
public badSleep_resultTupleScheme getScheme() {
return new badSleep_resultTupleScheme();
}
}
private static class badSleep_resultTupleScheme extends TupleScheme<badSleep_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, badSleep_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, badSleep_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class badBurn_args implements org.apache.thrift.TBase<badBurn_args, badBurn_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("badBurn_args");
private static final org.apache.thrift.protocol.TField MICROSECONDS_FIELD_DESC = new org.apache.thrift.protocol.TField("microseconds", org.apache.thrift.protocol.TType.I64, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new badBurn_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new badBurn_argsTupleSchemeFactory());
}
public long microseconds; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MICROSECONDS((short)1, "microseconds");
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: // MICROSECONDS
return MICROSECONDS;
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 __MICROSECONDS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MICROSECONDS, new org.apache.thrift.meta_data.FieldMetaData("microseconds", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(badBurn_args.class, metaDataMap);
}
public badBurn_args() {
}
public badBurn_args(
long microseconds)
{
this();
this.microseconds = microseconds;
setMicrosecondsIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public badBurn_args(badBurn_args other) {
__isset_bitfield = other.__isset_bitfield;
this.microseconds = other.microseconds;
}
public badBurn_args deepCopy() {
return new badBurn_args(this);
}
@Override
public void clear() {
setMicrosecondsIsSet(false);
this.microseconds = 0;
}
public long getMicroseconds() {
return this.microseconds;
}
public badBurn_args setMicroseconds(long microseconds) {
this.microseconds = microseconds;
setMicrosecondsIsSet(true);
return this;
}
public void unsetMicroseconds() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MICROSECONDS_ISSET_ID);
}
/** Returns true if field microseconds is set (has been assigned a value) and false otherwise */
public boolean isSetMicroseconds() {
return EncodingUtils.testBit(__isset_bitfield, __MICROSECONDS_ISSET_ID);
}
public void setMicrosecondsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MICROSECONDS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case MICROSECONDS:
if (value == null) {
unsetMicroseconds();
} else {
setMicroseconds((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case MICROSECONDS:
return Long.valueOf(getMicroseconds());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case MICROSECONDS:
return isSetMicroseconds();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof badBurn_args)
return this.equals((badBurn_args)that);
return false;
}
public boolean equals(badBurn_args that) {
if (that == null)
return false;
boolean this_present_microseconds = true;
boolean that_present_microseconds = true;
if (this_present_microseconds || that_present_microseconds) {
if (!(this_present_microseconds && that_present_microseconds))
return false;
if (this.microseconds != that.microseconds)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(badBurn_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
badBurn_args typedOther = (badBurn_args)other;
lastComparison = Boolean.valueOf(isSetMicroseconds()).compareTo(typedOther.isSetMicroseconds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMicroseconds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.microseconds, typedOther.microseconds);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("badBurn_args(");
boolean first = true;
sb.append("microseconds:");
sb.append(this.microseconds);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class badBurn_argsStandardSchemeFactory implements SchemeFactory {
public badBurn_argsStandardScheme getScheme() {
return new badBurn_argsStandardScheme();
}
}
private static class badBurn_argsStandardScheme extends StandardScheme<badBurn_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, badBurn_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // MICROSECONDS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.microseconds = iprot.readI64();
struct.setMicrosecondsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, badBurn_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(MICROSECONDS_FIELD_DESC);
oprot.writeI64(struct.microseconds);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class badBurn_argsTupleSchemeFactory implements SchemeFactory {
public badBurn_argsTupleScheme getScheme() {
return new badBurn_argsTupleScheme();
}
}
private static class badBurn_argsTupleScheme extends TupleScheme<badBurn_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, badBurn_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetMicroseconds()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetMicroseconds()) {
oprot.writeI64(struct.microseconds);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, badBurn_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.microseconds = iprot.readI64();
struct.setMicrosecondsIsSet(true);
}
}
}
}
public static class badBurn_result implements org.apache.thrift.TBase<badBurn_result, badBurn_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("badBurn_result");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new badBurn_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new badBurn_resultTupleSchemeFactory());
}
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(badBurn_result.class, metaDataMap);
}
public badBurn_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public badBurn_result(badBurn_result other) {
}
public badBurn_result deepCopy() {
return new badBurn_result(this);
}
@Override
public void clear() {
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof badBurn_result)
return this.equals((badBurn_result)that);
return false;
}
public boolean equals(badBurn_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(badBurn_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
badBurn_result typedOther = (badBurn_result)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("badBurn_result(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class badBurn_resultStandardSchemeFactory implements SchemeFactory {
public badBurn_resultStandardScheme getScheme() {
return new badBurn_resultStandardScheme();
}
}
private static class badBurn_resultStandardScheme extends StandardScheme<badBurn_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, badBurn_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, badBurn_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class badBurn_resultTupleSchemeFactory implements SchemeFactory {
public badBurn_resultTupleScheme getScheme() {
return new badBurn_resultTupleScheme();
}
}
private static class badBurn_resultTupleScheme extends TupleScheme<badBurn_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, badBurn_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, badBurn_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class throwError_args implements org.apache.thrift.TBase<throwError_args, throwError_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("throwError_args");
private static final org.apache.thrift.protocol.TField CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("code", org.apache.thrift.protocol.TType.I32, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new throwError_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new throwError_argsTupleSchemeFactory());
}
public int code; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
CODE((short)1, "code");
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: // CODE
return CODE;
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 __CODE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CODE, new org.apache.thrift.meta_data.FieldMetaData("code", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(throwError_args.class, metaDataMap);
}
public throwError_args() {
}
public throwError_args(
int code)
{
this();
this.code = code;
setCodeIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public throwError_args(throwError_args other) {
__isset_bitfield = other.__isset_bitfield;
this.code = other.code;
}
public throwError_args deepCopy() {
return new throwError_args(this);
}
@Override
public void clear() {
setCodeIsSet(false);
this.code = 0;
}
public int getCode() {
return this.code;
}
public throwError_args setCode(int code) {
this.code = code;
setCodeIsSet(true);
return this;
}
public void unsetCode() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CODE_ISSET_ID);
}
/** Returns true if field code is set (has been assigned a value) and false otherwise */
public boolean isSetCode() {
return EncodingUtils.testBit(__isset_bitfield, __CODE_ISSET_ID);
}
public void setCodeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CODE_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case CODE:
if (value == null) {
unsetCode();
} else {
setCode((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case CODE:
return Integer.valueOf(getCode());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case CODE:
return isSetCode();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof throwError_args)
return this.equals((throwError_args)that);
return false;
}
public boolean equals(throwError_args that) {
if (that == null)
return false;
boolean this_present_code = true;
boolean that_present_code = true;
if (this_present_code || that_present_code) {
if (!(this_present_code && that_present_code))
return false;
if (this.code != that.code)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(throwError_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
throwError_args typedOther = (throwError_args)other;
lastComparison = Boolean.valueOf(isSetCode()).compareTo(typedOther.isSetCode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCode()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.code, typedOther.code);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("throwError_args(");
boolean first = true;
sb.append("code:");
sb.append(this.code);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class throwError_argsStandardSchemeFactory implements SchemeFactory {
public throwError_argsStandardScheme getScheme() {
return new throwError_argsStandardScheme();
}
}
private static class throwError_argsStandardScheme extends StandardScheme<throwError_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, throwError_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // CODE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.code = iprot.readI32();
struct.setCodeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, throwError_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(CODE_FIELD_DESC);
oprot.writeI32(struct.code);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class throwError_argsTupleSchemeFactory implements SchemeFactory {
public throwError_argsTupleScheme getScheme() {
return new throwError_argsTupleScheme();
}
}
private static class throwError_argsTupleScheme extends TupleScheme<throwError_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, throwError_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetCode()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetCode()) {
oprot.writeI32(struct.code);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, throwError_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.code = iprot.readI32();
struct.setCodeIsSet(true);
}
}
}
}
public static class throwError_result implements org.apache.thrift.TBase<throwError_result, throwError_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("throwError_result");
private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new throwError_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new throwError_resultTupleSchemeFactory());
}
public LoadError error; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
ERROR((short)1, "error");
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: // ERROR
return ERROR;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(throwError_result.class, metaDataMap);
}
public throwError_result() {
}
public throwError_result(
LoadError error)
{
this();
this.error = error;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public throwError_result(throwError_result other) {
if (other.isSetError()) {
this.error = new LoadError(other.error);
}
}
public throwError_result deepCopy() {
return new throwError_result(this);
}
@Override
public void clear() {
this.error = null;
}
public LoadError getError() {
return this.error;
}
public throwError_result setError(LoadError error) {
this.error = error;
return this;
}
public void unsetError() {
this.error = null;
}
/** Returns true if field error is set (has been assigned a value) and false otherwise */
public boolean isSetError() {
return this.error != null;
}
public void setErrorIsSet(boolean value) {
if (!value) {
this.error = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ERROR:
if (value == null) {
unsetError();
} else {
setError((LoadError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case ERROR:
return getError();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case ERROR:
return isSetError();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof throwError_result)
return this.equals((throwError_result)that);
return false;
}
public boolean equals(throwError_result that) {
if (that == null)
return false;
boolean this_present_error = true && this.isSetError();
boolean that_present_error = true && that.isSetError();
if (this_present_error || that_present_error) {
if (!(this_present_error && that_present_error))
return false;
if (!this.error.equals(that.error))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(throwError_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
throwError_result typedOther = (throwError_result)other;
lastComparison = Boolean.valueOf(isSetError()).compareTo(typedOther.isSetError());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetError()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, typedOther.error);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("throwError_result(");
boolean first = true;
sb.append("error:");
if (this.error == null) {
sb.append("null");
} else {
sb.append(this.error);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class throwError_resultStandardSchemeFactory implements SchemeFactory {
public throwError_resultStandardScheme getScheme() {
return new throwError_resultStandardScheme();
}
}
private static class throwError_resultStandardScheme extends StandardScheme<throwError_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, throwError_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // ERROR
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.error = new LoadError();
struct.error.read(iprot);
struct.setErrorIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, throwError_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.error != null) {
oprot.writeFieldBegin(ERROR_FIELD_DESC);
struct.error.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class throwError_resultTupleSchemeFactory implements SchemeFactory {
public throwError_resultTupleScheme getScheme() {
return new throwError_resultTupleScheme();
}
}
private static class throwError_resultTupleScheme extends TupleScheme<throwError_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, throwError_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetError()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetError()) {
struct.error.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, throwError_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.error = new LoadError();
struct.error.read(iprot);
struct.setErrorIsSet(true);
}
}
}
}
public static class throwUnexpected_args implements org.apache.thrift.TBase<throwUnexpected_args, throwUnexpected_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("throwUnexpected_args");
private static final org.apache.thrift.protocol.TField CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("code", org.apache.thrift.protocol.TType.I32, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new throwUnexpected_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new throwUnexpected_argsTupleSchemeFactory());
}
public int code; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
CODE((short)1, "code");
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: // CODE
return CODE;
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 __CODE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CODE, new org.apache.thrift.meta_data.FieldMetaData("code", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(throwUnexpected_args.class, metaDataMap);
}
public throwUnexpected_args() {
}
public throwUnexpected_args(
int code)
{
this();
this.code = code;
setCodeIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public throwUnexpected_args(throwUnexpected_args other) {
__isset_bitfield = other.__isset_bitfield;
this.code = other.code;
}
public throwUnexpected_args deepCopy() {
return new throwUnexpected_args(this);
}
@Override
public void clear() {
setCodeIsSet(false);
this.code = 0;
}
public int getCode() {
return this.code;
}
public throwUnexpected_args setCode(int code) {
this.code = code;
setCodeIsSet(true);
return this;
}
public void unsetCode() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CODE_ISSET_ID);
}
/** Returns true if field code is set (has been assigned a value) and false otherwise */
public boolean isSetCode() {
return EncodingUtils.testBit(__isset_bitfield, __CODE_ISSET_ID);
}
public void setCodeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CODE_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case CODE:
if (value == null) {
unsetCode();
} else {
setCode((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case CODE:
return Integer.valueOf(getCode());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case CODE:
return isSetCode();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof throwUnexpected_args)
return this.equals((throwUnexpected_args)that);
return false;
}
public boolean equals(throwUnexpected_args that) {
if (that == null)
return false;
boolean this_present_code = true;
boolean that_present_code = true;
if (this_present_code || that_present_code) {
if (!(this_present_code && that_present_code))
return false;
if (this.code != that.code)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(throwUnexpected_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
throwUnexpected_args typedOther = (throwUnexpected_args)other;
lastComparison = Boolean.valueOf(isSetCode()).compareTo(typedOther.isSetCode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCode()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.code, typedOther.code);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("throwUnexpected_args(");
boolean first = true;
sb.append("code:");
sb.append(this.code);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class throwUnexpected_argsStandardSchemeFactory implements SchemeFactory {
public throwUnexpected_argsStandardScheme getScheme() {
return new throwUnexpected_argsStandardScheme();
}
}
private static class throwUnexpected_argsStandardScheme extends StandardScheme<throwUnexpected_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, throwUnexpected_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // CODE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.code = iprot.readI32();
struct.setCodeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, throwUnexpected_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(CODE_FIELD_DESC);
oprot.writeI32(struct.code);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class throwUnexpected_argsTupleSchemeFactory implements SchemeFactory {
public throwUnexpected_argsTupleScheme getScheme() {
return new throwUnexpected_argsTupleScheme();
}
}
private static class throwUnexpected_argsTupleScheme extends TupleScheme<throwUnexpected_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, throwUnexpected_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetCode()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetCode()) {
oprot.writeI32(struct.code);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, throwUnexpected_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.code = iprot.readI32();
struct.setCodeIsSet(true);
}
}
}
}
public static class throwUnexpected_result implements org.apache.thrift.TBase<throwUnexpected_result, throwUnexpected_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("throwUnexpected_result");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new throwUnexpected_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new throwUnexpected_resultTupleSchemeFactory());
}
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(throwUnexpected_result.class, metaDataMap);
}
public throwUnexpected_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public throwUnexpected_result(throwUnexpected_result other) {
}
public throwUnexpected_result deepCopy() {
return new throwUnexpected_result(this);
}
@Override
public void clear() {
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof throwUnexpected_result)
return this.equals((throwUnexpected_result)that);
return false;
}
public boolean equals(throwUnexpected_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(throwUnexpected_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
throwUnexpected_result typedOther = (throwUnexpected_result)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("throwUnexpected_result(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class throwUnexpected_resultStandardSchemeFactory implements SchemeFactory {
public throwUnexpected_resultStandardScheme getScheme() {
return new throwUnexpected_resultStandardScheme();
}
}
private static class throwUnexpected_resultStandardScheme extends StandardScheme<throwUnexpected_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, throwUnexpected_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, throwUnexpected_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class throwUnexpected_resultTupleSchemeFactory implements SchemeFactory {
public throwUnexpected_resultTupleScheme getScheme() {
return new throwUnexpected_resultTupleScheme();
}
}
private static class throwUnexpected_resultTupleScheme extends TupleScheme<throwUnexpected_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, throwUnexpected_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, throwUnexpected_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class onewayThrow_args implements org.apache.thrift.TBase<onewayThrow_args, onewayThrow_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onewayThrow_args");
private static final org.apache.thrift.protocol.TField CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("code", org.apache.thrift.protocol.TType.I32, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new onewayThrow_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new onewayThrow_argsTupleSchemeFactory());
}
public int code; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
CODE((short)1, "code");
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: // CODE
return CODE;
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 __CODE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CODE, new org.apache.thrift.meta_data.FieldMetaData("code", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onewayThrow_args.class, metaDataMap);
}
public onewayThrow_args() {
}
public onewayThrow_args(
int code)
{
this();
this.code = code;
setCodeIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public onewayThrow_args(onewayThrow_args other) {
__isset_bitfield = other.__isset_bitfield;
this.code = other.code;
}
public onewayThrow_args deepCopy() {
return new onewayThrow_args(this);
}
@Override
public void clear() {
setCodeIsSet(false);
this.code = 0;
}
public int getCode() {
return this.code;
}
public onewayThrow_args setCode(int code) {
this.code = code;
setCodeIsSet(true);
return this;
}
public void unsetCode() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CODE_ISSET_ID);
}
/** Returns true if field code is set (has been assigned a value) and false otherwise */
public boolean isSetCode() {
return EncodingUtils.testBit(__isset_bitfield, __CODE_ISSET_ID);
}
public void setCodeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CODE_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case CODE:
if (value == null) {
unsetCode();
} else {
setCode((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case CODE:
return Integer.valueOf(getCode());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case CODE:
return isSetCode();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof onewayThrow_args)
return this.equals((onewayThrow_args)that);
return false;
}
public boolean equals(onewayThrow_args that) {
if (that == null)
return false;
boolean this_present_code = true;
boolean that_present_code = true;
if (this_present_code || that_present_code) {
if (!(this_present_code && that_present_code))
return false;
if (this.code != that.code)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(onewayThrow_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
onewayThrow_args typedOther = (onewayThrow_args)other;
lastComparison = Boolean.valueOf(isSetCode()).compareTo(typedOther.isSetCode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCode()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.code, typedOther.code);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("onewayThrow_args(");
boolean first = true;
sb.append("code:");
sb.append(this.code);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class onewayThrow_argsStandardSchemeFactory implements SchemeFactory {
public onewayThrow_argsStandardScheme getScheme() {
return new onewayThrow_argsStandardScheme();
}
}
private static class onewayThrow_argsStandardScheme extends StandardScheme<onewayThrow_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, onewayThrow_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // CODE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.code = iprot.readI32();
struct.setCodeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, onewayThrow_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(CODE_FIELD_DESC);
oprot.writeI32(struct.code);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class onewayThrow_argsTupleSchemeFactory implements SchemeFactory {
public onewayThrow_argsTupleScheme getScheme() {
return new onewayThrow_argsTupleScheme();
}
}
private static class onewayThrow_argsTupleScheme extends TupleScheme<onewayThrow_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, onewayThrow_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetCode()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetCode()) {
oprot.writeI32(struct.code);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, onewayThrow_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.code = iprot.readI32();
struct.setCodeIsSet(true);
}
}
}
}
public static class send_args implements org.apache.thrift.TBase<send_args, send_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("send_args");
private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new send_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new send_argsTupleSchemeFactory());
}
public ByteBuffer data; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
DATA((short)1, "data");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // DATA
return DATA;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(send_args.class, metaDataMap);
}
public send_args() {
}
public send_args(
ByteBuffer data)
{
this();
this.data = data;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public send_args(send_args other) {
if (other.isSetData()) {
this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data);
;
}
}
public send_args deepCopy() {
return new send_args(this);
}
@Override
public void clear() {
this.data = null;
}
public byte[] getData() {
setData(org.apache.thrift.TBaseHelper.rightSize(data));
return data == null ? null : data.array();
}
public ByteBuffer bufferForData() {
return data;
}
public send_args setData(byte[] data) {
setData(data == null ? (ByteBuffer)null : ByteBuffer.wrap(data));
return this;
}
public send_args setData(ByteBuffer data) {
this.data = data;
return this;
}
public void unsetData() {
this.data = null;
}
/** Returns true if field data is set (has been assigned a value) and false otherwise */
public boolean isSetData() {
return this.data != null;
}
public void setDataIsSet(boolean value) {
if (!value) {
this.data = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case DATA:
if (value == null) {
unsetData();
} else {
setData((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case DATA:
return getData();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case DATA:
return isSetData();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof send_args)
return this.equals((send_args)that);
return false;
}
public boolean equals(send_args that) {
if (that == null)
return false;
boolean this_present_data = true && this.isSetData();
boolean that_present_data = true && that.isSetData();
if (this_present_data || that_present_data) {
if (!(this_present_data && that_present_data))
return false;
if (!this.data.equals(that.data))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(send_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
send_args typedOther = (send_args)other;
lastComparison = Boolean.valueOf(isSetData()).compareTo(typedOther.isSetData());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetData()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, typedOther.data);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("send_args(");
boolean first = true;
sb.append("data:");
if (this.data == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.data, sb);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class send_argsStandardSchemeFactory implements SchemeFactory {
public send_argsStandardScheme getScheme() {
return new send_argsStandardScheme();
}
}
private static class send_argsStandardScheme extends StandardScheme<send_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, send_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // DATA
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.data = iprot.readBinary();
struct.setDataIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, send_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.data != null) {
oprot.writeFieldBegin(DATA_FIELD_DESC);
oprot.writeBinary(struct.data);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class send_argsTupleSchemeFactory implements SchemeFactory {
public send_argsTupleScheme getScheme() {
return new send_argsTupleScheme();
}
}
private static class send_argsTupleScheme extends TupleScheme<send_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, send_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetData()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetData()) {
oprot.writeBinary(struct.data);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, send_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.data = iprot.readBinary();
struct.setDataIsSet(true);
}
}
}
}
public static class send_result implements org.apache.thrift.TBase<send_result, send_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("send_result");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new send_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new send_resultTupleSchemeFactory());
}
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(send_result.class, metaDataMap);
}
public send_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public send_result(send_result other) {
}
public send_result deepCopy() {
return new send_result(this);
}
@Override
public void clear() {
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof send_result)
return this.equals((send_result)that);
return false;
}
public boolean equals(send_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(send_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
send_result typedOther = (send_result)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("send_result(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class send_resultStandardSchemeFactory implements SchemeFactory {
public send_resultStandardScheme getScheme() {
return new send_resultStandardScheme();
}
}
private static class send_resultStandardScheme extends StandardScheme<send_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, send_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, send_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class send_resultTupleSchemeFactory implements SchemeFactory {
public send_resultTupleScheme getScheme() {
return new send_resultTupleScheme();
}
}
private static class send_resultTupleScheme extends TupleScheme<send_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, send_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, send_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class onewaySend_args implements org.apache.thrift.TBase<onewaySend_args, onewaySend_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onewaySend_args");
private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new onewaySend_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new onewaySend_argsTupleSchemeFactory());
}
public ByteBuffer data; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
DATA((short)1, "data");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // DATA
return DATA;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onewaySend_args.class, metaDataMap);
}
public onewaySend_args() {
}
public onewaySend_args(
ByteBuffer data)
{
this();
this.data = data;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public onewaySend_args(onewaySend_args other) {
if (other.isSetData()) {
this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data);
;
}
}
public onewaySend_args deepCopy() {
return new onewaySend_args(this);
}
@Override
public void clear() {
this.data = null;
}
public byte[] getData() {
setData(org.apache.thrift.TBaseHelper.rightSize(data));
return data == null ? null : data.array();
}
public ByteBuffer bufferForData() {
return data;
}
public onewaySend_args setData(byte[] data) {
setData(data == null ? (ByteBuffer)null : ByteBuffer.wrap(data));
return this;
}
public onewaySend_args setData(ByteBuffer data) {
this.data = data;
return this;
}
public void unsetData() {
this.data = null;
}
/** Returns true if field data is set (has been assigned a value) and false otherwise */
public boolean isSetData() {
return this.data != null;
}
public void setDataIsSet(boolean value) {
if (!value) {
this.data = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case DATA:
if (value == null) {
unsetData();
} else {
setData((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case DATA:
return getData();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case DATA:
return isSetData();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof onewaySend_args)
return this.equals((onewaySend_args)that);
return false;
}
public boolean equals(onewaySend_args that) {
if (that == null)
return false;
boolean this_present_data = true && this.isSetData();
boolean that_present_data = true && that.isSetData();
if (this_present_data || that_present_data) {
if (!(this_present_data && that_present_data))
return false;
if (!this.data.equals(that.data))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(onewaySend_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
onewaySend_args typedOther = (onewaySend_args)other;
lastComparison = Boolean.valueOf(isSetData()).compareTo(typedOther.isSetData());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetData()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, typedOther.data);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("onewaySend_args(");
boolean first = true;
sb.append("data:");
if (this.data == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.data, sb);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class onewaySend_argsStandardSchemeFactory implements SchemeFactory {
public onewaySend_argsStandardScheme getScheme() {
return new onewaySend_argsStandardScheme();
}
}
private static class onewaySend_argsStandardScheme extends StandardScheme<onewaySend_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, onewaySend_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // DATA
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.data = iprot.readBinary();
struct.setDataIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, onewaySend_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.data != null) {
oprot.writeFieldBegin(DATA_FIELD_DESC);
oprot.writeBinary(struct.data);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class onewaySend_argsTupleSchemeFactory implements SchemeFactory {
public onewaySend_argsTupleScheme getScheme() {
return new onewaySend_argsTupleScheme();
}
}
private static class onewaySend_argsTupleScheme extends TupleScheme<onewaySend_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, onewaySend_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetData()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetData()) {
oprot.writeBinary(struct.data);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, onewaySend_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.data = iprot.readBinary();
struct.setDataIsSet(true);
}
}
}
}
public static class recv_args implements org.apache.thrift.TBase<recv_args, recv_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("recv_args");
private static final org.apache.thrift.protocol.TField BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("bytes", org.apache.thrift.protocol.TType.I64, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new recv_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new recv_argsTupleSchemeFactory());
}
public long bytes; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
BYTES((short)1, "bytes");
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: // BYTES
return BYTES;
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 __BYTES_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.BYTES, new org.apache.thrift.meta_data.FieldMetaData("bytes", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(recv_args.class, metaDataMap);
}
public recv_args() {
}
public recv_args(
long bytes)
{
this();
this.bytes = bytes;
setBytesIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public recv_args(recv_args other) {
__isset_bitfield = other.__isset_bitfield;
this.bytes = other.bytes;
}
public recv_args deepCopy() {
return new recv_args(this);
}
@Override
public void clear() {
setBytesIsSet(false);
this.bytes = 0;
}
public long getBytes() {
return this.bytes;
}
public recv_args setBytes(long bytes) {
this.bytes = bytes;
setBytesIsSet(true);
return this;
}
public void unsetBytes() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BYTES_ISSET_ID);
}
/** Returns true if field bytes is set (has been assigned a value) and false otherwise */
public boolean isSetBytes() {
return EncodingUtils.testBit(__isset_bitfield, __BYTES_ISSET_ID);
}
public void setBytesIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BYTES_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case BYTES:
if (value == null) {
unsetBytes();
} else {
setBytes((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case BYTES:
return Long.valueOf(getBytes());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case BYTES:
return isSetBytes();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof recv_args)
return this.equals((recv_args)that);
return false;
}
public boolean equals(recv_args that) {
if (that == null)
return false;
boolean this_present_bytes = true;
boolean that_present_bytes = true;
if (this_present_bytes || that_present_bytes) {
if (!(this_present_bytes && that_present_bytes))
return false;
if (this.bytes != that.bytes)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(recv_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
recv_args typedOther = (recv_args)other;
lastComparison = Boolean.valueOf(isSetBytes()).compareTo(typedOther.isSetBytes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBytes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bytes, typedOther.bytes);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("recv_args(");
boolean first = true;
sb.append("bytes:");
sb.append(this.bytes);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class recv_argsStandardSchemeFactory implements SchemeFactory {
public recv_argsStandardScheme getScheme() {
return new recv_argsStandardScheme();
}
}
private static class recv_argsStandardScheme extends StandardScheme<recv_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, recv_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // BYTES
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.bytes = iprot.readI64();
struct.setBytesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, recv_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(BYTES_FIELD_DESC);
oprot.writeI64(struct.bytes);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class recv_argsTupleSchemeFactory implements SchemeFactory {
public recv_argsTupleScheme getScheme() {
return new recv_argsTupleScheme();
}
}
private static class recv_argsTupleScheme extends TupleScheme<recv_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, recv_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetBytes()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetBytes()) {
oprot.writeI64(struct.bytes);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, recv_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.bytes = iprot.readI64();
struct.setBytesIsSet(true);
}
}
}
}
public static class recv_result implements org.apache.thrift.TBase<recv_result, recv_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("recv_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new recv_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new recv_resultTupleSchemeFactory());
}
public ByteBuffer success; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(recv_result.class, metaDataMap);
}
public recv_result() {
}
public recv_result(
ByteBuffer success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public recv_result(recv_result other) {
if (other.isSetSuccess()) {
this.success = org.apache.thrift.TBaseHelper.copyBinary(other.success);
;
}
}
public recv_result deepCopy() {
return new recv_result(this);
}
@Override
public void clear() {
this.success = null;
}
public byte[] getSuccess() {
setSuccess(org.apache.thrift.TBaseHelper.rightSize(success));
return success == null ? null : success.array();
}
public ByteBuffer bufferForSuccess() {
return success;
}
public recv_result setSuccess(byte[] success) {
setSuccess(success == null ? (ByteBuffer)null : ByteBuffer.wrap(success));
return this;
}
public recv_result setSuccess(ByteBuffer success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof recv_result)
return this.equals((recv_result)that);
return false;
}
public boolean equals(recv_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(recv_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
recv_result typedOther = (recv_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("recv_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.success, sb);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class recv_resultStandardSchemeFactory implements SchemeFactory {
public recv_resultStandardScheme getScheme() {
return new recv_resultStandardScheme();
}
}
private static class recv_resultStandardScheme extends StandardScheme<recv_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, recv_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.success = iprot.readBinary();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, recv_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBinary(struct.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class recv_resultTupleSchemeFactory implements SchemeFactory {
public recv_resultTupleScheme getScheme() {
return new recv_resultTupleScheme();
}
}
private static class recv_resultTupleScheme extends TupleScheme<recv_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, recv_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
oprot.writeBinary(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, recv_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readBinary();
struct.setSuccessIsSet(true);
}
}
}
}
public static class sendrecv_args implements org.apache.thrift.TBase<sendrecv_args, sendrecv_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sendrecv_args");
private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField RECV_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("recvBytes", org.apache.thrift.protocol.TType.I64, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new sendrecv_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new sendrecv_argsTupleSchemeFactory());
}
public ByteBuffer data; // required
public long recvBytes; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
DATA((short)1, "data"),
RECV_BYTES((short)2, "recvBytes");
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: // DATA
return DATA;
case 2: // RECV_BYTES
return RECV_BYTES;
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 __RECVBYTES_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.RECV_BYTES, new org.apache.thrift.meta_data.FieldMetaData("recvBytes", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendrecv_args.class, metaDataMap);
}
public sendrecv_args() {
}
public sendrecv_args(
ByteBuffer data,
long recvBytes)
{
this();
this.data = data;
this.recvBytes = recvBytes;
setRecvBytesIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public sendrecv_args(sendrecv_args other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetData()) {
this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data);
;
}
this.recvBytes = other.recvBytes;
}
public sendrecv_args deepCopy() {
return new sendrecv_args(this);
}
@Override
public void clear() {
this.data = null;
setRecvBytesIsSet(false);
this.recvBytes = 0;
}
public byte[] getData() {
setData(org.apache.thrift.TBaseHelper.rightSize(data));
return data == null ? null : data.array();
}
public ByteBuffer bufferForData() {
return data;
}
public sendrecv_args setData(byte[] data) {
setData(data == null ? (ByteBuffer)null : ByteBuffer.wrap(data));
return this;
}
public sendrecv_args setData(ByteBuffer data) {
this.data = data;
return this;
}
public void unsetData() {
this.data = null;
}
/** Returns true if field data is set (has been assigned a value) and false otherwise */
public boolean isSetData() {
return this.data != null;
}
public void setDataIsSet(boolean value) {
if (!value) {
this.data = null;
}
}
public long getRecvBytes() {
return this.recvBytes;
}
public sendrecv_args setRecvBytes(long recvBytes) {
this.recvBytes = recvBytes;
setRecvBytesIsSet(true);
return this;
}
public void unsetRecvBytes() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECVBYTES_ISSET_ID);
}
/** Returns true if field recvBytes is set (has been assigned a value) and false otherwise */
public boolean isSetRecvBytes() {
return EncodingUtils.testBit(__isset_bitfield, __RECVBYTES_ISSET_ID);
}
public void setRecvBytesIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECVBYTES_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case DATA:
if (value == null) {
unsetData();
} else {
setData((ByteBuffer)value);
}
break;
case RECV_BYTES:
if (value == null) {
unsetRecvBytes();
} else {
setRecvBytes((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case DATA:
return getData();
case RECV_BYTES:
return Long.valueOf(getRecvBytes());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case DATA:
return isSetData();
case RECV_BYTES:
return isSetRecvBytes();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sendrecv_args)
return this.equals((sendrecv_args)that);
return false;
}
public boolean equals(sendrecv_args that) {
if (that == null)
return false;
boolean this_present_data = true && this.isSetData();
boolean that_present_data = true && that.isSetData();
if (this_present_data || that_present_data) {
if (!(this_present_data && that_present_data))
return false;
if (!this.data.equals(that.data))
return false;
}
boolean this_present_recvBytes = true;
boolean that_present_recvBytes = true;
if (this_present_recvBytes || that_present_recvBytes) {
if (!(this_present_recvBytes && that_present_recvBytes))
return false;
if (this.recvBytes != that.recvBytes)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(sendrecv_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
sendrecv_args typedOther = (sendrecv_args)other;
lastComparison = Boolean.valueOf(isSetData()).compareTo(typedOther.isSetData());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetData()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, typedOther.data);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRecvBytes()).compareTo(typedOther.isSetRecvBytes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRecvBytes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.recvBytes, typedOther.recvBytes);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("sendrecv_args(");
boolean first = true;
sb.append("data:");
if (this.data == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.data, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("recvBytes:");
sb.append(this.recvBytes);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class sendrecv_argsStandardSchemeFactory implements SchemeFactory {
public sendrecv_argsStandardScheme getScheme() {
return new sendrecv_argsStandardScheme();
}
}
private static class sendrecv_argsStandardScheme extends StandardScheme<sendrecv_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, sendrecv_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // DATA
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.data = iprot.readBinary();
struct.setDataIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // RECV_BYTES
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.recvBytes = iprot.readI64();
struct.setRecvBytesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, sendrecv_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.data != null) {
oprot.writeFieldBegin(DATA_FIELD_DESC);
oprot.writeBinary(struct.data);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(RECV_BYTES_FIELD_DESC);
oprot.writeI64(struct.recvBytes);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class sendrecv_argsTupleSchemeFactory implements SchemeFactory {
public sendrecv_argsTupleScheme getScheme() {
return new sendrecv_argsTupleScheme();
}
}
private static class sendrecv_argsTupleScheme extends TupleScheme<sendrecv_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, sendrecv_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetData()) {
optionals.set(0);
}
if (struct.isSetRecvBytes()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetData()) {
oprot.writeBinary(struct.data);
}
if (struct.isSetRecvBytes()) {
oprot.writeI64(struct.recvBytes);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, sendrecv_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.data = iprot.readBinary();
struct.setDataIsSet(true);
}
if (incoming.get(1)) {
struct.recvBytes = iprot.readI64();
struct.setRecvBytesIsSet(true);
}
}
}
}
public static class sendrecv_result implements org.apache.thrift.TBase<sendrecv_result, sendrecv_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sendrecv_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new sendrecv_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new sendrecv_resultTupleSchemeFactory());
}
public ByteBuffer success; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendrecv_result.class, metaDataMap);
}
public sendrecv_result() {
}
public sendrecv_result(
ByteBuffer success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public sendrecv_result(sendrecv_result other) {
if (other.isSetSuccess()) {
this.success = org.apache.thrift.TBaseHelper.copyBinary(other.success);
;
}
}
public sendrecv_result deepCopy() {
return new sendrecv_result(this);
}
@Override
public void clear() {
this.success = null;
}
public byte[] getSuccess() {
setSuccess(org.apache.thrift.TBaseHelper.rightSize(success));
return success == null ? null : success.array();
}
public ByteBuffer bufferForSuccess() {
return success;
}
public sendrecv_result setSuccess(byte[] success) {
setSuccess(success == null ? (ByteBuffer)null : ByteBuffer.wrap(success));
return this;
}
public sendrecv_result setSuccess(ByteBuffer success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sendrecv_result)
return this.equals((sendrecv_result)that);
return false;
}
public boolean equals(sendrecv_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(sendrecv_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
sendrecv_result typedOther = (sendrecv_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("sendrecv_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.success, sb);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class sendrecv_resultStandardSchemeFactory implements SchemeFactory {
public sendrecv_resultStandardScheme getScheme() {
return new sendrecv_resultStandardScheme();
}
}
private static class sendrecv_resultStandardScheme extends StandardScheme<sendrecv_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, sendrecv_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.success = iprot.readBinary();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, sendrecv_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBinary(struct.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class sendrecv_resultTupleSchemeFactory implements SchemeFactory {
public sendrecv_resultTupleScheme getScheme() {
return new sendrecv_resultTupleScheme();
}
}
private static class sendrecv_resultTupleScheme extends TupleScheme<sendrecv_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, sendrecv_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
oprot.writeBinary(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, sendrecv_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readBinary();
struct.setSuccessIsSet(true);
}
}
}
}
public static class echo_args implements org.apache.thrift.TBase<echo_args, echo_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("echo_args");
private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new echo_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new echo_argsTupleSchemeFactory());
}
public ByteBuffer data; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
DATA((short)1, "data");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // DATA
return DATA;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(echo_args.class, metaDataMap);
}
public echo_args() {
}
public echo_args(
ByteBuffer data)
{
this();
this.data = data;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public echo_args(echo_args other) {
if (other.isSetData()) {
this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data);
;
}
}
public echo_args deepCopy() {
return new echo_args(this);
}
@Override
public void clear() {
this.data = null;
}
public byte[] getData() {
setData(org.apache.thrift.TBaseHelper.rightSize(data));
return data == null ? null : data.array();
}
public ByteBuffer bufferForData() {
return data;
}
public echo_args setData(byte[] data) {
setData(data == null ? (ByteBuffer)null : ByteBuffer.wrap(data));
return this;
}
public echo_args setData(ByteBuffer data) {
this.data = data;
return this;
}
public void unsetData() {
this.data = null;
}
/** Returns true if field data is set (has been assigned a value) and false otherwise */
public boolean isSetData() {
return this.data != null;
}
public void setDataIsSet(boolean value) {
if (!value) {
this.data = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case DATA:
if (value == null) {
unsetData();
} else {
setData((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case DATA:
return getData();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case DATA:
return isSetData();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof echo_args)
return this.equals((echo_args)that);
return false;
}
public boolean equals(echo_args that) {
if (that == null)
return false;
boolean this_present_data = true && this.isSetData();
boolean that_present_data = true && that.isSetData();
if (this_present_data || that_present_data) {
if (!(this_present_data && that_present_data))
return false;
if (!this.data.equals(that.data))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(echo_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
echo_args typedOther = (echo_args)other;
lastComparison = Boolean.valueOf(isSetData()).compareTo(typedOther.isSetData());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetData()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, typedOther.data);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("echo_args(");
boolean first = true;
sb.append("data:");
if (this.data == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.data, sb);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class echo_argsStandardSchemeFactory implements SchemeFactory {
public echo_argsStandardScheme getScheme() {
return new echo_argsStandardScheme();
}
}
private static class echo_argsStandardScheme extends StandardScheme<echo_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, echo_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // DATA
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.data = iprot.readBinary();
struct.setDataIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, echo_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.data != null) {
oprot.writeFieldBegin(DATA_FIELD_DESC);
oprot.writeBinary(struct.data);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class echo_argsTupleSchemeFactory implements SchemeFactory {
public echo_argsTupleScheme getScheme() {
return new echo_argsTupleScheme();
}
}
private static class echo_argsTupleScheme extends TupleScheme<echo_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, echo_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetData()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetData()) {
oprot.writeBinary(struct.data);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, echo_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.data = iprot.readBinary();
struct.setDataIsSet(true);
}
}
}
}
public static class echo_result implements org.apache.thrift.TBase<echo_result, echo_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("echo_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new echo_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new echo_resultTupleSchemeFactory());
}
public ByteBuffer success; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(echo_result.class, metaDataMap);
}
public echo_result() {
}
public echo_result(
ByteBuffer success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public echo_result(echo_result other) {
if (other.isSetSuccess()) {
this.success = org.apache.thrift.TBaseHelper.copyBinary(other.success);
;
}
}
public echo_result deepCopy() {
return new echo_result(this);
}
@Override
public void clear() {
this.success = null;
}
public byte[] getSuccess() {
setSuccess(org.apache.thrift.TBaseHelper.rightSize(success));
return success == null ? null : success.array();
}
public ByteBuffer bufferForSuccess() {
return success;
}
public echo_result setSuccess(byte[] success) {
setSuccess(success == null ? (ByteBuffer)null : ByteBuffer.wrap(success));
return this;
}
public echo_result setSuccess(ByteBuffer success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof echo_result)
return this.equals((echo_result)that);
return false;
}
public boolean equals(echo_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(echo_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
echo_result typedOther = (echo_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("echo_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.success, sb);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class echo_resultStandardSchemeFactory implements SchemeFactory {
public echo_resultStandardScheme getScheme() {
return new echo_resultStandardScheme();
}
}
private static class echo_resultStandardScheme extends StandardScheme<echo_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, echo_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.success = iprot.readBinary();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, echo_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBinary(struct.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class echo_resultTupleSchemeFactory implements SchemeFactory {
public echo_resultTupleScheme getScheme() {
return new echo_resultTupleScheme();
}
}
private static class echo_resultTupleScheme extends TupleScheme<echo_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, echo_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
oprot.writeBinary(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, echo_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readBinary();
struct.setSuccessIsSet(true);
}
}
}
}
public static class add_args implements org.apache.thrift.TBase<add_args, add_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_args");
private static final org.apache.thrift.protocol.TField A_FIELD_DESC = new org.apache.thrift.protocol.TField("a", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField B_FIELD_DESC = new org.apache.thrift.protocol.TField("b", org.apache.thrift.protocol.TType.I64, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new add_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new add_argsTupleSchemeFactory());
}
public long a; // required
public long b; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
A((short)1, "a"),
B((short)2, "b");
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: // A
return A;
case 2: // B
return B;
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 __A_ISSET_ID = 0;
private static final int __B_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.A, new org.apache.thrift.meta_data.FieldMetaData("a", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.B, new org.apache.thrift.meta_data.FieldMetaData("b", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_args.class, metaDataMap);
}
public add_args() {
}
public add_args(
long a,
long b)
{
this();
this.a = a;
setAIsSet(true);
this.b = b;
setBIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public add_args(add_args other) {
__isset_bitfield = other.__isset_bitfield;
this.a = other.a;
this.b = other.b;
}
public add_args deepCopy() {
return new add_args(this);
}
@Override
public void clear() {
setAIsSet(false);
this.a = 0;
setBIsSet(false);
this.b = 0;
}
public long getA() {
return this.a;
}
public add_args setA(long a) {
this.a = a;
setAIsSet(true);
return this;
}
public void unsetA() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __A_ISSET_ID);
}
/** Returns true if field a is set (has been assigned a value) and false otherwise */
public boolean isSetA() {
return EncodingUtils.testBit(__isset_bitfield, __A_ISSET_ID);
}
public void setAIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __A_ISSET_ID, value);
}
public long getB() {
return this.b;
}
public add_args setB(long b) {
this.b = b;
setBIsSet(true);
return this;
}
public void unsetB() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __B_ISSET_ID);
}
/** Returns true if field b is set (has been assigned a value) and false otherwise */
public boolean isSetB() {
return EncodingUtils.testBit(__isset_bitfield, __B_ISSET_ID);
}
public void setBIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __B_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case A:
if (value == null) {
unsetA();
} else {
setA((Long)value);
}
break;
case B:
if (value == null) {
unsetB();
} else {
setB((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case A:
return Long.valueOf(getA());
case B:
return Long.valueOf(getB());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case A:
return isSetA();
case B:
return isSetB();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof add_args)
return this.equals((add_args)that);
return false;
}
public boolean equals(add_args that) {
if (that == null)
return false;
boolean this_present_a = true;
boolean that_present_a = true;
if (this_present_a || that_present_a) {
if (!(this_present_a && that_present_a))
return false;
if (this.a != that.a)
return false;
}
boolean this_present_b = true;
boolean that_present_b = true;
if (this_present_b || that_present_b) {
if (!(this_present_b && that_present_b))
return false;
if (this.b != that.b)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(add_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
add_args typedOther = (add_args)other;
lastComparison = Boolean.valueOf(isSetA()).compareTo(typedOther.isSetA());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetA()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.a, typedOther.a);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetB()).compareTo(typedOther.isSetB());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetB()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.b, typedOther.b);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("add_args(");
boolean first = true;
sb.append("a:");
sb.append(this.a);
first = false;
if (!first) sb.append(", ");
sb.append("b:");
sb.append(this.b);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class add_argsStandardSchemeFactory implements SchemeFactory {
public add_argsStandardScheme getScheme() {
return new add_argsStandardScheme();
}
}
private static class add_argsStandardScheme extends StandardScheme<add_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, add_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // A
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.a = iprot.readI64();
struct.setAIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // B
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.b = iprot.readI64();
struct.setBIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, add_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(A_FIELD_DESC);
oprot.writeI64(struct.a);
oprot.writeFieldEnd();
oprot.writeFieldBegin(B_FIELD_DESC);
oprot.writeI64(struct.b);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class add_argsTupleSchemeFactory implements SchemeFactory {
public add_argsTupleScheme getScheme() {
return new add_argsTupleScheme();
}
}
private static class add_argsTupleScheme extends TupleScheme<add_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, add_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetA()) {
optionals.set(0);
}
if (struct.isSetB()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetA()) {
oprot.writeI64(struct.a);
}
if (struct.isSetB()) {
oprot.writeI64(struct.b);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, add_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.a = iprot.readI64();
struct.setAIsSet(true);
}
if (incoming.get(1)) {
struct.b = iprot.readI64();
struct.setBIsSet(true);
}
}
}
}
public static class add_result implements org.apache.thrift.TBase<add_result, add_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new add_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new add_resultTupleSchemeFactory());
}
public long success; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_result.class, metaDataMap);
}
public add_result() {
}
public add_result(
long success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public add_result(add_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
}
public add_result deepCopy() {
return new add_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = 0;
}
public long getSuccess() {
return this.success;
}
public add_result setSuccess(long success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Long.valueOf(getSuccess());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof add_result)
return this.equals((add_result)that);
return false;
}
public boolean equals(add_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(add_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
add_result typedOther = (add_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("add_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class add_resultStandardSchemeFactory implements SchemeFactory {
public add_resultStandardScheme getScheme() {
return new add_resultStandardScheme();
}
}
private static class add_resultStandardScheme extends StandardScheme<add_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, add_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.success = iprot.readI64();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, add_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeI64(struct.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class add_resultTupleSchemeFactory implements SchemeFactory {
public add_resultTupleScheme getScheme() {
return new add_resultTupleScheme();
}
}
private static class add_resultTupleScheme extends TupleScheme<add_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, add_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
oprot.writeI64(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, add_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readI64();
struct.setSuccessIsSet(true);
}
}
}
}
}