rockserver/src/main/java/it/cavallium/rockserver/core/common/api/RocksDB.java

21150 lines
773 KiB
Java

/**
* Autogenerated by Thrift Compiler (0.19.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package it.cavallium.rockserver.core.common.api;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public class RocksDB {
public interface Iface {
public long openTransaction(long timeoutMs) throws org.apache.thrift.TException;
public boolean closeTransaction(long timeoutMs, boolean commit) throws org.apache.thrift.TException;
public void closeFailedUpdate(long updateId) throws org.apache.thrift.TException;
public long createColumn(java.lang.String name, ColumnSchema schema) throws org.apache.thrift.TException;
public void deleteColumn(long columnId) throws org.apache.thrift.TException;
public long getColumnId(java.lang.String name) throws org.apache.thrift.TException;
public void put(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException;
public OptionalBinary putGetPrevious(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException;
public Delta putGetDelta(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException;
public boolean putGetChanged(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException;
public boolean putGetPreviousPresence(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException;
public OptionalBinary get(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys) throws org.apache.thrift.TException;
public UpdateBegin getForUpdate(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys) throws org.apache.thrift.TException;
public boolean exists(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys) throws org.apache.thrift.TException;
public long openIterator(long transactionId, long columnId, java.util.List<java.nio.ByteBuffer> startKeysInclusive, java.util.List<java.nio.ByteBuffer> endKeysExclusive, boolean reverse, long timeoutMs) throws org.apache.thrift.TException;
public void closeIterator(long iteratorId) throws org.apache.thrift.TException;
public void seekTo(long iterationId, java.util.List<java.nio.ByteBuffer> keys) throws org.apache.thrift.TException;
public void subsequent(long iterationId, long skipCount, long takeCount) throws org.apache.thrift.TException;
public boolean subsequentExists(long iterationId, long skipCount, long takeCount) throws org.apache.thrift.TException;
public java.util.List<OptionalBinary> subsequentMultiGet(long iterationId, long skipCount, long takeCount) throws org.apache.thrift.TException;
}
public interface AsyncIface {
public void openTransaction(long timeoutMs, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;
public void closeTransaction(long timeoutMs, boolean commit, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void closeFailedUpdate(long updateId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
public void createColumn(java.lang.String name, ColumnSchema schema, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;
public void deleteColumn(long columnId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
public void getColumnId(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;
public void put(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
public void putGetPrevious(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback<OptionalBinary> resultHandler) throws org.apache.thrift.TException;
public void putGetDelta(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback<Delta> resultHandler) throws org.apache.thrift.TException;
public void putGetChanged(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void putGetPreviousPresence(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void get(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, org.apache.thrift.async.AsyncMethodCallback<OptionalBinary> resultHandler) throws org.apache.thrift.TException;
public void getForUpdate(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, org.apache.thrift.async.AsyncMethodCallback<UpdateBegin> resultHandler) throws org.apache.thrift.TException;
public void exists(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void openIterator(long transactionId, long columnId, java.util.List<java.nio.ByteBuffer> startKeysInclusive, java.util.List<java.nio.ByteBuffer> endKeysExclusive, boolean reverse, long timeoutMs, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;
public void closeIterator(long iteratorId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
public void seekTo(long iterationId, java.util.List<java.nio.ByteBuffer> keys, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
public void subsequent(long iterationId, long skipCount, long takeCount, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
public void subsequentExists(long iterationId, long skipCount, long takeCount, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void subsequentMultiGet(long iterationId, long skipCount, long takeCount, org.apache.thrift.async.AsyncMethodCallback<java.util.List<OptionalBinary>> 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() {}
@Override
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
return new Client(prot);
}
@Override
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);
}
@Override
public long openTransaction(long timeoutMs) throws org.apache.thrift.TException
{
send_openTransaction(timeoutMs);
return recv_openTransaction();
}
public void send_openTransaction(long timeoutMs) throws org.apache.thrift.TException
{
openTransaction_args args = new openTransaction_args();
args.setTimeoutMs(timeoutMs);
sendBase("openTransaction", args);
}
public long recv_openTransaction() throws org.apache.thrift.TException
{
openTransaction_result result = new openTransaction_result();
receiveBase(result, "openTransaction");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "openTransaction failed: unknown result");
}
@Override
public boolean closeTransaction(long timeoutMs, boolean commit) throws org.apache.thrift.TException
{
send_closeTransaction(timeoutMs, commit);
return recv_closeTransaction();
}
public void send_closeTransaction(long timeoutMs, boolean commit) throws org.apache.thrift.TException
{
closeTransaction_args args = new closeTransaction_args();
args.setTimeoutMs(timeoutMs);
args.setCommit(commit);
sendBase("closeTransaction", args);
}
public boolean recv_closeTransaction() throws org.apache.thrift.TException
{
closeTransaction_result result = new closeTransaction_result();
receiveBase(result, "closeTransaction");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closeTransaction failed: unknown result");
}
@Override
public void closeFailedUpdate(long updateId) throws org.apache.thrift.TException
{
send_closeFailedUpdate(updateId);
recv_closeFailedUpdate();
}
public void send_closeFailedUpdate(long updateId) throws org.apache.thrift.TException
{
closeFailedUpdate_args args = new closeFailedUpdate_args();
args.setUpdateId(updateId);
sendBase("closeFailedUpdate", args);
}
public void recv_closeFailedUpdate() throws org.apache.thrift.TException
{
closeFailedUpdate_result result = new closeFailedUpdate_result();
receiveBase(result, "closeFailedUpdate");
return;
}
@Override
public long createColumn(java.lang.String name, ColumnSchema schema) throws org.apache.thrift.TException
{
send_createColumn(name, schema);
return recv_createColumn();
}
public void send_createColumn(java.lang.String name, ColumnSchema schema) throws org.apache.thrift.TException
{
createColumn_args args = new createColumn_args();
args.setName(name);
args.setSchema(schema);
sendBase("createColumn", args);
}
public long recv_createColumn() throws org.apache.thrift.TException
{
createColumn_result result = new createColumn_result();
receiveBase(result, "createColumn");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createColumn failed: unknown result");
}
@Override
public void deleteColumn(long columnId) throws org.apache.thrift.TException
{
send_deleteColumn(columnId);
recv_deleteColumn();
}
public void send_deleteColumn(long columnId) throws org.apache.thrift.TException
{
deleteColumn_args args = new deleteColumn_args();
args.setColumnId(columnId);
sendBase("deleteColumn", args);
}
public void recv_deleteColumn() throws org.apache.thrift.TException
{
deleteColumn_result result = new deleteColumn_result();
receiveBase(result, "deleteColumn");
return;
}
@Override
public long getColumnId(java.lang.String name) throws org.apache.thrift.TException
{
send_getColumnId(name);
return recv_getColumnId();
}
public void send_getColumnId(java.lang.String name) throws org.apache.thrift.TException
{
getColumnId_args args = new getColumnId_args();
args.setName(name);
sendBase("getColumnId", args);
}
public long recv_getColumnId() throws org.apache.thrift.TException
{
getColumnId_result result = new getColumnId_result();
receiveBase(result, "getColumnId");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getColumnId failed: unknown result");
}
@Override
public void put(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException
{
send_put(transactionOrUpdateId, columnId, keys, value);
}
public void send_put(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException
{
put_args args = new put_args();
args.setTransactionOrUpdateId(transactionOrUpdateId);
args.setColumnId(columnId);
args.setKeys(keys);
args.setValue(value);
sendBaseOneway("put", args);
}
@Override
public OptionalBinary putGetPrevious(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException
{
send_putGetPrevious(transactionOrUpdateId, columnId, keys, value);
return recv_putGetPrevious();
}
public void send_putGetPrevious(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException
{
putGetPrevious_args args = new putGetPrevious_args();
args.setTransactionOrUpdateId(transactionOrUpdateId);
args.setColumnId(columnId);
args.setKeys(keys);
args.setValue(value);
sendBase("putGetPrevious", args);
}
public OptionalBinary recv_putGetPrevious() throws org.apache.thrift.TException
{
putGetPrevious_result result = new putGetPrevious_result();
receiveBase(result, "putGetPrevious");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "putGetPrevious failed: unknown result");
}
@Override
public Delta putGetDelta(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException
{
send_putGetDelta(transactionOrUpdateId, columnId, keys, value);
return recv_putGetDelta();
}
public void send_putGetDelta(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException
{
putGetDelta_args args = new putGetDelta_args();
args.setTransactionOrUpdateId(transactionOrUpdateId);
args.setColumnId(columnId);
args.setKeys(keys);
args.setValue(value);
sendBase("putGetDelta", args);
}
public Delta recv_putGetDelta() throws org.apache.thrift.TException
{
putGetDelta_result result = new putGetDelta_result();
receiveBase(result, "putGetDelta");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "putGetDelta failed: unknown result");
}
@Override
public boolean putGetChanged(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException
{
send_putGetChanged(transactionOrUpdateId, columnId, keys, value);
return recv_putGetChanged();
}
public void send_putGetChanged(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException
{
putGetChanged_args args = new putGetChanged_args();
args.setTransactionOrUpdateId(transactionOrUpdateId);
args.setColumnId(columnId);
args.setKeys(keys);
args.setValue(value);
sendBase("putGetChanged", args);
}
public boolean recv_putGetChanged() throws org.apache.thrift.TException
{
putGetChanged_result result = new putGetChanged_result();
receiveBase(result, "putGetChanged");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "putGetChanged failed: unknown result");
}
@Override
public boolean putGetPreviousPresence(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException
{
send_putGetPreviousPresence(transactionOrUpdateId, columnId, keys, value);
return recv_putGetPreviousPresence();
}
public void send_putGetPreviousPresence(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value) throws org.apache.thrift.TException
{
putGetPreviousPresence_args args = new putGetPreviousPresence_args();
args.setTransactionOrUpdateId(transactionOrUpdateId);
args.setColumnId(columnId);
args.setKeys(keys);
args.setValue(value);
sendBase("putGetPreviousPresence", args);
}
public boolean recv_putGetPreviousPresence() throws org.apache.thrift.TException
{
putGetPreviousPresence_result result = new putGetPreviousPresence_result();
receiveBase(result, "putGetPreviousPresence");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "putGetPreviousPresence failed: unknown result");
}
@Override
public OptionalBinary get(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys) throws org.apache.thrift.TException
{
send_get(transactionOrUpdateId, columnId, keys);
return recv_get();
}
public void send_get(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys) throws org.apache.thrift.TException
{
get_args args = new get_args();
args.setTransactionOrUpdateId(transactionOrUpdateId);
args.setColumnId(columnId);
args.setKeys(keys);
sendBase("get", args);
}
public OptionalBinary recv_get() throws org.apache.thrift.TException
{
get_result result = new get_result();
receiveBase(result, "get");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get failed: unknown result");
}
@Override
public UpdateBegin getForUpdate(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys) throws org.apache.thrift.TException
{
send_getForUpdate(transactionOrUpdateId, columnId, keys);
return recv_getForUpdate();
}
public void send_getForUpdate(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys) throws org.apache.thrift.TException
{
getForUpdate_args args = new getForUpdate_args();
args.setTransactionOrUpdateId(transactionOrUpdateId);
args.setColumnId(columnId);
args.setKeys(keys);
sendBase("getForUpdate", args);
}
public UpdateBegin recv_getForUpdate() throws org.apache.thrift.TException
{
getForUpdate_result result = new getForUpdate_result();
receiveBase(result, "getForUpdate");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getForUpdate failed: unknown result");
}
@Override
public boolean exists(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys) throws org.apache.thrift.TException
{
send_exists(transactionOrUpdateId, columnId, keys);
return recv_exists();
}
public void send_exists(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys) throws org.apache.thrift.TException
{
exists_args args = new exists_args();
args.setTransactionOrUpdateId(transactionOrUpdateId);
args.setColumnId(columnId);
args.setKeys(keys);
sendBase("exists", args);
}
public boolean recv_exists() throws org.apache.thrift.TException
{
exists_result result = new exists_result();
receiveBase(result, "exists");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "exists failed: unknown result");
}
@Override
public long openIterator(long transactionId, long columnId, java.util.List<java.nio.ByteBuffer> startKeysInclusive, java.util.List<java.nio.ByteBuffer> endKeysExclusive, boolean reverse, long timeoutMs) throws org.apache.thrift.TException
{
send_openIterator(transactionId, columnId, startKeysInclusive, endKeysExclusive, reverse, timeoutMs);
return recv_openIterator();
}
public void send_openIterator(long transactionId, long columnId, java.util.List<java.nio.ByteBuffer> startKeysInclusive, java.util.List<java.nio.ByteBuffer> endKeysExclusive, boolean reverse, long timeoutMs) throws org.apache.thrift.TException
{
openIterator_args args = new openIterator_args();
args.setTransactionId(transactionId);
args.setColumnId(columnId);
args.setStartKeysInclusive(startKeysInclusive);
args.setEndKeysExclusive(endKeysExclusive);
args.setReverse(reverse);
args.setTimeoutMs(timeoutMs);
sendBase("openIterator", args);
}
public long recv_openIterator() throws org.apache.thrift.TException
{
openIterator_result result = new openIterator_result();
receiveBase(result, "openIterator");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "openIterator failed: unknown result");
}
@Override
public void closeIterator(long iteratorId) throws org.apache.thrift.TException
{
send_closeIterator(iteratorId);
recv_closeIterator();
}
public void send_closeIterator(long iteratorId) throws org.apache.thrift.TException
{
closeIterator_args args = new closeIterator_args();
args.setIteratorId(iteratorId);
sendBase("closeIterator", args);
}
public void recv_closeIterator() throws org.apache.thrift.TException
{
closeIterator_result result = new closeIterator_result();
receiveBase(result, "closeIterator");
return;
}
@Override
public void seekTo(long iterationId, java.util.List<java.nio.ByteBuffer> keys) throws org.apache.thrift.TException
{
send_seekTo(iterationId, keys);
recv_seekTo();
}
public void send_seekTo(long iterationId, java.util.List<java.nio.ByteBuffer> keys) throws org.apache.thrift.TException
{
seekTo_args args = new seekTo_args();
args.setIterationId(iterationId);
args.setKeys(keys);
sendBase("seekTo", args);
}
public void recv_seekTo() throws org.apache.thrift.TException
{
seekTo_result result = new seekTo_result();
receiveBase(result, "seekTo");
return;
}
@Override
public void subsequent(long iterationId, long skipCount, long takeCount) throws org.apache.thrift.TException
{
send_subsequent(iterationId, skipCount, takeCount);
}
public void send_subsequent(long iterationId, long skipCount, long takeCount) throws org.apache.thrift.TException
{
subsequent_args args = new subsequent_args();
args.setIterationId(iterationId);
args.setSkipCount(skipCount);
args.setTakeCount(takeCount);
sendBaseOneway("subsequent", args);
}
@Override
public boolean subsequentExists(long iterationId, long skipCount, long takeCount) throws org.apache.thrift.TException
{
send_subsequentExists(iterationId, skipCount, takeCount);
return recv_subsequentExists();
}
public void send_subsequentExists(long iterationId, long skipCount, long takeCount) throws org.apache.thrift.TException
{
subsequentExists_args args = new subsequentExists_args();
args.setIterationId(iterationId);
args.setSkipCount(skipCount);
args.setTakeCount(takeCount);
sendBase("subsequentExists", args);
}
public boolean recv_subsequentExists() throws org.apache.thrift.TException
{
subsequentExists_result result = new subsequentExists_result();
receiveBase(result, "subsequentExists");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "subsequentExists failed: unknown result");
}
@Override
public java.util.List<OptionalBinary> subsequentMultiGet(long iterationId, long skipCount, long takeCount) throws org.apache.thrift.TException
{
send_subsequentMultiGet(iterationId, skipCount, takeCount);
return recv_subsequentMultiGet();
}
public void send_subsequentMultiGet(long iterationId, long skipCount, long takeCount) throws org.apache.thrift.TException
{
subsequentMultiGet_args args = new subsequentMultiGet_args();
args.setIterationId(iterationId);
args.setSkipCount(skipCount);
args.setTakeCount(takeCount);
sendBase("subsequentMultiGet", args);
}
public java.util.List<OptionalBinary> recv_subsequentMultiGet() throws org.apache.thrift.TException
{
subsequentMultiGet_result result = new subsequentMultiGet_result();
receiveBase(result, "subsequentMultiGet");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "subsequentMultiGet 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;
}
@Override
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);
}
@Override
public void openTransaction(long timeoutMs, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
checkReady();
openTransaction_call method_call = new openTransaction_call(timeoutMs, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class openTransaction_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Long> {
private long timeoutMs;
public openTransaction_call(long timeoutMs, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> 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.timeoutMs = timeoutMs;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("openTransaction", org.apache.thrift.protocol.TMessageType.CALL, 0));
openTransaction_args args = new openTransaction_args();
args.setTimeoutMs(timeoutMs);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public java.lang.Long getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_openTransaction();
}
}
@Override
public void closeTransaction(long timeoutMs, boolean commit, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
closeTransaction_call method_call = new closeTransaction_call(timeoutMs, commit, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class closeTransaction_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private long timeoutMs;
private boolean commit;
public closeTransaction_call(long timeoutMs, boolean commit, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> 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.timeoutMs = timeoutMs;
this.commit = commit;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeTransaction", org.apache.thrift.protocol.TMessageType.CALL, 0));
closeTransaction_args args = new closeTransaction_args();
args.setTimeoutMs(timeoutMs);
args.setCommit(commit);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public java.lang.Boolean getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_closeTransaction();
}
}
@Override
public void closeFailedUpdate(long updateId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
closeFailedUpdate_call method_call = new closeFailedUpdate_call(updateId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class closeFailedUpdate_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private long updateId;
public closeFailedUpdate_call(long updateId, org.apache.thrift.async.AsyncMethodCallback<Void> 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.updateId = updateId;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeFailedUpdate", org.apache.thrift.protocol.TMessageType.CALL, 0));
closeFailedUpdate_args args = new closeFailedUpdate_args();
args.setUpdateId(updateId);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public Void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_closeFailedUpdate();
return null;
}
}
@Override
public void createColumn(java.lang.String name, ColumnSchema schema, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
checkReady();
createColumn_call method_call = new createColumn_call(name, schema, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createColumn_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Long> {
private java.lang.String name;
private ColumnSchema schema;
public createColumn_call(java.lang.String name, ColumnSchema schema, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> 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.name = name;
this.schema = schema;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createColumn", org.apache.thrift.protocol.TMessageType.CALL, 0));
createColumn_args args = new createColumn_args();
args.setName(name);
args.setSchema(schema);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public java.lang.Long getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_createColumn();
}
}
@Override
public void deleteColumn(long columnId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
deleteColumn_call method_call = new deleteColumn_call(columnId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteColumn_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private long columnId;
public deleteColumn_call(long columnId, org.apache.thrift.async.AsyncMethodCallback<Void> 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.columnId = columnId;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteColumn", org.apache.thrift.protocol.TMessageType.CALL, 0));
deleteColumn_args args = new deleteColumn_args();
args.setColumnId(columnId);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public Void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_deleteColumn();
return null;
}
}
@Override
public void getColumnId(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
checkReady();
getColumnId_call method_call = new getColumnId_call(name, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getColumnId_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Long> {
private java.lang.String name;
public getColumnId_call(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> 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.name = name;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getColumnId", org.apache.thrift.protocol.TMessageType.CALL, 0));
getColumnId_args args = new getColumnId_args();
args.setName(name);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public java.lang.Long getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_getColumnId();
}
}
@Override
public void put(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
put_call method_call = new put_call(transactionOrUpdateId, columnId, keys, value, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class put_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private long transactionOrUpdateId;
private long columnId;
private java.util.List<java.nio.ByteBuffer> keys;
private java.nio.ByteBuffer value;
public put_call(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback<Void> 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.transactionOrUpdateId = transactionOrUpdateId;
this.columnId = columnId;
this.keys = keys;
this.value = value;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("put", org.apache.thrift.protocol.TMessageType.ONEWAY, 0));
put_args args = new put_args();
args.setTransactionOrUpdateId(transactionOrUpdateId);
args.setColumnId(columnId);
args.setKeys(keys);
args.setValue(value);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public Void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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 null;
}
}
@Override
public void putGetPrevious(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback<OptionalBinary> resultHandler) throws org.apache.thrift.TException {
checkReady();
putGetPrevious_call method_call = new putGetPrevious_call(transactionOrUpdateId, columnId, keys, value, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class putGetPrevious_call extends org.apache.thrift.async.TAsyncMethodCall<OptionalBinary> {
private long transactionOrUpdateId;
private long columnId;
private java.util.List<java.nio.ByteBuffer> keys;
private java.nio.ByteBuffer value;
public putGetPrevious_call(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback<OptionalBinary> 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.transactionOrUpdateId = transactionOrUpdateId;
this.columnId = columnId;
this.keys = keys;
this.value = value;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("putGetPrevious", org.apache.thrift.protocol.TMessageType.CALL, 0));
putGetPrevious_args args = new putGetPrevious_args();
args.setTransactionOrUpdateId(transactionOrUpdateId);
args.setColumnId(columnId);
args.setKeys(keys);
args.setValue(value);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public OptionalBinary getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_putGetPrevious();
}
}
@Override
public void putGetDelta(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback<Delta> resultHandler) throws org.apache.thrift.TException {
checkReady();
putGetDelta_call method_call = new putGetDelta_call(transactionOrUpdateId, columnId, keys, value, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class putGetDelta_call extends org.apache.thrift.async.TAsyncMethodCall<Delta> {
private long transactionOrUpdateId;
private long columnId;
private java.util.List<java.nio.ByteBuffer> keys;
private java.nio.ByteBuffer value;
public putGetDelta_call(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback<Delta> 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.transactionOrUpdateId = transactionOrUpdateId;
this.columnId = columnId;
this.keys = keys;
this.value = value;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("putGetDelta", org.apache.thrift.protocol.TMessageType.CALL, 0));
putGetDelta_args args = new putGetDelta_args();
args.setTransactionOrUpdateId(transactionOrUpdateId);
args.setColumnId(columnId);
args.setKeys(keys);
args.setValue(value);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public Delta getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_putGetDelta();
}
}
@Override
public void putGetChanged(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
putGetChanged_call method_call = new putGetChanged_call(transactionOrUpdateId, columnId, keys, value, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class putGetChanged_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private long transactionOrUpdateId;
private long columnId;
private java.util.List<java.nio.ByteBuffer> keys;
private java.nio.ByteBuffer value;
public putGetChanged_call(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> 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.transactionOrUpdateId = transactionOrUpdateId;
this.columnId = columnId;
this.keys = keys;
this.value = value;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("putGetChanged", org.apache.thrift.protocol.TMessageType.CALL, 0));
putGetChanged_args args = new putGetChanged_args();
args.setTransactionOrUpdateId(transactionOrUpdateId);
args.setColumnId(columnId);
args.setKeys(keys);
args.setValue(value);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public java.lang.Boolean getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_putGetChanged();
}
}
@Override
public void putGetPreviousPresence(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
putGetPreviousPresence_call method_call = new putGetPreviousPresence_call(transactionOrUpdateId, columnId, keys, value, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class putGetPreviousPresence_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private long transactionOrUpdateId;
private long columnId;
private java.util.List<java.nio.ByteBuffer> keys;
private java.nio.ByteBuffer value;
public putGetPreviousPresence_call(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, java.nio.ByteBuffer value, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> 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.transactionOrUpdateId = transactionOrUpdateId;
this.columnId = columnId;
this.keys = keys;
this.value = value;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("putGetPreviousPresence", org.apache.thrift.protocol.TMessageType.CALL, 0));
putGetPreviousPresence_args args = new putGetPreviousPresence_args();
args.setTransactionOrUpdateId(transactionOrUpdateId);
args.setColumnId(columnId);
args.setKeys(keys);
args.setValue(value);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public java.lang.Boolean getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_putGetPreviousPresence();
}
}
@Override
public void get(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, org.apache.thrift.async.AsyncMethodCallback<OptionalBinary> resultHandler) throws org.apache.thrift.TException {
checkReady();
get_call method_call = new get_call(transactionOrUpdateId, columnId, keys, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class get_call extends org.apache.thrift.async.TAsyncMethodCall<OptionalBinary> {
private long transactionOrUpdateId;
private long columnId;
private java.util.List<java.nio.ByteBuffer> keys;
public get_call(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, org.apache.thrift.async.AsyncMethodCallback<OptionalBinary> 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.transactionOrUpdateId = transactionOrUpdateId;
this.columnId = columnId;
this.keys = keys;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get", org.apache.thrift.protocol.TMessageType.CALL, 0));
get_args args = new get_args();
args.setTransactionOrUpdateId(transactionOrUpdateId);
args.setColumnId(columnId);
args.setKeys(keys);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public OptionalBinary getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_get();
}
}
@Override
public void getForUpdate(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, org.apache.thrift.async.AsyncMethodCallback<UpdateBegin> resultHandler) throws org.apache.thrift.TException {
checkReady();
getForUpdate_call method_call = new getForUpdate_call(transactionOrUpdateId, columnId, keys, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getForUpdate_call extends org.apache.thrift.async.TAsyncMethodCall<UpdateBegin> {
private long transactionOrUpdateId;
private long columnId;
private java.util.List<java.nio.ByteBuffer> keys;
public getForUpdate_call(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, org.apache.thrift.async.AsyncMethodCallback<UpdateBegin> 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.transactionOrUpdateId = transactionOrUpdateId;
this.columnId = columnId;
this.keys = keys;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getForUpdate", org.apache.thrift.protocol.TMessageType.CALL, 0));
getForUpdate_args args = new getForUpdate_args();
args.setTransactionOrUpdateId(transactionOrUpdateId);
args.setColumnId(columnId);
args.setKeys(keys);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public UpdateBegin getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_getForUpdate();
}
}
@Override
public void exists(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
exists_call method_call = new exists_call(transactionOrUpdateId, columnId, keys, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class exists_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private long transactionOrUpdateId;
private long columnId;
private java.util.List<java.nio.ByteBuffer> keys;
public exists_call(long transactionOrUpdateId, long columnId, java.util.List<java.nio.ByteBuffer> keys, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> 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.transactionOrUpdateId = transactionOrUpdateId;
this.columnId = columnId;
this.keys = keys;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("exists", org.apache.thrift.protocol.TMessageType.CALL, 0));
exists_args args = new exists_args();
args.setTransactionOrUpdateId(transactionOrUpdateId);
args.setColumnId(columnId);
args.setKeys(keys);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public java.lang.Boolean getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_exists();
}
}
@Override
public void openIterator(long transactionId, long columnId, java.util.List<java.nio.ByteBuffer> startKeysInclusive, java.util.List<java.nio.ByteBuffer> endKeysExclusive, boolean reverse, long timeoutMs, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
checkReady();
openIterator_call method_call = new openIterator_call(transactionId, columnId, startKeysInclusive, endKeysExclusive, reverse, timeoutMs, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class openIterator_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Long> {
private long transactionId;
private long columnId;
private java.util.List<java.nio.ByteBuffer> startKeysInclusive;
private java.util.List<java.nio.ByteBuffer> endKeysExclusive;
private boolean reverse;
private long timeoutMs;
public openIterator_call(long transactionId, long columnId, java.util.List<java.nio.ByteBuffer> startKeysInclusive, java.util.List<java.nio.ByteBuffer> endKeysExclusive, boolean reverse, long timeoutMs, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> 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.transactionId = transactionId;
this.columnId = columnId;
this.startKeysInclusive = startKeysInclusive;
this.endKeysExclusive = endKeysExclusive;
this.reverse = reverse;
this.timeoutMs = timeoutMs;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("openIterator", org.apache.thrift.protocol.TMessageType.CALL, 0));
openIterator_args args = new openIterator_args();
args.setTransactionId(transactionId);
args.setColumnId(columnId);
args.setStartKeysInclusive(startKeysInclusive);
args.setEndKeysExclusive(endKeysExclusive);
args.setReverse(reverse);
args.setTimeoutMs(timeoutMs);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public java.lang.Long getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_openIterator();
}
}
@Override
public void closeIterator(long iteratorId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
closeIterator_call method_call = new closeIterator_call(iteratorId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class closeIterator_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private long iteratorId;
public closeIterator_call(long iteratorId, org.apache.thrift.async.AsyncMethodCallback<Void> 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.iteratorId = iteratorId;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeIterator", org.apache.thrift.protocol.TMessageType.CALL, 0));
closeIterator_args args = new closeIterator_args();
args.setIteratorId(iteratorId);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public Void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_closeIterator();
return null;
}
}
@Override
public void seekTo(long iterationId, java.util.List<java.nio.ByteBuffer> keys, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
seekTo_call method_call = new seekTo_call(iterationId, keys, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class seekTo_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private long iterationId;
private java.util.List<java.nio.ByteBuffer> keys;
public seekTo_call(long iterationId, java.util.List<java.nio.ByteBuffer> keys, org.apache.thrift.async.AsyncMethodCallback<Void> 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.iterationId = iterationId;
this.keys = keys;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("seekTo", org.apache.thrift.protocol.TMessageType.CALL, 0));
seekTo_args args = new seekTo_args();
args.setIterationId(iterationId);
args.setKeys(keys);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public Void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_seekTo();
return null;
}
}
@Override
public void subsequent(long iterationId, long skipCount, long takeCount, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
subsequent_call method_call = new subsequent_call(iterationId, skipCount, takeCount, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class subsequent_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private long iterationId;
private long skipCount;
private long takeCount;
public subsequent_call(long iterationId, long skipCount, long takeCount, org.apache.thrift.async.AsyncMethodCallback<Void> 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.iterationId = iterationId;
this.skipCount = skipCount;
this.takeCount = takeCount;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("subsequent", org.apache.thrift.protocol.TMessageType.ONEWAY, 0));
subsequent_args args = new subsequent_args();
args.setIterationId(iterationId);
args.setSkipCount(skipCount);
args.setTakeCount(takeCount);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public Void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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 null;
}
}
@Override
public void subsequentExists(long iterationId, long skipCount, long takeCount, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
subsequentExists_call method_call = new subsequentExists_call(iterationId, skipCount, takeCount, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class subsequentExists_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private long iterationId;
private long skipCount;
private long takeCount;
public subsequentExists_call(long iterationId, long skipCount, long takeCount, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> 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.iterationId = iterationId;
this.skipCount = skipCount;
this.takeCount = takeCount;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("subsequentExists", org.apache.thrift.protocol.TMessageType.CALL, 0));
subsequentExists_args args = new subsequentExists_args();
args.setIterationId(iterationId);
args.setSkipCount(skipCount);
args.setTakeCount(takeCount);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public java.lang.Boolean getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_subsequentExists();
}
}
@Override
public void subsequentMultiGet(long iterationId, long skipCount, long takeCount, org.apache.thrift.async.AsyncMethodCallback<java.util.List<OptionalBinary>> resultHandler) throws org.apache.thrift.TException {
checkReady();
subsequentMultiGet_call method_call = new subsequentMultiGet_call(iterationId, skipCount, takeCount, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class subsequentMultiGet_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<OptionalBinary>> {
private long iterationId;
private long skipCount;
private long takeCount;
public subsequentMultiGet_call(long iterationId, long skipCount, long takeCount, org.apache.thrift.async.AsyncMethodCallback<java.util.List<OptionalBinary>> 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.iterationId = iterationId;
this.skipCount = skipCount;
this.takeCount = takeCount;
}
@Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("subsequentMultiGet", org.apache.thrift.protocol.TMessageType.CALL, 0));
subsequentMultiGet_args args = new subsequentMultiGet_args();
args.setIterationId(iterationId);
args.setSkipCount(skipCount);
args.setTakeCount(takeCount);
args.write(prot);
prot.writeMessageEnd();
}
@Override
public java.util.List<OptionalBinary> getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_subsequentMultiGet();
}
}
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends Iface> java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("openTransaction", new openTransaction());
processMap.put("closeTransaction", new closeTransaction());
processMap.put("closeFailedUpdate", new closeFailedUpdate());
processMap.put("createColumn", new createColumn());
processMap.put("deleteColumn", new deleteColumn());
processMap.put("getColumnId", new getColumnId());
processMap.put("put", new put());
processMap.put("putGetPrevious", new putGetPrevious());
processMap.put("putGetDelta", new putGetDelta());
processMap.put("putGetChanged", new putGetChanged());
processMap.put("putGetPreviousPresence", new putGetPreviousPresence());
processMap.put("get", new get());
processMap.put("getForUpdate", new getForUpdate());
processMap.put("exists", new exists());
processMap.put("openIterator", new openIterator());
processMap.put("closeIterator", new closeIterator());
processMap.put("seekTo", new seekTo());
processMap.put("subsequent", new subsequent());
processMap.put("subsequentExists", new subsequentExists());
processMap.put("subsequentMultiGet", new subsequentMultiGet());
return processMap;
}
public static class openTransaction<I extends Iface> extends org.apache.thrift.ProcessFunction<I, openTransaction_args> {
public openTransaction() {
super("openTransaction");
}
@Override
public openTransaction_args getEmptyArgsInstance() {
return new openTransaction_args();
}
@Override
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public openTransaction_result getResult(I iface, openTransaction_args args) throws org.apache.thrift.TException {
openTransaction_result result = new openTransaction_result();
result.success = iface.openTransaction(args.timeoutMs);
result.setSuccessIsSet(true);
return result;
}
}
public static class closeTransaction<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closeTransaction_args> {
public closeTransaction() {
super("closeTransaction");
}
@Override
public closeTransaction_args getEmptyArgsInstance() {
return new closeTransaction_args();
}
@Override
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public closeTransaction_result getResult(I iface, closeTransaction_args args) throws org.apache.thrift.TException {
closeTransaction_result result = new closeTransaction_result();
result.success = iface.closeTransaction(args.timeoutMs, args.commit);
result.setSuccessIsSet(true);
return result;
}
}
public static class closeFailedUpdate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closeFailedUpdate_args> {
public closeFailedUpdate() {
super("closeFailedUpdate");
}
@Override
public closeFailedUpdate_args getEmptyArgsInstance() {
return new closeFailedUpdate_args();
}
@Override
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public closeFailedUpdate_result getResult(I iface, closeFailedUpdate_args args) throws org.apache.thrift.TException {
closeFailedUpdate_result result = new closeFailedUpdate_result();
iface.closeFailedUpdate(args.updateId);
return result;
}
}
public static class createColumn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createColumn_args> {
public createColumn() {
super("createColumn");
}
@Override
public createColumn_args getEmptyArgsInstance() {
return new createColumn_args();
}
@Override
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public createColumn_result getResult(I iface, createColumn_args args) throws org.apache.thrift.TException {
createColumn_result result = new createColumn_result();
result.success = iface.createColumn(args.name, args.schema);
result.setSuccessIsSet(true);
return result;
}
}
public static class deleteColumn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteColumn_args> {
public deleteColumn() {
super("deleteColumn");
}
@Override
public deleteColumn_args getEmptyArgsInstance() {
return new deleteColumn_args();
}
@Override
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public deleteColumn_result getResult(I iface, deleteColumn_args args) throws org.apache.thrift.TException {
deleteColumn_result result = new deleteColumn_result();
iface.deleteColumn(args.columnId);
return result;
}
}
public static class getColumnId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getColumnId_args> {
public getColumnId() {
super("getColumnId");
}
@Override
public getColumnId_args getEmptyArgsInstance() {
return new getColumnId_args();
}
@Override
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public getColumnId_result getResult(I iface, getColumnId_args args) throws org.apache.thrift.TException {
getColumnId_result result = new getColumnId_result();
result.success = iface.getColumnId(args.name);
result.setSuccessIsSet(true);
return result;
}
}
public static class put<I extends Iface> extends org.apache.thrift.ProcessFunction<I, put_args> {
public put() {
super("put");
}
@Override
public put_args getEmptyArgsInstance() {
return new put_args();
}
@Override
protected boolean isOneway() {
return true;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public org.apache.thrift.TBase getResult(I iface, put_args args) throws org.apache.thrift.TException {
iface.put(args.transactionOrUpdateId, args.columnId, args.keys, args.value);
return null;
}
}
public static class putGetPrevious<I extends Iface> extends org.apache.thrift.ProcessFunction<I, putGetPrevious_args> {
public putGetPrevious() {
super("putGetPrevious");
}
@Override
public putGetPrevious_args getEmptyArgsInstance() {
return new putGetPrevious_args();
}
@Override
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public putGetPrevious_result getResult(I iface, putGetPrevious_args args) throws org.apache.thrift.TException {
putGetPrevious_result result = new putGetPrevious_result();
result.success = iface.putGetPrevious(args.transactionOrUpdateId, args.columnId, args.keys, args.value);
return result;
}
}
public static class putGetDelta<I extends Iface> extends org.apache.thrift.ProcessFunction<I, putGetDelta_args> {
public putGetDelta() {
super("putGetDelta");
}
@Override
public putGetDelta_args getEmptyArgsInstance() {
return new putGetDelta_args();
}
@Override
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public putGetDelta_result getResult(I iface, putGetDelta_args args) throws org.apache.thrift.TException {
putGetDelta_result result = new putGetDelta_result();
result.success = iface.putGetDelta(args.transactionOrUpdateId, args.columnId, args.keys, args.value);
return result;
}
}
public static class putGetChanged<I extends Iface> extends org.apache.thrift.ProcessFunction<I, putGetChanged_args> {
public putGetChanged() {
super("putGetChanged");
}
@Override
public putGetChanged_args getEmptyArgsInstance() {
return new putGetChanged_args();
}
@Override
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public putGetChanged_result getResult(I iface, putGetChanged_args args) throws org.apache.thrift.TException {
putGetChanged_result result = new putGetChanged_result();
result.success = iface.putGetChanged(args.transactionOrUpdateId, args.columnId, args.keys, args.value);
result.setSuccessIsSet(true);
return result;
}
}
public static class putGetPreviousPresence<I extends Iface> extends org.apache.thrift.ProcessFunction<I, putGetPreviousPresence_args> {
public putGetPreviousPresence() {
super("putGetPreviousPresence");
}
@Override
public putGetPreviousPresence_args getEmptyArgsInstance() {
return new putGetPreviousPresence_args();
}
@Override
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public putGetPreviousPresence_result getResult(I iface, putGetPreviousPresence_args args) throws org.apache.thrift.TException {
putGetPreviousPresence_result result = new putGetPreviousPresence_result();
result.success = iface.putGetPreviousPresence(args.transactionOrUpdateId, args.columnId, args.keys, args.value);
result.setSuccessIsSet(true);
return result;
}
}
public static class get<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_args> {
public get() {
super("get");
}
@Override
public get_args getEmptyArgsInstance() {
return new get_args();
}
@Override
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public get_result getResult(I iface, get_args args) throws org.apache.thrift.TException {
get_result result = new get_result();
result.success = iface.get(args.transactionOrUpdateId, args.columnId, args.keys);
return result;
}
}
public static class getForUpdate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getForUpdate_args> {
public getForUpdate() {
super("getForUpdate");
}
@Override
public getForUpdate_args getEmptyArgsInstance() {
return new getForUpdate_args();
}
@Override
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public getForUpdate_result getResult(I iface, getForUpdate_args args) throws org.apache.thrift.TException {
getForUpdate_result result = new getForUpdate_result();
result.success = iface.getForUpdate(args.transactionOrUpdateId, args.columnId, args.keys);
return result;
}
}
public static class exists<I extends Iface> extends org.apache.thrift.ProcessFunction<I, exists_args> {
public exists() {
super("exists");
}
@Override
public exists_args getEmptyArgsInstance() {
return new exists_args();
}
@Override
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public exists_result getResult(I iface, exists_args args) throws org.apache.thrift.TException {
exists_result result = new exists_result();
result.success = iface.exists(args.transactionOrUpdateId, args.columnId, args.keys);
result.setSuccessIsSet(true);
return result;
}
}
public static class openIterator<I extends Iface> extends org.apache.thrift.ProcessFunction<I, openIterator_args> {
public openIterator() {
super("openIterator");
}
@Override
public openIterator_args getEmptyArgsInstance() {
return new openIterator_args();
}
@Override
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public openIterator_result getResult(I iface, openIterator_args args) throws org.apache.thrift.TException {
openIterator_result result = new openIterator_result();
result.success = iface.openIterator(args.transactionId, args.columnId, args.startKeysInclusive, args.endKeysExclusive, args.reverse, args.timeoutMs);
result.setSuccessIsSet(true);
return result;
}
}
public static class closeIterator<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closeIterator_args> {
public closeIterator() {
super("closeIterator");
}
@Override
public closeIterator_args getEmptyArgsInstance() {
return new closeIterator_args();
}
@Override
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public closeIterator_result getResult(I iface, closeIterator_args args) throws org.apache.thrift.TException {
closeIterator_result result = new closeIterator_result();
iface.closeIterator(args.iteratorId);
return result;
}
}
public static class seekTo<I extends Iface> extends org.apache.thrift.ProcessFunction<I, seekTo_args> {
public seekTo() {
super("seekTo");
}
@Override
public seekTo_args getEmptyArgsInstance() {
return new seekTo_args();
}
@Override
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public seekTo_result getResult(I iface, seekTo_args args) throws org.apache.thrift.TException {
seekTo_result result = new seekTo_result();
iface.seekTo(args.iterationId, args.keys);
return result;
}
}
public static class subsequent<I extends Iface> extends org.apache.thrift.ProcessFunction<I, subsequent_args> {
public subsequent() {
super("subsequent");
}
@Override
public subsequent_args getEmptyArgsInstance() {
return new subsequent_args();
}
@Override
protected boolean isOneway() {
return true;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public org.apache.thrift.TBase getResult(I iface, subsequent_args args) throws org.apache.thrift.TException {
iface.subsequent(args.iterationId, args.skipCount, args.takeCount);
return null;
}
}
public static class subsequentExists<I extends Iface> extends org.apache.thrift.ProcessFunction<I, subsequentExists_args> {
public subsequentExists() {
super("subsequentExists");
}
@Override
public subsequentExists_args getEmptyArgsInstance() {
return new subsequentExists_args();
}
@Override
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public subsequentExists_result getResult(I iface, subsequentExists_args args) throws org.apache.thrift.TException {
subsequentExists_result result = new subsequentExists_result();
result.success = iface.subsequentExists(args.iterationId, args.skipCount, args.takeCount);
result.setSuccessIsSet(true);
return result;
}
}
public static class subsequentMultiGet<I extends Iface> extends org.apache.thrift.ProcessFunction<I, subsequentMultiGet_args> {
public subsequentMultiGet() {
super("subsequentMultiGet");
}
@Override
public subsequentMultiGet_args getEmptyArgsInstance() {
return new subsequentMultiGet_args();
}
@Override
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
@Override
public subsequentMultiGet_result getResult(I iface, subsequentMultiGet_args args) throws org.apache.thrift.TException {
subsequentMultiGet_result result = new subsequentMultiGet_result();
result.success = iface.subsequentMultiGet(args.iterationId, args.skipCount, args.takeCount);
return result;
}
}
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
}
protected AsyncProcessor(I iface, java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("openTransaction", new openTransaction());
processMap.put("closeTransaction", new closeTransaction());
processMap.put("closeFailedUpdate", new closeFailedUpdate());
processMap.put("createColumn", new createColumn());
processMap.put("deleteColumn", new deleteColumn());
processMap.put("getColumnId", new getColumnId());
processMap.put("put", new put());
processMap.put("putGetPrevious", new putGetPrevious());
processMap.put("putGetDelta", new putGetDelta());
processMap.put("putGetChanged", new putGetChanged());
processMap.put("putGetPreviousPresence", new putGetPreviousPresence());
processMap.put("get", new get());
processMap.put("getForUpdate", new getForUpdate());
processMap.put("exists", new exists());
processMap.put("openIterator", new openIterator());
processMap.put("closeIterator", new closeIterator());
processMap.put("seekTo", new seekTo());
processMap.put("subsequent", new subsequent());
processMap.put("subsequentExists", new subsequentExists());
processMap.put("subsequentMultiGet", new subsequentMultiGet());
return processMap;
}
public static class openTransaction<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, openTransaction_args, java.lang.Long> {
public openTransaction() {
super("openTransaction");
}
@Override
public openTransaction_args getEmptyArgsInstance() {
return new openTransaction_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Long>() {
@Override
public void onComplete(java.lang.Long o) {
openTransaction_result result = new openTransaction_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
@Override
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
openTransaction_result result = new openTransaction_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
@Override
protected boolean isOneway() {
return false;
}
@Override
public void start(I iface, openTransaction_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
iface.openTransaction(args.timeoutMs,resultHandler);
}
}
public static class closeTransaction<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, closeTransaction_args, java.lang.Boolean> {
public closeTransaction() {
super("closeTransaction");
}
@Override
public closeTransaction_args getEmptyArgsInstance() {
return new closeTransaction_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
@Override
public void onComplete(java.lang.Boolean o) {
closeTransaction_result result = new closeTransaction_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
@Override
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
closeTransaction_result result = new closeTransaction_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
@Override
protected boolean isOneway() {
return false;
}
@Override
public void start(I iface, closeTransaction_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.closeTransaction(args.timeoutMs, args.commit,resultHandler);
}
}
public static class closeFailedUpdate<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, closeFailedUpdate_args, Void> {
public closeFailedUpdate() {
super("closeFailedUpdate");
}
@Override
public closeFailedUpdate_args getEmptyArgsInstance() {
return new closeFailedUpdate_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
@Override
public void onComplete(Void o) {
closeFailedUpdate_result result = new closeFailedUpdate_result();
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
@Override
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
closeFailedUpdate_result result = new closeFailedUpdate_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
@Override
protected boolean isOneway() {
return false;
}
@Override
public void start(I iface, closeFailedUpdate_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.closeFailedUpdate(args.updateId,resultHandler);
}
}
public static class createColumn<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createColumn_args, java.lang.Long> {
public createColumn() {
super("createColumn");
}
@Override
public createColumn_args getEmptyArgsInstance() {
return new createColumn_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Long>() {
@Override
public void onComplete(java.lang.Long o) {
createColumn_result result = new createColumn_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
@Override
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
createColumn_result result = new createColumn_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
@Override
protected boolean isOneway() {
return false;
}
@Override
public void start(I iface, createColumn_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
iface.createColumn(args.name, args.schema,resultHandler);
}
}
public static class deleteColumn<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteColumn_args, Void> {
public deleteColumn() {
super("deleteColumn");
}
@Override
public deleteColumn_args getEmptyArgsInstance() {
return new deleteColumn_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
@Override
public void onComplete(Void o) {
deleteColumn_result result = new deleteColumn_result();
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
@Override
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
deleteColumn_result result = new deleteColumn_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
@Override
protected boolean isOneway() {
return false;
}
@Override
public void start(I iface, deleteColumn_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.deleteColumn(args.columnId,resultHandler);
}
}
public static class getColumnId<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getColumnId_args, java.lang.Long> {
public getColumnId() {
super("getColumnId");
}
@Override
public getColumnId_args getEmptyArgsInstance() {
return new getColumnId_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Long>() {
@Override
public void onComplete(java.lang.Long o) {
getColumnId_result result = new getColumnId_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
@Override
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
getColumnId_result result = new getColumnId_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
@Override
protected boolean isOneway() {
return false;
}
@Override
public void start(I iface, getColumnId_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
iface.getColumnId(args.name,resultHandler);
}
}
public static class put<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, put_args, Void> {
public put() {
super("put");
}
@Override
public put_args getEmptyArgsInstance() {
return new put_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
@Override
public void onComplete(Void o) {
}
@Override
public void onError(java.lang.Exception e) {
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
} else {
_LOGGER.error("Exception inside oneway handler", e);
}
}
};
}
@Override
protected boolean isOneway() {
return true;
}
@Override
public void start(I iface, put_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.put(args.transactionOrUpdateId, args.columnId, args.keys, args.value,resultHandler);
}
}
public static class putGetPrevious<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, putGetPrevious_args, OptionalBinary> {
public putGetPrevious() {
super("putGetPrevious");
}
@Override
public putGetPrevious_args getEmptyArgsInstance() {
return new putGetPrevious_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<OptionalBinary> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<OptionalBinary>() {
@Override
public void onComplete(OptionalBinary o) {
putGetPrevious_result result = new putGetPrevious_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
@Override
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
putGetPrevious_result result = new putGetPrevious_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
@Override
protected boolean isOneway() {
return false;
}
@Override
public void start(I iface, putGetPrevious_args args, org.apache.thrift.async.AsyncMethodCallback<OptionalBinary> resultHandler) throws org.apache.thrift.TException {
iface.putGetPrevious(args.transactionOrUpdateId, args.columnId, args.keys, args.value,resultHandler);
}
}
public static class putGetDelta<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, putGetDelta_args, Delta> {
public putGetDelta() {
super("putGetDelta");
}
@Override
public putGetDelta_args getEmptyArgsInstance() {
return new putGetDelta_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<Delta> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<Delta>() {
@Override
public void onComplete(Delta o) {
putGetDelta_result result = new putGetDelta_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
@Override
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
putGetDelta_result result = new putGetDelta_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
@Override
protected boolean isOneway() {
return false;
}
@Override
public void start(I iface, putGetDelta_args args, org.apache.thrift.async.AsyncMethodCallback<Delta> resultHandler) throws org.apache.thrift.TException {
iface.putGetDelta(args.transactionOrUpdateId, args.columnId, args.keys, args.value,resultHandler);
}
}
public static class putGetChanged<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, putGetChanged_args, java.lang.Boolean> {
public putGetChanged() {
super("putGetChanged");
}
@Override
public putGetChanged_args getEmptyArgsInstance() {
return new putGetChanged_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
@Override
public void onComplete(java.lang.Boolean o) {
putGetChanged_result result = new putGetChanged_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
@Override
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
putGetChanged_result result = new putGetChanged_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
@Override
protected boolean isOneway() {
return false;
}
@Override
public void start(I iface, putGetChanged_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.putGetChanged(args.transactionOrUpdateId, args.columnId, args.keys, args.value,resultHandler);
}
}
public static class putGetPreviousPresence<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, putGetPreviousPresence_args, java.lang.Boolean> {
public putGetPreviousPresence() {
super("putGetPreviousPresence");
}
@Override
public putGetPreviousPresence_args getEmptyArgsInstance() {
return new putGetPreviousPresence_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
@Override
public void onComplete(java.lang.Boolean o) {
putGetPreviousPresence_result result = new putGetPreviousPresence_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
@Override
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
putGetPreviousPresence_result result = new putGetPreviousPresence_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
@Override
protected boolean isOneway() {
return false;
}
@Override
public void start(I iface, putGetPreviousPresence_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.putGetPreviousPresence(args.transactionOrUpdateId, args.columnId, args.keys, args.value,resultHandler);
}
}
public static class get<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_args, OptionalBinary> {
public get() {
super("get");
}
@Override
public get_args getEmptyArgsInstance() {
return new get_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<OptionalBinary> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<OptionalBinary>() {
@Override
public void onComplete(OptionalBinary o) {
get_result result = new get_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
@Override
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
get_result result = new get_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
@Override
protected boolean isOneway() {
return false;
}
@Override
public void start(I iface, get_args args, org.apache.thrift.async.AsyncMethodCallback<OptionalBinary> resultHandler) throws org.apache.thrift.TException {
iface.get(args.transactionOrUpdateId, args.columnId, args.keys,resultHandler);
}
}
public static class getForUpdate<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getForUpdate_args, UpdateBegin> {
public getForUpdate() {
super("getForUpdate");
}
@Override
public getForUpdate_args getEmptyArgsInstance() {
return new getForUpdate_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<UpdateBegin> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<UpdateBegin>() {
@Override
public void onComplete(UpdateBegin o) {
getForUpdate_result result = new getForUpdate_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
@Override
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
getForUpdate_result result = new getForUpdate_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
@Override
protected boolean isOneway() {
return false;
}
@Override
public void start(I iface, getForUpdate_args args, org.apache.thrift.async.AsyncMethodCallback<UpdateBegin> resultHandler) throws org.apache.thrift.TException {
iface.getForUpdate(args.transactionOrUpdateId, args.columnId, args.keys,resultHandler);
}
}
public static class exists<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, exists_args, java.lang.Boolean> {
public exists() {
super("exists");
}
@Override
public exists_args getEmptyArgsInstance() {
return new exists_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
@Override
public void onComplete(java.lang.Boolean o) {
exists_result result = new exists_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
@Override
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
exists_result result = new exists_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
@Override
protected boolean isOneway() {
return false;
}
@Override
public void start(I iface, exists_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.exists(args.transactionOrUpdateId, args.columnId, args.keys,resultHandler);
}
}
public static class openIterator<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, openIterator_args, java.lang.Long> {
public openIterator() {
super("openIterator");
}
@Override
public openIterator_args getEmptyArgsInstance() {
return new openIterator_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Long>() {
@Override
public void onComplete(java.lang.Long o) {
openIterator_result result = new openIterator_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
@Override
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
openIterator_result result = new openIterator_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
@Override
protected boolean isOneway() {
return false;
}
@Override
public void start(I iface, openIterator_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
iface.openIterator(args.transactionId, args.columnId, args.startKeysInclusive, args.endKeysExclusive, args.reverse, args.timeoutMs,resultHandler);
}
}
public static class closeIterator<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, closeIterator_args, Void> {
public closeIterator() {
super("closeIterator");
}
@Override
public closeIterator_args getEmptyArgsInstance() {
return new closeIterator_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
@Override
public void onComplete(Void o) {
closeIterator_result result = new closeIterator_result();
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
@Override
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
closeIterator_result result = new closeIterator_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
@Override
protected boolean isOneway() {
return false;
}
@Override
public void start(I iface, closeIterator_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.closeIterator(args.iteratorId,resultHandler);
}
}
public static class seekTo<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, seekTo_args, Void> {
public seekTo() {
super("seekTo");
}
@Override
public seekTo_args getEmptyArgsInstance() {
return new seekTo_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
@Override
public void onComplete(Void o) {
seekTo_result result = new seekTo_result();
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
@Override
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
seekTo_result result = new seekTo_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
@Override
protected boolean isOneway() {
return false;
}
@Override
public void start(I iface, seekTo_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.seekTo(args.iterationId, args.keys,resultHandler);
}
}
public static class subsequent<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, subsequent_args, Void> {
public subsequent() {
super("subsequent");
}
@Override
public subsequent_args getEmptyArgsInstance() {
return new subsequent_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
@Override
public void onComplete(Void o) {
}
@Override
public void onError(java.lang.Exception e) {
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
} else {
_LOGGER.error("Exception inside oneway handler", e);
}
}
};
}
@Override
protected boolean isOneway() {
return true;
}
@Override
public void start(I iface, subsequent_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.subsequent(args.iterationId, args.skipCount, args.takeCount,resultHandler);
}
}
public static class subsequentExists<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, subsequentExists_args, java.lang.Boolean> {
public subsequentExists() {
super("subsequentExists");
}
@Override
public subsequentExists_args getEmptyArgsInstance() {
return new subsequentExists_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
@Override
public void onComplete(java.lang.Boolean o) {
subsequentExists_result result = new subsequentExists_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
@Override
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
subsequentExists_result result = new subsequentExists_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
@Override
protected boolean isOneway() {
return false;
}
@Override
public void start(I iface, subsequentExists_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.subsequentExists(args.iterationId, args.skipCount, args.takeCount,resultHandler);
}
}
public static class subsequentMultiGet<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, subsequentMultiGet_args, java.util.List<OptionalBinary>> {
public subsequentMultiGet() {
super("subsequentMultiGet");
}
@Override
public subsequentMultiGet_args getEmptyArgsInstance() {
return new subsequentMultiGet_args();
}
@Override
public org.apache.thrift.async.AsyncMethodCallback<java.util.List<OptionalBinary>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<OptionalBinary>>() {
@Override
public void onComplete(java.util.List<OptionalBinary> o) {
subsequentMultiGet_result result = new subsequentMultiGet_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
@Override
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
subsequentMultiGet_result result = new subsequentMultiGet_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
@Override
protected boolean isOneway() {
return false;
}
@Override
public void start(I iface, subsequentMultiGet_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<OptionalBinary>> resultHandler) throws org.apache.thrift.TException {
iface.subsequentMultiGet(args.iterationId, args.skipCount, args.takeCount,resultHandler);
}
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class openTransaction_args implements org.apache.thrift.TBase<openTransaction_args, openTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<openTransaction_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("openTransaction_args");
private static final org.apache.thrift.protocol.TField TIMEOUT_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("timeoutMs", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new openTransaction_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new openTransaction_argsTupleSchemeFactory();
public long timeoutMs; // 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 {
TIMEOUT_MS((short)1, "timeoutMs");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TIMEOUT_MS
return TIMEOUT_MS;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __TIMEOUTMS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TIMEOUT_MS, new org.apache.thrift.meta_data.FieldMetaData("timeoutMs", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(openTransaction_args.class, metaDataMap);
}
public openTransaction_args() {
}
public openTransaction_args(
long timeoutMs)
{
this();
this.timeoutMs = timeoutMs;
setTimeoutMsIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public openTransaction_args(openTransaction_args other) {
__isset_bitfield = other.__isset_bitfield;
this.timeoutMs = other.timeoutMs;
}
@Override
public openTransaction_args deepCopy() {
return new openTransaction_args(this);
}
@Override
public void clear() {
setTimeoutMsIsSet(false);
this.timeoutMs = 0;
}
public long getTimeoutMs() {
return this.timeoutMs;
}
public openTransaction_args setTimeoutMs(long timeoutMs) {
this.timeoutMs = timeoutMs;
setTimeoutMsIsSet(true);
return this;
}
public void unsetTimeoutMs() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID);
}
/** Returns true if field timeoutMs is set (has been assigned a value) and false otherwise */
public boolean isSetTimeoutMs() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID);
}
public void setTimeoutMsIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TIMEOUT_MS:
if (value == null) {
unsetTimeoutMs();
} else {
setTimeoutMs((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TIMEOUT_MS:
return getTimeoutMs();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case TIMEOUT_MS:
return isSetTimeoutMs();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof openTransaction_args)
return this.equals((openTransaction_args)that);
return false;
}
public boolean equals(openTransaction_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_timeoutMs = true;
boolean that_present_timeoutMs = true;
if (this_present_timeoutMs || that_present_timeoutMs) {
if (!(this_present_timeoutMs && that_present_timeoutMs))
return false;
if (this.timeoutMs != that.timeoutMs)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeoutMs);
return hashCode;
}
@Override
public int compareTo(openTransaction_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetTimeoutMs(), other.isSetTimeoutMs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimeoutMs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeoutMs, other.timeoutMs);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("openTransaction_args(");
boolean first = true;
sb.append("timeoutMs:");
sb.append(this.timeoutMs);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'timeoutMs' because it's a primitive and you chose the non-beans generator.
// 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, java.lang.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 openTransaction_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public openTransaction_argsStandardScheme getScheme() {
return new openTransaction_argsStandardScheme();
}
}
private static class openTransaction_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<openTransaction_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, openTransaction_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: // TIMEOUT_MS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timeoutMs = iprot.readI64();
struct.setTimeoutMsIsSet(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
if (!struct.isSetTimeoutMs()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'timeoutMs' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, openTransaction_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(TIMEOUT_MS_FIELD_DESC);
oprot.writeI64(struct.timeoutMs);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class openTransaction_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public openTransaction_argsTupleScheme getScheme() {
return new openTransaction_argsTupleScheme();
}
}
private static class openTransaction_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<openTransaction_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, openTransaction_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.timeoutMs);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, openTransaction_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.timeoutMs = iprot.readI64();
struct.setTimeoutMsIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class openTransaction_result implements org.apache.thrift.TBase<openTransaction_result, openTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<openTransaction_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("openTransaction_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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new openTransaction_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new openTransaction_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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(openTransaction_result.class, metaDataMap);
}
public openTransaction_result() {
}
public openTransaction_result(
long success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public openTransaction_result(openTransaction_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
}
@Override
public openTransaction_result deepCopy() {
return new openTransaction_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = 0;
}
public long getSuccess() {
return this.success;
}
public openTransaction_result setSuccess(long success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof openTransaction_result)
return this.equals((openTransaction_result)that);
return false;
}
public boolean equals(openTransaction_result that) {
if (that == null)
return false;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success);
return hashCode;
}
@Override
public int compareTo(openTransaction_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("openTransaction_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, java.lang.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 openTransaction_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public openTransaction_resultStandardScheme getScheme() {
return new openTransaction_resultStandardScheme();
}
}
private static class openTransaction_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<openTransaction_result> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, openTransaction_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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, openTransaction_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 openTransaction_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public openTransaction_resultTupleScheme getScheme() {
return new openTransaction_resultTupleScheme();
}
}
private static class openTransaction_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<openTransaction_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, openTransaction_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.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, openTransaction_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readI64();
struct.setSuccessIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class closeTransaction_args implements org.apache.thrift.TBase<closeTransaction_args, closeTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeTransaction_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeTransaction_args");
private static final org.apache.thrift.protocol.TField TIMEOUT_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("timeoutMs", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField COMMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("commit", org.apache.thrift.protocol.TType.BOOL, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeTransaction_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeTransaction_argsTupleSchemeFactory();
public long timeoutMs; // required
public boolean commit; // 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 {
TIMEOUT_MS((short)1, "timeoutMs"),
COMMIT((short)2, "commit");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TIMEOUT_MS
return TIMEOUT_MS;
case 2: // COMMIT
return COMMIT;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __TIMEOUTMS_ISSET_ID = 0;
private static final int __COMMIT_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TIMEOUT_MS, new org.apache.thrift.meta_data.FieldMetaData("timeoutMs", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.COMMIT, new org.apache.thrift.meta_data.FieldMetaData("commit", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeTransaction_args.class, metaDataMap);
}
public closeTransaction_args() {
}
public closeTransaction_args(
long timeoutMs,
boolean commit)
{
this();
this.timeoutMs = timeoutMs;
setTimeoutMsIsSet(true);
this.commit = commit;
setCommitIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public closeTransaction_args(closeTransaction_args other) {
__isset_bitfield = other.__isset_bitfield;
this.timeoutMs = other.timeoutMs;
this.commit = other.commit;
}
@Override
public closeTransaction_args deepCopy() {
return new closeTransaction_args(this);
}
@Override
public void clear() {
setTimeoutMsIsSet(false);
this.timeoutMs = 0;
setCommitIsSet(false);
this.commit = false;
}
public long getTimeoutMs() {
return this.timeoutMs;
}
public closeTransaction_args setTimeoutMs(long timeoutMs) {
this.timeoutMs = timeoutMs;
setTimeoutMsIsSet(true);
return this;
}
public void unsetTimeoutMs() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID);
}
/** Returns true if field timeoutMs is set (has been assigned a value) and false otherwise */
public boolean isSetTimeoutMs() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID);
}
public void setTimeoutMsIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID, value);
}
public boolean isCommit() {
return this.commit;
}
public closeTransaction_args setCommit(boolean commit) {
this.commit = commit;
setCommitIsSet(true);
return this;
}
public void unsetCommit() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COMMIT_ISSET_ID);
}
/** Returns true if field commit is set (has been assigned a value) and false otherwise */
public boolean isSetCommit() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMMIT_ISSET_ID);
}
public void setCommitIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COMMIT_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TIMEOUT_MS:
if (value == null) {
unsetTimeoutMs();
} else {
setTimeoutMs((java.lang.Long)value);
}
break;
case COMMIT:
if (value == null) {
unsetCommit();
} else {
setCommit((java.lang.Boolean)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TIMEOUT_MS:
return getTimeoutMs();
case COMMIT:
return isCommit();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case TIMEOUT_MS:
return isSetTimeoutMs();
case COMMIT:
return isSetCommit();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof closeTransaction_args)
return this.equals((closeTransaction_args)that);
return false;
}
public boolean equals(closeTransaction_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_timeoutMs = true;
boolean that_present_timeoutMs = true;
if (this_present_timeoutMs || that_present_timeoutMs) {
if (!(this_present_timeoutMs && that_present_timeoutMs))
return false;
if (this.timeoutMs != that.timeoutMs)
return false;
}
boolean this_present_commit = true;
boolean that_present_commit = true;
if (this_present_commit || that_present_commit) {
if (!(this_present_commit && that_present_commit))
return false;
if (this.commit != that.commit)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeoutMs);
hashCode = hashCode * 8191 + ((commit) ? 131071 : 524287);
return hashCode;
}
@Override
public int compareTo(closeTransaction_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetTimeoutMs(), other.isSetTimeoutMs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimeoutMs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeoutMs, other.timeoutMs);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCommit(), other.isSetCommit());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCommit()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.commit, other.commit);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("closeTransaction_args(");
boolean first = true;
sb.append("timeoutMs:");
sb.append(this.timeoutMs);
first = false;
if (!first) sb.append(", ");
sb.append("commit:");
sb.append(this.commit);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'timeoutMs' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'commit' because it's a primitive and you chose the non-beans generator.
// 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, java.lang.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 closeTransaction_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public closeTransaction_argsStandardScheme getScheme() {
return new closeTransaction_argsStandardScheme();
}
}
private static class closeTransaction_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<closeTransaction_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, closeTransaction_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: // TIMEOUT_MS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timeoutMs = iprot.readI64();
struct.setTimeoutMsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // COMMIT
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.commit = iprot.readBool();
struct.setCommitIsSet(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
if (!struct.isSetTimeoutMs()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'timeoutMs' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetCommit()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'commit' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, closeTransaction_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(TIMEOUT_MS_FIELD_DESC);
oprot.writeI64(struct.timeoutMs);
oprot.writeFieldEnd();
oprot.writeFieldBegin(COMMIT_FIELD_DESC);
oprot.writeBool(struct.commit);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class closeTransaction_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public closeTransaction_argsTupleScheme getScheme() {
return new closeTransaction_argsTupleScheme();
}
}
private static class closeTransaction_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<closeTransaction_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, closeTransaction_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.timeoutMs);
oprot.writeBool(struct.commit);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, closeTransaction_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.timeoutMs = iprot.readI64();
struct.setTimeoutMsIsSet(true);
struct.commit = iprot.readBool();
struct.setCommitIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class closeTransaction_result implements org.apache.thrift.TBase<closeTransaction_result, closeTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeTransaction_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeTransaction_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeTransaction_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeTransaction_resultTupleSchemeFactory();
public boolean 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.BOOL)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeTransaction_result.class, metaDataMap);
}
public closeTransaction_result() {
}
public closeTransaction_result(
boolean success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public closeTransaction_result(closeTransaction_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
}
@Override
public closeTransaction_result deepCopy() {
return new closeTransaction_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
}
public boolean isSuccess() {
return this.success;
}
public closeTransaction_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof closeTransaction_result)
return this.equals((closeTransaction_result)that);
return false;
}
public boolean equals(closeTransaction_result that) {
if (that == null)
return false;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
return hashCode;
}
@Override
public int compareTo(closeTransaction_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("closeTransaction_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, java.lang.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 closeTransaction_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public closeTransaction_resultStandardScheme getScheme() {
return new closeTransaction_resultStandardScheme();
}
}
private static class closeTransaction_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<closeTransaction_result> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, closeTransaction_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.BOOL) {
struct.success = iprot.readBool();
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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, closeTransaction_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class closeTransaction_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public closeTransaction_resultTupleScheme getScheme() {
return new closeTransaction_resultTupleScheme();
}
}
private static class closeTransaction_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<closeTransaction_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, closeTransaction_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, closeTransaction_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class closeFailedUpdate_args implements org.apache.thrift.TBase<closeFailedUpdate_args, closeFailedUpdate_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeFailedUpdate_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeFailedUpdate_args");
private static final org.apache.thrift.protocol.TField UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("updateId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeFailedUpdate_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeFailedUpdate_argsTupleSchemeFactory();
public long updateId; // 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 {
UPDATE_ID((short)1, "updateId");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // UPDATE_ID
return UPDATE_ID;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __UPDATEID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("updateId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeFailedUpdate_args.class, metaDataMap);
}
public closeFailedUpdate_args() {
}
public closeFailedUpdate_args(
long updateId)
{
this();
this.updateId = updateId;
setUpdateIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public closeFailedUpdate_args(closeFailedUpdate_args other) {
__isset_bitfield = other.__isset_bitfield;
this.updateId = other.updateId;
}
@Override
public closeFailedUpdate_args deepCopy() {
return new closeFailedUpdate_args(this);
}
@Override
public void clear() {
setUpdateIdIsSet(false);
this.updateId = 0;
}
public long getUpdateId() {
return this.updateId;
}
public closeFailedUpdate_args setUpdateId(long updateId) {
this.updateId = updateId;
setUpdateIdIsSet(true);
return this;
}
public void unsetUpdateId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPDATEID_ISSET_ID);
}
/** Returns true if field updateId is set (has been assigned a value) and false otherwise */
public boolean isSetUpdateId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPDATEID_ISSET_ID);
}
public void setUpdateIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPDATEID_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case UPDATE_ID:
if (value == null) {
unsetUpdateId();
} else {
setUpdateId((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case UPDATE_ID:
return getUpdateId();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case UPDATE_ID:
return isSetUpdateId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof closeFailedUpdate_args)
return this.equals((closeFailedUpdate_args)that);
return false;
}
public boolean equals(closeFailedUpdate_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_updateId = true;
boolean that_present_updateId = true;
if (this_present_updateId || that_present_updateId) {
if (!(this_present_updateId && that_present_updateId))
return false;
if (this.updateId != that.updateId)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(updateId);
return hashCode;
}
@Override
public int compareTo(closeFailedUpdate_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetUpdateId(), other.isSetUpdateId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUpdateId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateId, other.updateId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("closeFailedUpdate_args(");
boolean first = true;
sb.append("updateId:");
sb.append(this.updateId);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'updateId' because it's a primitive and you chose the non-beans generator.
// 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, java.lang.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 closeFailedUpdate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public closeFailedUpdate_argsStandardScheme getScheme() {
return new closeFailedUpdate_argsStandardScheme();
}
}
private static class closeFailedUpdate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<closeFailedUpdate_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, closeFailedUpdate_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: // UPDATE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.updateId = iprot.readI64();
struct.setUpdateIdIsSet(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
if (!struct.isSetUpdateId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'updateId' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, closeFailedUpdate_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(UPDATE_ID_FIELD_DESC);
oprot.writeI64(struct.updateId);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class closeFailedUpdate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public closeFailedUpdate_argsTupleScheme getScheme() {
return new closeFailedUpdate_argsTupleScheme();
}
}
private static class closeFailedUpdate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<closeFailedUpdate_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, closeFailedUpdate_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.updateId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, closeFailedUpdate_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.updateId = iprot.readI64();
struct.setUpdateIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class closeFailedUpdate_result implements org.apache.thrift.TBase<closeFailedUpdate_result, closeFailedUpdate_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeFailedUpdate_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeFailedUpdate_result");
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeFailedUpdate_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeFailedUpdate_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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeFailedUpdate_result.class, metaDataMap);
}
public closeFailedUpdate_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public closeFailedUpdate_result(closeFailedUpdate_result other) {
}
@Override
public closeFailedUpdate_result deepCopy() {
return new closeFailedUpdate_result(this);
}
@Override
public void clear() {
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof closeFailedUpdate_result)
return this.equals((closeFailedUpdate_result)that);
return false;
}
public boolean equals(closeFailedUpdate_result that) {
if (that == null)
return false;
if (this == that)
return true;
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
return hashCode;
}
@Override
public int compareTo(closeFailedUpdate_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("closeFailedUpdate_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, java.lang.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 closeFailedUpdate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public closeFailedUpdate_resultStandardScheme getScheme() {
return new closeFailedUpdate_resultStandardScheme();
}
}
private static class closeFailedUpdate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<closeFailedUpdate_result> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, closeFailedUpdate_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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, closeFailedUpdate_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class closeFailedUpdate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public closeFailedUpdate_resultTupleScheme getScheme() {
return new closeFailedUpdate_resultTupleScheme();
}
}
private static class closeFailedUpdate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<closeFailedUpdate_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, closeFailedUpdate_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, closeFailedUpdate_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class createColumn_args implements org.apache.thrift.TBase<createColumn_args, createColumn_args._Fields>, java.io.Serializable, Cloneable, Comparable<createColumn_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createColumn_args");
private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField SCHEMA_FIELD_DESC = new org.apache.thrift.protocol.TField("schema", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createColumn_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createColumn_argsTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
public @org.apache.thrift.annotation.Nullable ColumnSchema schema; // 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 {
NAME((short)1, "name"),
SCHEMA((short)2, "schema");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // NAME
return NAME;
case 2: // SCHEMA
return SCHEMA;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.SCHEMA, new org.apache.thrift.meta_data.FieldMetaData("schema", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnSchema.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createColumn_args.class, metaDataMap);
}
public createColumn_args() {
}
public createColumn_args(
java.lang.String name,
ColumnSchema schema)
{
this();
this.name = name;
this.schema = schema;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public createColumn_args(createColumn_args other) {
if (other.isSetName()) {
this.name = other.name;
}
if (other.isSetSchema()) {
this.schema = new ColumnSchema(other.schema);
}
}
@Override
public createColumn_args deepCopy() {
return new createColumn_args(this);
}
@Override
public void clear() {
this.name = null;
this.schema = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getName() {
return this.name;
}
public createColumn_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
this.name = name;
return this;
}
public void unsetName() {
this.name = null;
}
/** Returns true if field name is set (has been assigned a value) and false otherwise */
public boolean isSetName() {
return this.name != null;
}
public void setNameIsSet(boolean value) {
if (!value) {
this.name = null;
}
}
@org.apache.thrift.annotation.Nullable
public ColumnSchema getSchema() {
return this.schema;
}
public createColumn_args setSchema(@org.apache.thrift.annotation.Nullable ColumnSchema schema) {
this.schema = schema;
return this;
}
public void unsetSchema() {
this.schema = null;
}
/** Returns true if field schema is set (has been assigned a value) and false otherwise */
public boolean isSetSchema() {
return this.schema != null;
}
public void setSchemaIsSet(boolean value) {
if (!value) {
this.schema = null;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case NAME:
if (value == null) {
unsetName();
} else {
setName((java.lang.String)value);
}
break;
case SCHEMA:
if (value == null) {
unsetSchema();
} else {
setSchema((ColumnSchema)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NAME:
return getName();
case SCHEMA:
return getSchema();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case NAME:
return isSetName();
case SCHEMA:
return isSetSchema();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof createColumn_args)
return this.equals((createColumn_args)that);
return false;
}
public boolean equals(createColumn_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_name = true && this.isSetName();
boolean that_present_name = true && that.isSetName();
if (this_present_name || that_present_name) {
if (!(this_present_name && that_present_name))
return false;
if (!this.name.equals(that.name))
return false;
}
boolean this_present_schema = true && this.isSetSchema();
boolean that_present_schema = true && that.isSetSchema();
if (this_present_schema || that_present_schema) {
if (!(this_present_schema && that_present_schema))
return false;
if (!this.schema.equals(that.schema))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
if (isSetName())
hashCode = hashCode * 8191 + name.hashCode();
hashCode = hashCode * 8191 + ((isSetSchema()) ? 131071 : 524287);
if (isSetSchema())
hashCode = hashCode * 8191 + schema.hashCode();
return hashCode;
}
@Override
public int compareTo(createColumn_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSchema(), other.isSetSchema());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSchema()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schema, other.schema);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("createColumn_args(");
boolean first = true;
sb.append("name:");
if (this.name == null) {
sb.append("null");
} else {
sb.append(this.name);
}
first = false;
if (!first) sb.append(", ");
sb.append("schema:");
if (this.schema == null) {
sb.append("null");
} else {
sb.append(this.schema);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (name == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
}
if (schema == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'schema' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (schema != null) {
schema.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 createColumn_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public createColumn_argsStandardScheme getScheme() {
return new createColumn_argsStandardScheme();
}
}
private static class createColumn_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<createColumn_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, createColumn_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: // NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.name = iprot.readString();
struct.setNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // SCHEMA
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.schema = new ColumnSchema();
struct.schema.read(iprot);
struct.setSchemaIsSet(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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, createColumn_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.name != null) {
oprot.writeFieldBegin(NAME_FIELD_DESC);
oprot.writeString(struct.name);
oprot.writeFieldEnd();
}
if (struct.schema != null) {
oprot.writeFieldBegin(SCHEMA_FIELD_DESC);
struct.schema.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createColumn_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public createColumn_argsTupleScheme getScheme() {
return new createColumn_argsTupleScheme();
}
}
private static class createColumn_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<createColumn_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createColumn_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.name);
struct.schema.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createColumn_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.name = iprot.readString();
struct.setNameIsSet(true);
struct.schema = new ColumnSchema();
struct.schema.read(iprot);
struct.setSchemaIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class createColumn_result implements org.apache.thrift.TBase<createColumn_result, createColumn_result._Fields>, java.io.Serializable, Cloneable, Comparable<createColumn_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createColumn_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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createColumn_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createColumn_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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createColumn_result.class, metaDataMap);
}
public createColumn_result() {
}
public createColumn_result(
long success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public createColumn_result(createColumn_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
}
@Override
public createColumn_result deepCopy() {
return new createColumn_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = 0;
}
public long getSuccess() {
return this.success;
}
public createColumn_result setSuccess(long success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof createColumn_result)
return this.equals((createColumn_result)that);
return false;
}
public boolean equals(createColumn_result that) {
if (that == null)
return false;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success);
return hashCode;
}
@Override
public int compareTo(createColumn_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("createColumn_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, java.lang.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 createColumn_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public createColumn_resultStandardScheme getScheme() {
return new createColumn_resultStandardScheme();
}
}
private static class createColumn_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<createColumn_result> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, createColumn_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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, createColumn_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 createColumn_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public createColumn_resultTupleScheme getScheme() {
return new createColumn_resultTupleScheme();
}
}
private static class createColumn_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<createColumn_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createColumn_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.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, createColumn_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readI64();
struct.setSuccessIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class deleteColumn_args implements org.apache.thrift.TBase<deleteColumn_args, deleteColumn_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteColumn_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteColumn_args");
private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteColumn_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteColumn_argsTupleSchemeFactory();
public long columnId; // 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 {
COLUMN_ID((short)1, "columnId");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // COLUMN_ID
return COLUMN_ID;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __COLUMNID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteColumn_args.class, metaDataMap);
}
public deleteColumn_args() {
}
public deleteColumn_args(
long columnId)
{
this();
this.columnId = columnId;
setColumnIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteColumn_args(deleteColumn_args other) {
__isset_bitfield = other.__isset_bitfield;
this.columnId = other.columnId;
}
@Override
public deleteColumn_args deepCopy() {
return new deleteColumn_args(this);
}
@Override
public void clear() {
setColumnIdIsSet(false);
this.columnId = 0;
}
public long getColumnId() {
return this.columnId;
}
public deleteColumn_args setColumnId(long columnId) {
this.columnId = columnId;
setColumnIdIsSet(true);
return this;
}
public void unsetColumnId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
/** Returns true if field columnId is set (has been assigned a value) and false otherwise */
public boolean isSetColumnId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
public void setColumnIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case COLUMN_ID:
if (value == null) {
unsetColumnId();
} else {
setColumnId((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case COLUMN_ID:
return getColumnId();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case COLUMN_ID:
return isSetColumnId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof deleteColumn_args)
return this.equals((deleteColumn_args)that);
return false;
}
public boolean equals(deleteColumn_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_columnId = true;
boolean that_present_columnId = true;
if (this_present_columnId || that_present_columnId) {
if (!(this_present_columnId && that_present_columnId))
return false;
if (this.columnId != that.columnId)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId);
return hashCode;
}
@Override
public int compareTo(deleteColumn_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteColumn_args(");
boolean first = true;
sb.append("columnId:");
sb.append(this.columnId);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator.
// 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, java.lang.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 deleteColumn_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public deleteColumn_argsStandardScheme getScheme() {
return new deleteColumn_argsStandardScheme();
}
}
private static class deleteColumn_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<deleteColumn_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteColumn_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: // COLUMN_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(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
if (!struct.isSetColumnId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, deleteColumn_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC);
oprot.writeI64(struct.columnId);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteColumn_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public deleteColumn_argsTupleScheme getScheme() {
return new deleteColumn_argsTupleScheme();
}
}
private static class deleteColumn_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<deleteColumn_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteColumn_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.columnId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteColumn_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class deleteColumn_result implements org.apache.thrift.TBase<deleteColumn_result, deleteColumn_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteColumn_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteColumn_result");
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteColumn_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteColumn_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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteColumn_result.class, metaDataMap);
}
public deleteColumn_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteColumn_result(deleteColumn_result other) {
}
@Override
public deleteColumn_result deepCopy() {
return new deleteColumn_result(this);
}
@Override
public void clear() {
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof deleteColumn_result)
return this.equals((deleteColumn_result)that);
return false;
}
public boolean equals(deleteColumn_result that) {
if (that == null)
return false;
if (this == that)
return true;
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
return hashCode;
}
@Override
public int compareTo(deleteColumn_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteColumn_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, java.lang.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 deleteColumn_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public deleteColumn_resultStandardScheme getScheme() {
return new deleteColumn_resultStandardScheme();
}
}
private static class deleteColumn_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<deleteColumn_result> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteColumn_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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, deleteColumn_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteColumn_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public deleteColumn_resultTupleScheme getScheme() {
return new deleteColumn_resultTupleScheme();
}
}
private static class deleteColumn_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<deleteColumn_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteColumn_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteColumn_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getColumnId_args implements org.apache.thrift.TBase<getColumnId_args, getColumnId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getColumnId_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getColumnId_args");
private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getColumnId_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getColumnId_argsTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
NAME((short)1, "name");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // NAME
return NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getColumnId_args.class, metaDataMap);
}
public getColumnId_args() {
}
public getColumnId_args(
java.lang.String name)
{
this();
this.name = name;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getColumnId_args(getColumnId_args other) {
if (other.isSetName()) {
this.name = other.name;
}
}
@Override
public getColumnId_args deepCopy() {
return new getColumnId_args(this);
}
@Override
public void clear() {
this.name = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getName() {
return this.name;
}
public getColumnId_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
this.name = name;
return this;
}
public void unsetName() {
this.name = null;
}
/** Returns true if field name is set (has been assigned a value) and false otherwise */
public boolean isSetName() {
return this.name != null;
}
public void setNameIsSet(boolean value) {
if (!value) {
this.name = null;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case NAME:
if (value == null) {
unsetName();
} else {
setName((java.lang.String)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NAME:
return getName();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case NAME:
return isSetName();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof getColumnId_args)
return this.equals((getColumnId_args)that);
return false;
}
public boolean equals(getColumnId_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_name = true && this.isSetName();
boolean that_present_name = true && that.isSetName();
if (this_present_name || that_present_name) {
if (!(this_present_name && that_present_name))
return false;
if (!this.name.equals(that.name))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
if (isSetName())
hashCode = hashCode * 8191 + name.hashCode();
return hashCode;
}
@Override
public int compareTo(getColumnId_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getColumnId_args(");
boolean first = true;
sb.append("name:");
if (this.name == null) {
sb.append("null");
} else {
sb.append(this.name);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (name == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
}
// 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, java.lang.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 getColumnId_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public getColumnId_argsStandardScheme getScheme() {
return new getColumnId_argsStandardScheme();
}
}
private static class getColumnId_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getColumnId_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getColumnId_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: // NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.name = iprot.readString();
struct.setNameIsSet(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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getColumnId_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.name != null) {
oprot.writeFieldBegin(NAME_FIELD_DESC);
oprot.writeString(struct.name);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getColumnId_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public getColumnId_argsTupleScheme getScheme() {
return new getColumnId_argsTupleScheme();
}
}
private static class getColumnId_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getColumnId_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getColumnId_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.name);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getColumnId_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.name = iprot.readString();
struct.setNameIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getColumnId_result implements org.apache.thrift.TBase<getColumnId_result, getColumnId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getColumnId_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getColumnId_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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getColumnId_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getColumnId_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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getColumnId_result.class, metaDataMap);
}
public getColumnId_result() {
}
public getColumnId_result(
long success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getColumnId_result(getColumnId_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
}
@Override
public getColumnId_result deepCopy() {
return new getColumnId_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = 0;
}
public long getSuccess() {
return this.success;
}
public getColumnId_result setSuccess(long success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof getColumnId_result)
return this.equals((getColumnId_result)that);
return false;
}
public boolean equals(getColumnId_result that) {
if (that == null)
return false;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success);
return hashCode;
}
@Override
public int compareTo(getColumnId_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getColumnId_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, java.lang.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 getColumnId_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public getColumnId_resultStandardScheme getScheme() {
return new getColumnId_resultStandardScheme();
}
}
private static class getColumnId_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getColumnId_result> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getColumnId_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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getColumnId_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 getColumnId_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public getColumnId_resultTupleScheme getScheme() {
return new getColumnId_resultTupleScheme();
}
}
private static class getColumnId_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getColumnId_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getColumnId_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.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, getColumnId_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readI64();
struct.setSuccessIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class put_args implements org.apache.thrift.TBase<put_args, put_args._Fields>, java.io.Serializable, Cloneable, Comparable<put_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("put_args");
private static final org.apache.thrift.protocol.TField TRANSACTION_OR_UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionOrUpdateId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new put_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new put_argsTupleSchemeFactory();
public long transactionOrUpdateId; // required
public long columnId; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> keys; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value; // 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 {
TRANSACTION_OR_UPDATE_ID((short)1, "transactionOrUpdateId"),
COLUMN_ID((short)2, "columnId"),
KEYS((short)3, "keys"),
VALUE((short)4, "value");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TRANSACTION_OR_UPDATE_ID
return TRANSACTION_OR_UPDATE_ID;
case 2: // COLUMN_ID
return COLUMN_ID;
case 3: // KEYS
return KEYS;
case 4: // VALUE
return VALUE;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __TRANSACTIONORUPDATEID_ISSET_ID = 0;
private static final int __COLUMNID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TRANSACTION_OR_UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionOrUpdateId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_args.class, metaDataMap);
}
public put_args() {
}
public put_args(
long transactionOrUpdateId,
long columnId,
java.util.List<java.nio.ByteBuffer> keys,
java.nio.ByteBuffer value)
{
this();
this.transactionOrUpdateId = transactionOrUpdateId;
setTransactionOrUpdateIdIsSet(true);
this.columnId = columnId;
setColumnIdIsSet(true);
this.keys = keys;
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public put_args(put_args other) {
__isset_bitfield = other.__isset_bitfield;
this.transactionOrUpdateId = other.transactionOrUpdateId;
this.columnId = other.columnId;
if (other.isSetKeys()) {
java.util.List<java.nio.ByteBuffer> __this__keys = new java.util.ArrayList<java.nio.ByteBuffer>(other.keys);
this.keys = __this__keys;
}
if (other.isSetValue()) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value);
}
}
@Override
public put_args deepCopy() {
return new put_args(this);
}
@Override
public void clear() {
setTransactionOrUpdateIdIsSet(false);
this.transactionOrUpdateId = 0;
setColumnIdIsSet(false);
this.columnId = 0;
this.keys = null;
this.value = null;
}
public long getTransactionOrUpdateId() {
return this.transactionOrUpdateId;
}
public put_args setTransactionOrUpdateId(long transactionOrUpdateId) {
this.transactionOrUpdateId = transactionOrUpdateId;
setTransactionOrUpdateIdIsSet(true);
return this;
}
public void unsetTransactionOrUpdateId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID);
}
/** Returns true if field transactionOrUpdateId is set (has been assigned a value) and false otherwise */
public boolean isSetTransactionOrUpdateId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID);
}
public void setTransactionOrUpdateIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID, value);
}
public long getColumnId() {
return this.columnId;
}
public put_args setColumnId(long columnId) {
this.columnId = columnId;
setColumnIdIsSet(true);
return this;
}
public void unsetColumnId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
/** Returns true if field columnId is set (has been assigned a value) and false otherwise */
public boolean isSetColumnId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
public void setColumnIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value);
}
public int getKeysSize() {
return (this.keys == null) ? 0 : this.keys.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.nio.ByteBuffer> getKeysIterator() {
return (this.keys == null) ? null : this.keys.iterator();
}
public void addToKeys(java.nio.ByteBuffer elem) {
if (this.keys == null) {
this.keys = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.keys.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.nio.ByteBuffer> getKeys() {
return this.keys;
}
public put_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> keys) {
this.keys = keys;
return this;
}
public void unsetKeys() {
this.keys = null;
}
/** Returns true if field keys is set (has been assigned a value) and false otherwise */
public boolean isSetKeys() {
return this.keys != null;
}
public void setKeysIsSet(boolean value) {
if (!value) {
this.keys = null;
}
}
public byte[] getValue() {
setValue(org.apache.thrift.TBaseHelper.rightSize(value));
return value == null ? null : value.array();
}
public java.nio.ByteBuffer bufferForValue() {
return org.apache.thrift.TBaseHelper.copyBinary(value);
}
public put_args setValue(byte[] value) {
this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone());
return this;
}
public put_args setValue(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
return this;
}
public void unsetValue() {
this.value = null;
}
/** Returns true if field value is set (has been assigned a value) and false otherwise */
public boolean isSetValue() {
return this.value != null;
}
public void setValueIsSet(boolean value) {
if (!value) {
this.value = null;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
if (value == null) {
unsetTransactionOrUpdateId();
} else {
setTransactionOrUpdateId((java.lang.Long)value);
}
break;
case COLUMN_ID:
if (value == null) {
unsetColumnId();
} else {
setColumnId((java.lang.Long)value);
}
break;
case KEYS:
if (value == null) {
unsetKeys();
} else {
setKeys((java.util.List<java.nio.ByteBuffer>)value);
}
break;
case VALUE:
if (value == null) {
unsetValue();
} else {
if (value instanceof byte[]) {
setValue((byte[])value);
} else {
setValue((java.nio.ByteBuffer)value);
}
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
return getTransactionOrUpdateId();
case COLUMN_ID:
return getColumnId();
case KEYS:
return getKeys();
case VALUE:
return getValue();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
return isSetTransactionOrUpdateId();
case COLUMN_ID:
return isSetColumnId();
case KEYS:
return isSetKeys();
case VALUE:
return isSetValue();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof put_args)
return this.equals((put_args)that);
return false;
}
public boolean equals(put_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_transactionOrUpdateId = true;
boolean that_present_transactionOrUpdateId = true;
if (this_present_transactionOrUpdateId || that_present_transactionOrUpdateId) {
if (!(this_present_transactionOrUpdateId && that_present_transactionOrUpdateId))
return false;
if (this.transactionOrUpdateId != that.transactionOrUpdateId)
return false;
}
boolean this_present_columnId = true;
boolean that_present_columnId = true;
if (this_present_columnId || that_present_columnId) {
if (!(this_present_columnId && that_present_columnId))
return false;
if (this.columnId != that.columnId)
return false;
}
boolean this_present_keys = true && this.isSetKeys();
boolean that_present_keys = true && that.isSetKeys();
if (this_present_keys || that_present_keys) {
if (!(this_present_keys && that_present_keys))
return false;
if (!this.keys.equals(that.keys))
return false;
}
boolean this_present_value = true && this.isSetValue();
boolean that_present_value = true && that.isSetValue();
if (this_present_value || that_present_value) {
if (!(this_present_value && that_present_value))
return false;
if (!this.value.equals(that.value))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionOrUpdateId);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId);
hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287);
if (isSetKeys())
hashCode = hashCode * 8191 + keys.hashCode();
hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287);
if (isSetValue())
hashCode = hashCode * 8191 + value.hashCode();
return hashCode;
}
@Override
public int compareTo(put_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetTransactionOrUpdateId(), other.isSetTransactionOrUpdateId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTransactionOrUpdateId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionOrUpdateId, other.transactionOrUpdateId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetKeys()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetValue(), other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetValue()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("put_args(");
boolean first = true;
sb.append("transactionOrUpdateId:");
sb.append(this.transactionOrUpdateId);
first = false;
if (!first) sb.append(", ");
sb.append("columnId:");
sb.append(this.columnId);
first = false;
if (!first) sb.append(", ");
sb.append("keys:");
if (this.keys == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.keys, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("value:");
if (this.value == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.value, sb);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'transactionOrUpdateId' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator.
if (keys == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString());
}
if (value == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'value' was not present! Struct: " + toString());
}
// 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, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class put_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public put_argsStandardScheme getScheme() {
return new put_argsStandardScheme();
}
}
private static class put_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<put_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, put_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // TRANSACTION_OR_UPDATE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.transactionOrUpdateId = iprot.readI64();
struct.setTransactionOrUpdateIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // COLUMN_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // KEYS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
struct.keys = new java.util.ArrayList<java.nio.ByteBuffer>(_list16.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem17;
for (int _i18 = 0; _i18 < _list16.size; ++_i18)
{
_elem17 = iprot.readBinary();
struct.keys.add(_elem17);
}
iprot.readListEnd();
}
struct.setKeysIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // VALUE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.value = iprot.readBinary();
struct.setValueIsSet(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
if (!struct.isSetTransactionOrUpdateId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionOrUpdateId' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetColumnId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, put_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(TRANSACTION_OR_UPDATE_ID_FIELD_DESC);
oprot.writeI64(struct.transactionOrUpdateId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC);
oprot.writeI64(struct.columnId);
oprot.writeFieldEnd();
if (struct.keys != null) {
oprot.writeFieldBegin(KEYS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size()));
for (java.nio.ByteBuffer _iter19 : struct.keys)
{
oprot.writeBinary(_iter19);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.value != null) {
oprot.writeFieldBegin(VALUE_FIELD_DESC);
oprot.writeBinary(struct.value);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class put_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public put_argsTupleScheme getScheme() {
return new put_argsTupleScheme();
}
}
private static class put_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<put_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, put_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.transactionOrUpdateId);
oprot.writeI64(struct.columnId);
{
oprot.writeI32(struct.keys.size());
for (java.nio.ByteBuffer _iter20 : struct.keys)
{
oprot.writeBinary(_iter20);
}
}
oprot.writeBinary(struct.value);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, put_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.transactionOrUpdateId = iprot.readI64();
struct.setTransactionOrUpdateIdIsSet(true);
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
{
org.apache.thrift.protocol.TList _list21 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.keys = new java.util.ArrayList<java.nio.ByteBuffer>(_list21.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem22;
for (int _i23 = 0; _i23 < _list21.size; ++_i23)
{
_elem22 = iprot.readBinary();
struct.keys.add(_elem22);
}
}
struct.setKeysIsSet(true);
struct.value = iprot.readBinary();
struct.setValueIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class putGetPrevious_args implements org.apache.thrift.TBase<putGetPrevious_args, putGetPrevious_args._Fields>, java.io.Serializable, Cloneable, Comparable<putGetPrevious_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putGetPrevious_args");
private static final org.apache.thrift.protocol.TField TRANSACTION_OR_UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionOrUpdateId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putGetPrevious_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putGetPrevious_argsTupleSchemeFactory();
public long transactionOrUpdateId; // required
public long columnId; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> keys; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value; // 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 {
TRANSACTION_OR_UPDATE_ID((short)1, "transactionOrUpdateId"),
COLUMN_ID((short)2, "columnId"),
KEYS((short)3, "keys"),
VALUE((short)4, "value");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TRANSACTION_OR_UPDATE_ID
return TRANSACTION_OR_UPDATE_ID;
case 2: // COLUMN_ID
return COLUMN_ID;
case 3: // KEYS
return KEYS;
case 4: // VALUE
return VALUE;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __TRANSACTIONORUPDATEID_ISSET_ID = 0;
private static final int __COLUMNID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TRANSACTION_OR_UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionOrUpdateId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putGetPrevious_args.class, metaDataMap);
}
public putGetPrevious_args() {
}
public putGetPrevious_args(
long transactionOrUpdateId,
long columnId,
java.util.List<java.nio.ByteBuffer> keys,
java.nio.ByteBuffer value)
{
this();
this.transactionOrUpdateId = transactionOrUpdateId;
setTransactionOrUpdateIdIsSet(true);
this.columnId = columnId;
setColumnIdIsSet(true);
this.keys = keys;
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public putGetPrevious_args(putGetPrevious_args other) {
__isset_bitfield = other.__isset_bitfield;
this.transactionOrUpdateId = other.transactionOrUpdateId;
this.columnId = other.columnId;
if (other.isSetKeys()) {
java.util.List<java.nio.ByteBuffer> __this__keys = new java.util.ArrayList<java.nio.ByteBuffer>(other.keys);
this.keys = __this__keys;
}
if (other.isSetValue()) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value);
}
}
@Override
public putGetPrevious_args deepCopy() {
return new putGetPrevious_args(this);
}
@Override
public void clear() {
setTransactionOrUpdateIdIsSet(false);
this.transactionOrUpdateId = 0;
setColumnIdIsSet(false);
this.columnId = 0;
this.keys = null;
this.value = null;
}
public long getTransactionOrUpdateId() {
return this.transactionOrUpdateId;
}
public putGetPrevious_args setTransactionOrUpdateId(long transactionOrUpdateId) {
this.transactionOrUpdateId = transactionOrUpdateId;
setTransactionOrUpdateIdIsSet(true);
return this;
}
public void unsetTransactionOrUpdateId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID);
}
/** Returns true if field transactionOrUpdateId is set (has been assigned a value) and false otherwise */
public boolean isSetTransactionOrUpdateId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID);
}
public void setTransactionOrUpdateIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID, value);
}
public long getColumnId() {
return this.columnId;
}
public putGetPrevious_args setColumnId(long columnId) {
this.columnId = columnId;
setColumnIdIsSet(true);
return this;
}
public void unsetColumnId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
/** Returns true if field columnId is set (has been assigned a value) and false otherwise */
public boolean isSetColumnId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
public void setColumnIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value);
}
public int getKeysSize() {
return (this.keys == null) ? 0 : this.keys.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.nio.ByteBuffer> getKeysIterator() {
return (this.keys == null) ? null : this.keys.iterator();
}
public void addToKeys(java.nio.ByteBuffer elem) {
if (this.keys == null) {
this.keys = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.keys.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.nio.ByteBuffer> getKeys() {
return this.keys;
}
public putGetPrevious_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> keys) {
this.keys = keys;
return this;
}
public void unsetKeys() {
this.keys = null;
}
/** Returns true if field keys is set (has been assigned a value) and false otherwise */
public boolean isSetKeys() {
return this.keys != null;
}
public void setKeysIsSet(boolean value) {
if (!value) {
this.keys = null;
}
}
public byte[] getValue() {
setValue(org.apache.thrift.TBaseHelper.rightSize(value));
return value == null ? null : value.array();
}
public java.nio.ByteBuffer bufferForValue() {
return org.apache.thrift.TBaseHelper.copyBinary(value);
}
public putGetPrevious_args setValue(byte[] value) {
this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone());
return this;
}
public putGetPrevious_args setValue(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
return this;
}
public void unsetValue() {
this.value = null;
}
/** Returns true if field value is set (has been assigned a value) and false otherwise */
public boolean isSetValue() {
return this.value != null;
}
public void setValueIsSet(boolean value) {
if (!value) {
this.value = null;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
if (value == null) {
unsetTransactionOrUpdateId();
} else {
setTransactionOrUpdateId((java.lang.Long)value);
}
break;
case COLUMN_ID:
if (value == null) {
unsetColumnId();
} else {
setColumnId((java.lang.Long)value);
}
break;
case KEYS:
if (value == null) {
unsetKeys();
} else {
setKeys((java.util.List<java.nio.ByteBuffer>)value);
}
break;
case VALUE:
if (value == null) {
unsetValue();
} else {
if (value instanceof byte[]) {
setValue((byte[])value);
} else {
setValue((java.nio.ByteBuffer)value);
}
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
return getTransactionOrUpdateId();
case COLUMN_ID:
return getColumnId();
case KEYS:
return getKeys();
case VALUE:
return getValue();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
return isSetTransactionOrUpdateId();
case COLUMN_ID:
return isSetColumnId();
case KEYS:
return isSetKeys();
case VALUE:
return isSetValue();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof putGetPrevious_args)
return this.equals((putGetPrevious_args)that);
return false;
}
public boolean equals(putGetPrevious_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_transactionOrUpdateId = true;
boolean that_present_transactionOrUpdateId = true;
if (this_present_transactionOrUpdateId || that_present_transactionOrUpdateId) {
if (!(this_present_transactionOrUpdateId && that_present_transactionOrUpdateId))
return false;
if (this.transactionOrUpdateId != that.transactionOrUpdateId)
return false;
}
boolean this_present_columnId = true;
boolean that_present_columnId = true;
if (this_present_columnId || that_present_columnId) {
if (!(this_present_columnId && that_present_columnId))
return false;
if (this.columnId != that.columnId)
return false;
}
boolean this_present_keys = true && this.isSetKeys();
boolean that_present_keys = true && that.isSetKeys();
if (this_present_keys || that_present_keys) {
if (!(this_present_keys && that_present_keys))
return false;
if (!this.keys.equals(that.keys))
return false;
}
boolean this_present_value = true && this.isSetValue();
boolean that_present_value = true && that.isSetValue();
if (this_present_value || that_present_value) {
if (!(this_present_value && that_present_value))
return false;
if (!this.value.equals(that.value))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionOrUpdateId);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId);
hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287);
if (isSetKeys())
hashCode = hashCode * 8191 + keys.hashCode();
hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287);
if (isSetValue())
hashCode = hashCode * 8191 + value.hashCode();
return hashCode;
}
@Override
public int compareTo(putGetPrevious_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetTransactionOrUpdateId(), other.isSetTransactionOrUpdateId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTransactionOrUpdateId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionOrUpdateId, other.transactionOrUpdateId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetKeys()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetValue(), other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetValue()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("putGetPrevious_args(");
boolean first = true;
sb.append("transactionOrUpdateId:");
sb.append(this.transactionOrUpdateId);
first = false;
if (!first) sb.append(", ");
sb.append("columnId:");
sb.append(this.columnId);
first = false;
if (!first) sb.append(", ");
sb.append("keys:");
if (this.keys == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.keys, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("value:");
if (this.value == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.value, sb);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'transactionOrUpdateId' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator.
if (keys == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString());
}
if (value == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'value' was not present! Struct: " + toString());
}
// 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, java.lang.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 putGetPrevious_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public putGetPrevious_argsStandardScheme getScheme() {
return new putGetPrevious_argsStandardScheme();
}
}
private static class putGetPrevious_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<putGetPrevious_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, putGetPrevious_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: // TRANSACTION_OR_UPDATE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.transactionOrUpdateId = iprot.readI64();
struct.setTransactionOrUpdateIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // COLUMN_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // KEYS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
struct.keys = new java.util.ArrayList<java.nio.ByteBuffer>(_list24.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem25;
for (int _i26 = 0; _i26 < _list24.size; ++_i26)
{
_elem25 = iprot.readBinary();
struct.keys.add(_elem25);
}
iprot.readListEnd();
}
struct.setKeysIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // VALUE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.value = iprot.readBinary();
struct.setValueIsSet(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
if (!struct.isSetTransactionOrUpdateId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionOrUpdateId' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetColumnId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, putGetPrevious_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(TRANSACTION_OR_UPDATE_ID_FIELD_DESC);
oprot.writeI64(struct.transactionOrUpdateId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC);
oprot.writeI64(struct.columnId);
oprot.writeFieldEnd();
if (struct.keys != null) {
oprot.writeFieldBegin(KEYS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size()));
for (java.nio.ByteBuffer _iter27 : struct.keys)
{
oprot.writeBinary(_iter27);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.value != null) {
oprot.writeFieldBegin(VALUE_FIELD_DESC);
oprot.writeBinary(struct.value);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class putGetPrevious_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public putGetPrevious_argsTupleScheme getScheme() {
return new putGetPrevious_argsTupleScheme();
}
}
private static class putGetPrevious_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<putGetPrevious_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, putGetPrevious_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.transactionOrUpdateId);
oprot.writeI64(struct.columnId);
{
oprot.writeI32(struct.keys.size());
for (java.nio.ByteBuffer _iter28 : struct.keys)
{
oprot.writeBinary(_iter28);
}
}
oprot.writeBinary(struct.value);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, putGetPrevious_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.transactionOrUpdateId = iprot.readI64();
struct.setTransactionOrUpdateIdIsSet(true);
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
{
org.apache.thrift.protocol.TList _list29 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.keys = new java.util.ArrayList<java.nio.ByteBuffer>(_list29.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem30;
for (int _i31 = 0; _i31 < _list29.size; ++_i31)
{
_elem30 = iprot.readBinary();
struct.keys.add(_elem30);
}
}
struct.setKeysIsSet(true);
struct.value = iprot.readBinary();
struct.setValueIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class putGetPrevious_result implements org.apache.thrift.TBase<putGetPrevious_result, putGetPrevious_result._Fields>, java.io.Serializable, Cloneable, Comparable<putGetPrevious_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putGetPrevious_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putGetPrevious_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putGetPrevious_resultTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable OptionalBinary 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalBinary.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putGetPrevious_result.class, metaDataMap);
}
public putGetPrevious_result() {
}
public putGetPrevious_result(
OptionalBinary success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public putGetPrevious_result(putGetPrevious_result other) {
if (other.isSetSuccess()) {
this.success = new OptionalBinary(other.success);
}
}
@Override
public putGetPrevious_result deepCopy() {
return new putGetPrevious_result(this);
}
@Override
public void clear() {
this.success = null;
}
@org.apache.thrift.annotation.Nullable
public OptionalBinary getSuccess() {
return this.success;
}
public putGetPrevious_result setSuccess(@org.apache.thrift.annotation.Nullable OptionalBinary 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;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((OptionalBinary)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof putGetPrevious_result)
return this.equals((putGetPrevious_result)that);
return false;
}
public boolean equals(putGetPrevious_result that) {
if (that == null)
return false;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
return hashCode;
}
@Override
public int compareTo(putGetPrevious_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("putGetPrevious_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 putGetPrevious_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public putGetPrevious_resultStandardScheme getScheme() {
return new putGetPrevious_resultStandardScheme();
}
}
private static class putGetPrevious_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<putGetPrevious_result> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, putGetPrevious_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new OptionalBinary();
struct.success.read(iprot);
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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, putGetPrevious_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class putGetPrevious_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public putGetPrevious_resultTupleScheme getScheme() {
return new putGetPrevious_resultTupleScheme();
}
}
private static class putGetPrevious_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<putGetPrevious_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, putGetPrevious_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, putGetPrevious_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = new OptionalBinary();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class putGetDelta_args implements org.apache.thrift.TBase<putGetDelta_args, putGetDelta_args._Fields>, java.io.Serializable, Cloneable, Comparable<putGetDelta_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putGetDelta_args");
private static final org.apache.thrift.protocol.TField TRANSACTION_OR_UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionOrUpdateId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putGetDelta_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putGetDelta_argsTupleSchemeFactory();
public long transactionOrUpdateId; // required
public long columnId; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> keys; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value; // 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 {
TRANSACTION_OR_UPDATE_ID((short)1, "transactionOrUpdateId"),
COLUMN_ID((short)2, "columnId"),
KEYS((short)3, "keys"),
VALUE((short)4, "value");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TRANSACTION_OR_UPDATE_ID
return TRANSACTION_OR_UPDATE_ID;
case 2: // COLUMN_ID
return COLUMN_ID;
case 3: // KEYS
return KEYS;
case 4: // VALUE
return VALUE;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __TRANSACTIONORUPDATEID_ISSET_ID = 0;
private static final int __COLUMNID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TRANSACTION_OR_UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionOrUpdateId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putGetDelta_args.class, metaDataMap);
}
public putGetDelta_args() {
}
public putGetDelta_args(
long transactionOrUpdateId,
long columnId,
java.util.List<java.nio.ByteBuffer> keys,
java.nio.ByteBuffer value)
{
this();
this.transactionOrUpdateId = transactionOrUpdateId;
setTransactionOrUpdateIdIsSet(true);
this.columnId = columnId;
setColumnIdIsSet(true);
this.keys = keys;
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public putGetDelta_args(putGetDelta_args other) {
__isset_bitfield = other.__isset_bitfield;
this.transactionOrUpdateId = other.transactionOrUpdateId;
this.columnId = other.columnId;
if (other.isSetKeys()) {
java.util.List<java.nio.ByteBuffer> __this__keys = new java.util.ArrayList<java.nio.ByteBuffer>(other.keys);
this.keys = __this__keys;
}
if (other.isSetValue()) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value);
}
}
@Override
public putGetDelta_args deepCopy() {
return new putGetDelta_args(this);
}
@Override
public void clear() {
setTransactionOrUpdateIdIsSet(false);
this.transactionOrUpdateId = 0;
setColumnIdIsSet(false);
this.columnId = 0;
this.keys = null;
this.value = null;
}
public long getTransactionOrUpdateId() {
return this.transactionOrUpdateId;
}
public putGetDelta_args setTransactionOrUpdateId(long transactionOrUpdateId) {
this.transactionOrUpdateId = transactionOrUpdateId;
setTransactionOrUpdateIdIsSet(true);
return this;
}
public void unsetTransactionOrUpdateId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID);
}
/** Returns true if field transactionOrUpdateId is set (has been assigned a value) and false otherwise */
public boolean isSetTransactionOrUpdateId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID);
}
public void setTransactionOrUpdateIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID, value);
}
public long getColumnId() {
return this.columnId;
}
public putGetDelta_args setColumnId(long columnId) {
this.columnId = columnId;
setColumnIdIsSet(true);
return this;
}
public void unsetColumnId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
/** Returns true if field columnId is set (has been assigned a value) and false otherwise */
public boolean isSetColumnId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
public void setColumnIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value);
}
public int getKeysSize() {
return (this.keys == null) ? 0 : this.keys.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.nio.ByteBuffer> getKeysIterator() {
return (this.keys == null) ? null : this.keys.iterator();
}
public void addToKeys(java.nio.ByteBuffer elem) {
if (this.keys == null) {
this.keys = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.keys.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.nio.ByteBuffer> getKeys() {
return this.keys;
}
public putGetDelta_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> keys) {
this.keys = keys;
return this;
}
public void unsetKeys() {
this.keys = null;
}
/** Returns true if field keys is set (has been assigned a value) and false otherwise */
public boolean isSetKeys() {
return this.keys != null;
}
public void setKeysIsSet(boolean value) {
if (!value) {
this.keys = null;
}
}
public byte[] getValue() {
setValue(org.apache.thrift.TBaseHelper.rightSize(value));
return value == null ? null : value.array();
}
public java.nio.ByteBuffer bufferForValue() {
return org.apache.thrift.TBaseHelper.copyBinary(value);
}
public putGetDelta_args setValue(byte[] value) {
this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone());
return this;
}
public putGetDelta_args setValue(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
return this;
}
public void unsetValue() {
this.value = null;
}
/** Returns true if field value is set (has been assigned a value) and false otherwise */
public boolean isSetValue() {
return this.value != null;
}
public void setValueIsSet(boolean value) {
if (!value) {
this.value = null;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
if (value == null) {
unsetTransactionOrUpdateId();
} else {
setTransactionOrUpdateId((java.lang.Long)value);
}
break;
case COLUMN_ID:
if (value == null) {
unsetColumnId();
} else {
setColumnId((java.lang.Long)value);
}
break;
case KEYS:
if (value == null) {
unsetKeys();
} else {
setKeys((java.util.List<java.nio.ByteBuffer>)value);
}
break;
case VALUE:
if (value == null) {
unsetValue();
} else {
if (value instanceof byte[]) {
setValue((byte[])value);
} else {
setValue((java.nio.ByteBuffer)value);
}
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
return getTransactionOrUpdateId();
case COLUMN_ID:
return getColumnId();
case KEYS:
return getKeys();
case VALUE:
return getValue();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
return isSetTransactionOrUpdateId();
case COLUMN_ID:
return isSetColumnId();
case KEYS:
return isSetKeys();
case VALUE:
return isSetValue();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof putGetDelta_args)
return this.equals((putGetDelta_args)that);
return false;
}
public boolean equals(putGetDelta_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_transactionOrUpdateId = true;
boolean that_present_transactionOrUpdateId = true;
if (this_present_transactionOrUpdateId || that_present_transactionOrUpdateId) {
if (!(this_present_transactionOrUpdateId && that_present_transactionOrUpdateId))
return false;
if (this.transactionOrUpdateId != that.transactionOrUpdateId)
return false;
}
boolean this_present_columnId = true;
boolean that_present_columnId = true;
if (this_present_columnId || that_present_columnId) {
if (!(this_present_columnId && that_present_columnId))
return false;
if (this.columnId != that.columnId)
return false;
}
boolean this_present_keys = true && this.isSetKeys();
boolean that_present_keys = true && that.isSetKeys();
if (this_present_keys || that_present_keys) {
if (!(this_present_keys && that_present_keys))
return false;
if (!this.keys.equals(that.keys))
return false;
}
boolean this_present_value = true && this.isSetValue();
boolean that_present_value = true && that.isSetValue();
if (this_present_value || that_present_value) {
if (!(this_present_value && that_present_value))
return false;
if (!this.value.equals(that.value))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionOrUpdateId);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId);
hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287);
if (isSetKeys())
hashCode = hashCode * 8191 + keys.hashCode();
hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287);
if (isSetValue())
hashCode = hashCode * 8191 + value.hashCode();
return hashCode;
}
@Override
public int compareTo(putGetDelta_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetTransactionOrUpdateId(), other.isSetTransactionOrUpdateId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTransactionOrUpdateId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionOrUpdateId, other.transactionOrUpdateId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetKeys()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetValue(), other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetValue()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("putGetDelta_args(");
boolean first = true;
sb.append("transactionOrUpdateId:");
sb.append(this.transactionOrUpdateId);
first = false;
if (!first) sb.append(", ");
sb.append("columnId:");
sb.append(this.columnId);
first = false;
if (!first) sb.append(", ");
sb.append("keys:");
if (this.keys == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.keys, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("value:");
if (this.value == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.value, sb);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'transactionOrUpdateId' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator.
if (keys == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString());
}
if (value == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'value' was not present! Struct: " + toString());
}
// 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, java.lang.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 putGetDelta_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public putGetDelta_argsStandardScheme getScheme() {
return new putGetDelta_argsStandardScheme();
}
}
private static class putGetDelta_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<putGetDelta_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, putGetDelta_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: // TRANSACTION_OR_UPDATE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.transactionOrUpdateId = iprot.readI64();
struct.setTransactionOrUpdateIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // COLUMN_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // KEYS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
struct.keys = new java.util.ArrayList<java.nio.ByteBuffer>(_list32.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem33;
for (int _i34 = 0; _i34 < _list32.size; ++_i34)
{
_elem33 = iprot.readBinary();
struct.keys.add(_elem33);
}
iprot.readListEnd();
}
struct.setKeysIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // VALUE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.value = iprot.readBinary();
struct.setValueIsSet(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
if (!struct.isSetTransactionOrUpdateId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionOrUpdateId' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetColumnId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, putGetDelta_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(TRANSACTION_OR_UPDATE_ID_FIELD_DESC);
oprot.writeI64(struct.transactionOrUpdateId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC);
oprot.writeI64(struct.columnId);
oprot.writeFieldEnd();
if (struct.keys != null) {
oprot.writeFieldBegin(KEYS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size()));
for (java.nio.ByteBuffer _iter35 : struct.keys)
{
oprot.writeBinary(_iter35);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.value != null) {
oprot.writeFieldBegin(VALUE_FIELD_DESC);
oprot.writeBinary(struct.value);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class putGetDelta_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public putGetDelta_argsTupleScheme getScheme() {
return new putGetDelta_argsTupleScheme();
}
}
private static class putGetDelta_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<putGetDelta_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, putGetDelta_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.transactionOrUpdateId);
oprot.writeI64(struct.columnId);
{
oprot.writeI32(struct.keys.size());
for (java.nio.ByteBuffer _iter36 : struct.keys)
{
oprot.writeBinary(_iter36);
}
}
oprot.writeBinary(struct.value);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, putGetDelta_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.transactionOrUpdateId = iprot.readI64();
struct.setTransactionOrUpdateIdIsSet(true);
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
{
org.apache.thrift.protocol.TList _list37 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.keys = new java.util.ArrayList<java.nio.ByteBuffer>(_list37.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem38;
for (int _i39 = 0; _i39 < _list37.size; ++_i39)
{
_elem38 = iprot.readBinary();
struct.keys.add(_elem38);
}
}
struct.setKeysIsSet(true);
struct.value = iprot.readBinary();
struct.setValueIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class putGetDelta_result implements org.apache.thrift.TBase<putGetDelta_result, putGetDelta_result._Fields>, java.io.Serializable, Cloneable, Comparable<putGetDelta_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putGetDelta_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putGetDelta_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putGetDelta_resultTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable Delta 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Delta.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putGetDelta_result.class, metaDataMap);
}
public putGetDelta_result() {
}
public putGetDelta_result(
Delta success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public putGetDelta_result(putGetDelta_result other) {
if (other.isSetSuccess()) {
this.success = new Delta(other.success);
}
}
@Override
public putGetDelta_result deepCopy() {
return new putGetDelta_result(this);
}
@Override
public void clear() {
this.success = null;
}
@org.apache.thrift.annotation.Nullable
public Delta getSuccess() {
return this.success;
}
public putGetDelta_result setSuccess(@org.apache.thrift.annotation.Nullable Delta 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;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Delta)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof putGetDelta_result)
return this.equals((putGetDelta_result)that);
return false;
}
public boolean equals(putGetDelta_result that) {
if (that == null)
return false;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
return hashCode;
}
@Override
public int compareTo(putGetDelta_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("putGetDelta_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 putGetDelta_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public putGetDelta_resultStandardScheme getScheme() {
return new putGetDelta_resultStandardScheme();
}
}
private static class putGetDelta_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<putGetDelta_result> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, putGetDelta_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new Delta();
struct.success.read(iprot);
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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, putGetDelta_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class putGetDelta_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public putGetDelta_resultTupleScheme getScheme() {
return new putGetDelta_resultTupleScheme();
}
}
private static class putGetDelta_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<putGetDelta_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, putGetDelta_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, putGetDelta_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = new Delta();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class putGetChanged_args implements org.apache.thrift.TBase<putGetChanged_args, putGetChanged_args._Fields>, java.io.Serializable, Cloneable, Comparable<putGetChanged_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putGetChanged_args");
private static final org.apache.thrift.protocol.TField TRANSACTION_OR_UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionOrUpdateId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putGetChanged_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putGetChanged_argsTupleSchemeFactory();
public long transactionOrUpdateId; // required
public long columnId; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> keys; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value; // 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 {
TRANSACTION_OR_UPDATE_ID((short)1, "transactionOrUpdateId"),
COLUMN_ID((short)2, "columnId"),
KEYS((short)3, "keys"),
VALUE((short)4, "value");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TRANSACTION_OR_UPDATE_ID
return TRANSACTION_OR_UPDATE_ID;
case 2: // COLUMN_ID
return COLUMN_ID;
case 3: // KEYS
return KEYS;
case 4: // VALUE
return VALUE;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __TRANSACTIONORUPDATEID_ISSET_ID = 0;
private static final int __COLUMNID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TRANSACTION_OR_UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionOrUpdateId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putGetChanged_args.class, metaDataMap);
}
public putGetChanged_args() {
}
public putGetChanged_args(
long transactionOrUpdateId,
long columnId,
java.util.List<java.nio.ByteBuffer> keys,
java.nio.ByteBuffer value)
{
this();
this.transactionOrUpdateId = transactionOrUpdateId;
setTransactionOrUpdateIdIsSet(true);
this.columnId = columnId;
setColumnIdIsSet(true);
this.keys = keys;
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public putGetChanged_args(putGetChanged_args other) {
__isset_bitfield = other.__isset_bitfield;
this.transactionOrUpdateId = other.transactionOrUpdateId;
this.columnId = other.columnId;
if (other.isSetKeys()) {
java.util.List<java.nio.ByteBuffer> __this__keys = new java.util.ArrayList<java.nio.ByteBuffer>(other.keys);
this.keys = __this__keys;
}
if (other.isSetValue()) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value);
}
}
@Override
public putGetChanged_args deepCopy() {
return new putGetChanged_args(this);
}
@Override
public void clear() {
setTransactionOrUpdateIdIsSet(false);
this.transactionOrUpdateId = 0;
setColumnIdIsSet(false);
this.columnId = 0;
this.keys = null;
this.value = null;
}
public long getTransactionOrUpdateId() {
return this.transactionOrUpdateId;
}
public putGetChanged_args setTransactionOrUpdateId(long transactionOrUpdateId) {
this.transactionOrUpdateId = transactionOrUpdateId;
setTransactionOrUpdateIdIsSet(true);
return this;
}
public void unsetTransactionOrUpdateId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID);
}
/** Returns true if field transactionOrUpdateId is set (has been assigned a value) and false otherwise */
public boolean isSetTransactionOrUpdateId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID);
}
public void setTransactionOrUpdateIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID, value);
}
public long getColumnId() {
return this.columnId;
}
public putGetChanged_args setColumnId(long columnId) {
this.columnId = columnId;
setColumnIdIsSet(true);
return this;
}
public void unsetColumnId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
/** Returns true if field columnId is set (has been assigned a value) and false otherwise */
public boolean isSetColumnId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
public void setColumnIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value);
}
public int getKeysSize() {
return (this.keys == null) ? 0 : this.keys.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.nio.ByteBuffer> getKeysIterator() {
return (this.keys == null) ? null : this.keys.iterator();
}
public void addToKeys(java.nio.ByteBuffer elem) {
if (this.keys == null) {
this.keys = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.keys.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.nio.ByteBuffer> getKeys() {
return this.keys;
}
public putGetChanged_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> keys) {
this.keys = keys;
return this;
}
public void unsetKeys() {
this.keys = null;
}
/** Returns true if field keys is set (has been assigned a value) and false otherwise */
public boolean isSetKeys() {
return this.keys != null;
}
public void setKeysIsSet(boolean value) {
if (!value) {
this.keys = null;
}
}
public byte[] getValue() {
setValue(org.apache.thrift.TBaseHelper.rightSize(value));
return value == null ? null : value.array();
}
public java.nio.ByteBuffer bufferForValue() {
return org.apache.thrift.TBaseHelper.copyBinary(value);
}
public putGetChanged_args setValue(byte[] value) {
this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone());
return this;
}
public putGetChanged_args setValue(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
return this;
}
public void unsetValue() {
this.value = null;
}
/** Returns true if field value is set (has been assigned a value) and false otherwise */
public boolean isSetValue() {
return this.value != null;
}
public void setValueIsSet(boolean value) {
if (!value) {
this.value = null;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
if (value == null) {
unsetTransactionOrUpdateId();
} else {
setTransactionOrUpdateId((java.lang.Long)value);
}
break;
case COLUMN_ID:
if (value == null) {
unsetColumnId();
} else {
setColumnId((java.lang.Long)value);
}
break;
case KEYS:
if (value == null) {
unsetKeys();
} else {
setKeys((java.util.List<java.nio.ByteBuffer>)value);
}
break;
case VALUE:
if (value == null) {
unsetValue();
} else {
if (value instanceof byte[]) {
setValue((byte[])value);
} else {
setValue((java.nio.ByteBuffer)value);
}
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
return getTransactionOrUpdateId();
case COLUMN_ID:
return getColumnId();
case KEYS:
return getKeys();
case VALUE:
return getValue();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
return isSetTransactionOrUpdateId();
case COLUMN_ID:
return isSetColumnId();
case KEYS:
return isSetKeys();
case VALUE:
return isSetValue();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof putGetChanged_args)
return this.equals((putGetChanged_args)that);
return false;
}
public boolean equals(putGetChanged_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_transactionOrUpdateId = true;
boolean that_present_transactionOrUpdateId = true;
if (this_present_transactionOrUpdateId || that_present_transactionOrUpdateId) {
if (!(this_present_transactionOrUpdateId && that_present_transactionOrUpdateId))
return false;
if (this.transactionOrUpdateId != that.transactionOrUpdateId)
return false;
}
boolean this_present_columnId = true;
boolean that_present_columnId = true;
if (this_present_columnId || that_present_columnId) {
if (!(this_present_columnId && that_present_columnId))
return false;
if (this.columnId != that.columnId)
return false;
}
boolean this_present_keys = true && this.isSetKeys();
boolean that_present_keys = true && that.isSetKeys();
if (this_present_keys || that_present_keys) {
if (!(this_present_keys && that_present_keys))
return false;
if (!this.keys.equals(that.keys))
return false;
}
boolean this_present_value = true && this.isSetValue();
boolean that_present_value = true && that.isSetValue();
if (this_present_value || that_present_value) {
if (!(this_present_value && that_present_value))
return false;
if (!this.value.equals(that.value))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionOrUpdateId);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId);
hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287);
if (isSetKeys())
hashCode = hashCode * 8191 + keys.hashCode();
hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287);
if (isSetValue())
hashCode = hashCode * 8191 + value.hashCode();
return hashCode;
}
@Override
public int compareTo(putGetChanged_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetTransactionOrUpdateId(), other.isSetTransactionOrUpdateId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTransactionOrUpdateId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionOrUpdateId, other.transactionOrUpdateId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetKeys()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetValue(), other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetValue()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("putGetChanged_args(");
boolean first = true;
sb.append("transactionOrUpdateId:");
sb.append(this.transactionOrUpdateId);
first = false;
if (!first) sb.append(", ");
sb.append("columnId:");
sb.append(this.columnId);
first = false;
if (!first) sb.append(", ");
sb.append("keys:");
if (this.keys == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.keys, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("value:");
if (this.value == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.value, sb);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'transactionOrUpdateId' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator.
if (keys == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString());
}
if (value == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'value' was not present! Struct: " + toString());
}
// 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, java.lang.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 putGetChanged_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public putGetChanged_argsStandardScheme getScheme() {
return new putGetChanged_argsStandardScheme();
}
}
private static class putGetChanged_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<putGetChanged_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, putGetChanged_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: // TRANSACTION_OR_UPDATE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.transactionOrUpdateId = iprot.readI64();
struct.setTransactionOrUpdateIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // COLUMN_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // KEYS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
struct.keys = new java.util.ArrayList<java.nio.ByteBuffer>(_list40.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem41;
for (int _i42 = 0; _i42 < _list40.size; ++_i42)
{
_elem41 = iprot.readBinary();
struct.keys.add(_elem41);
}
iprot.readListEnd();
}
struct.setKeysIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // VALUE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.value = iprot.readBinary();
struct.setValueIsSet(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
if (!struct.isSetTransactionOrUpdateId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionOrUpdateId' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetColumnId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, putGetChanged_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(TRANSACTION_OR_UPDATE_ID_FIELD_DESC);
oprot.writeI64(struct.transactionOrUpdateId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC);
oprot.writeI64(struct.columnId);
oprot.writeFieldEnd();
if (struct.keys != null) {
oprot.writeFieldBegin(KEYS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size()));
for (java.nio.ByteBuffer _iter43 : struct.keys)
{
oprot.writeBinary(_iter43);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.value != null) {
oprot.writeFieldBegin(VALUE_FIELD_DESC);
oprot.writeBinary(struct.value);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class putGetChanged_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public putGetChanged_argsTupleScheme getScheme() {
return new putGetChanged_argsTupleScheme();
}
}
private static class putGetChanged_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<putGetChanged_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, putGetChanged_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.transactionOrUpdateId);
oprot.writeI64(struct.columnId);
{
oprot.writeI32(struct.keys.size());
for (java.nio.ByteBuffer _iter44 : struct.keys)
{
oprot.writeBinary(_iter44);
}
}
oprot.writeBinary(struct.value);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, putGetChanged_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.transactionOrUpdateId = iprot.readI64();
struct.setTransactionOrUpdateIdIsSet(true);
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
{
org.apache.thrift.protocol.TList _list45 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.keys = new java.util.ArrayList<java.nio.ByteBuffer>(_list45.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem46;
for (int _i47 = 0; _i47 < _list45.size; ++_i47)
{
_elem46 = iprot.readBinary();
struct.keys.add(_elem46);
}
}
struct.setKeysIsSet(true);
struct.value = iprot.readBinary();
struct.setValueIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class putGetChanged_result implements org.apache.thrift.TBase<putGetChanged_result, putGetChanged_result._Fields>, java.io.Serializable, Cloneable, Comparable<putGetChanged_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putGetChanged_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putGetChanged_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putGetChanged_resultTupleSchemeFactory();
public boolean 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.BOOL)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putGetChanged_result.class, metaDataMap);
}
public putGetChanged_result() {
}
public putGetChanged_result(
boolean success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public putGetChanged_result(putGetChanged_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
}
@Override
public putGetChanged_result deepCopy() {
return new putGetChanged_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
}
public boolean isSuccess() {
return this.success;
}
public putGetChanged_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof putGetChanged_result)
return this.equals((putGetChanged_result)that);
return false;
}
public boolean equals(putGetChanged_result that) {
if (that == null)
return false;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
return hashCode;
}
@Override
public int compareTo(putGetChanged_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("putGetChanged_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, java.lang.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 putGetChanged_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public putGetChanged_resultStandardScheme getScheme() {
return new putGetChanged_resultStandardScheme();
}
}
private static class putGetChanged_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<putGetChanged_result> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, putGetChanged_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.BOOL) {
struct.success = iprot.readBool();
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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, putGetChanged_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class putGetChanged_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public putGetChanged_resultTupleScheme getScheme() {
return new putGetChanged_resultTupleScheme();
}
}
private static class putGetChanged_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<putGetChanged_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, putGetChanged_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, putGetChanged_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class putGetPreviousPresence_args implements org.apache.thrift.TBase<putGetPreviousPresence_args, putGetPreviousPresence_args._Fields>, java.io.Serializable, Cloneable, Comparable<putGetPreviousPresence_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putGetPreviousPresence_args");
private static final org.apache.thrift.protocol.TField TRANSACTION_OR_UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionOrUpdateId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putGetPreviousPresence_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putGetPreviousPresence_argsTupleSchemeFactory();
public long transactionOrUpdateId; // required
public long columnId; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> keys; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value; // 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 {
TRANSACTION_OR_UPDATE_ID((short)1, "transactionOrUpdateId"),
COLUMN_ID((short)2, "columnId"),
KEYS((short)3, "keys"),
VALUE((short)4, "value");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TRANSACTION_OR_UPDATE_ID
return TRANSACTION_OR_UPDATE_ID;
case 2: // COLUMN_ID
return COLUMN_ID;
case 3: // KEYS
return KEYS;
case 4: // VALUE
return VALUE;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __TRANSACTIONORUPDATEID_ISSET_ID = 0;
private static final int __COLUMNID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TRANSACTION_OR_UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionOrUpdateId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putGetPreviousPresence_args.class, metaDataMap);
}
public putGetPreviousPresence_args() {
}
public putGetPreviousPresence_args(
long transactionOrUpdateId,
long columnId,
java.util.List<java.nio.ByteBuffer> keys,
java.nio.ByteBuffer value)
{
this();
this.transactionOrUpdateId = transactionOrUpdateId;
setTransactionOrUpdateIdIsSet(true);
this.columnId = columnId;
setColumnIdIsSet(true);
this.keys = keys;
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public putGetPreviousPresence_args(putGetPreviousPresence_args other) {
__isset_bitfield = other.__isset_bitfield;
this.transactionOrUpdateId = other.transactionOrUpdateId;
this.columnId = other.columnId;
if (other.isSetKeys()) {
java.util.List<java.nio.ByteBuffer> __this__keys = new java.util.ArrayList<java.nio.ByteBuffer>(other.keys);
this.keys = __this__keys;
}
if (other.isSetValue()) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value);
}
}
@Override
public putGetPreviousPresence_args deepCopy() {
return new putGetPreviousPresence_args(this);
}
@Override
public void clear() {
setTransactionOrUpdateIdIsSet(false);
this.transactionOrUpdateId = 0;
setColumnIdIsSet(false);
this.columnId = 0;
this.keys = null;
this.value = null;
}
public long getTransactionOrUpdateId() {
return this.transactionOrUpdateId;
}
public putGetPreviousPresence_args setTransactionOrUpdateId(long transactionOrUpdateId) {
this.transactionOrUpdateId = transactionOrUpdateId;
setTransactionOrUpdateIdIsSet(true);
return this;
}
public void unsetTransactionOrUpdateId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID);
}
/** Returns true if field transactionOrUpdateId is set (has been assigned a value) and false otherwise */
public boolean isSetTransactionOrUpdateId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID);
}
public void setTransactionOrUpdateIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID, value);
}
public long getColumnId() {
return this.columnId;
}
public putGetPreviousPresence_args setColumnId(long columnId) {
this.columnId = columnId;
setColumnIdIsSet(true);
return this;
}
public void unsetColumnId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
/** Returns true if field columnId is set (has been assigned a value) and false otherwise */
public boolean isSetColumnId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
public void setColumnIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value);
}
public int getKeysSize() {
return (this.keys == null) ? 0 : this.keys.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.nio.ByteBuffer> getKeysIterator() {
return (this.keys == null) ? null : this.keys.iterator();
}
public void addToKeys(java.nio.ByteBuffer elem) {
if (this.keys == null) {
this.keys = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.keys.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.nio.ByteBuffer> getKeys() {
return this.keys;
}
public putGetPreviousPresence_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> keys) {
this.keys = keys;
return this;
}
public void unsetKeys() {
this.keys = null;
}
/** Returns true if field keys is set (has been assigned a value) and false otherwise */
public boolean isSetKeys() {
return this.keys != null;
}
public void setKeysIsSet(boolean value) {
if (!value) {
this.keys = null;
}
}
public byte[] getValue() {
setValue(org.apache.thrift.TBaseHelper.rightSize(value));
return value == null ? null : value.array();
}
public java.nio.ByteBuffer bufferForValue() {
return org.apache.thrift.TBaseHelper.copyBinary(value);
}
public putGetPreviousPresence_args setValue(byte[] value) {
this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone());
return this;
}
public putGetPreviousPresence_args setValue(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
return this;
}
public void unsetValue() {
this.value = null;
}
/** Returns true if field value is set (has been assigned a value) and false otherwise */
public boolean isSetValue() {
return this.value != null;
}
public void setValueIsSet(boolean value) {
if (!value) {
this.value = null;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
if (value == null) {
unsetTransactionOrUpdateId();
} else {
setTransactionOrUpdateId((java.lang.Long)value);
}
break;
case COLUMN_ID:
if (value == null) {
unsetColumnId();
} else {
setColumnId((java.lang.Long)value);
}
break;
case KEYS:
if (value == null) {
unsetKeys();
} else {
setKeys((java.util.List<java.nio.ByteBuffer>)value);
}
break;
case VALUE:
if (value == null) {
unsetValue();
} else {
if (value instanceof byte[]) {
setValue((byte[])value);
} else {
setValue((java.nio.ByteBuffer)value);
}
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
return getTransactionOrUpdateId();
case COLUMN_ID:
return getColumnId();
case KEYS:
return getKeys();
case VALUE:
return getValue();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
return isSetTransactionOrUpdateId();
case COLUMN_ID:
return isSetColumnId();
case KEYS:
return isSetKeys();
case VALUE:
return isSetValue();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof putGetPreviousPresence_args)
return this.equals((putGetPreviousPresence_args)that);
return false;
}
public boolean equals(putGetPreviousPresence_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_transactionOrUpdateId = true;
boolean that_present_transactionOrUpdateId = true;
if (this_present_transactionOrUpdateId || that_present_transactionOrUpdateId) {
if (!(this_present_transactionOrUpdateId && that_present_transactionOrUpdateId))
return false;
if (this.transactionOrUpdateId != that.transactionOrUpdateId)
return false;
}
boolean this_present_columnId = true;
boolean that_present_columnId = true;
if (this_present_columnId || that_present_columnId) {
if (!(this_present_columnId && that_present_columnId))
return false;
if (this.columnId != that.columnId)
return false;
}
boolean this_present_keys = true && this.isSetKeys();
boolean that_present_keys = true && that.isSetKeys();
if (this_present_keys || that_present_keys) {
if (!(this_present_keys && that_present_keys))
return false;
if (!this.keys.equals(that.keys))
return false;
}
boolean this_present_value = true && this.isSetValue();
boolean that_present_value = true && that.isSetValue();
if (this_present_value || that_present_value) {
if (!(this_present_value && that_present_value))
return false;
if (!this.value.equals(that.value))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionOrUpdateId);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId);
hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287);
if (isSetKeys())
hashCode = hashCode * 8191 + keys.hashCode();
hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287);
if (isSetValue())
hashCode = hashCode * 8191 + value.hashCode();
return hashCode;
}
@Override
public int compareTo(putGetPreviousPresence_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetTransactionOrUpdateId(), other.isSetTransactionOrUpdateId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTransactionOrUpdateId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionOrUpdateId, other.transactionOrUpdateId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetKeys()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetValue(), other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetValue()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("putGetPreviousPresence_args(");
boolean first = true;
sb.append("transactionOrUpdateId:");
sb.append(this.transactionOrUpdateId);
first = false;
if (!first) sb.append(", ");
sb.append("columnId:");
sb.append(this.columnId);
first = false;
if (!first) sb.append(", ");
sb.append("keys:");
if (this.keys == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.keys, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("value:");
if (this.value == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.value, sb);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'transactionOrUpdateId' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator.
if (keys == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString());
}
if (value == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'value' was not present! Struct: " + toString());
}
// 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, java.lang.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 putGetPreviousPresence_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public putGetPreviousPresence_argsStandardScheme getScheme() {
return new putGetPreviousPresence_argsStandardScheme();
}
}
private static class putGetPreviousPresence_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<putGetPreviousPresence_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, putGetPreviousPresence_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: // TRANSACTION_OR_UPDATE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.transactionOrUpdateId = iprot.readI64();
struct.setTransactionOrUpdateIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // COLUMN_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // KEYS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list48 = iprot.readListBegin();
struct.keys = new java.util.ArrayList<java.nio.ByteBuffer>(_list48.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem49;
for (int _i50 = 0; _i50 < _list48.size; ++_i50)
{
_elem49 = iprot.readBinary();
struct.keys.add(_elem49);
}
iprot.readListEnd();
}
struct.setKeysIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // VALUE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.value = iprot.readBinary();
struct.setValueIsSet(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
if (!struct.isSetTransactionOrUpdateId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionOrUpdateId' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetColumnId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, putGetPreviousPresence_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(TRANSACTION_OR_UPDATE_ID_FIELD_DESC);
oprot.writeI64(struct.transactionOrUpdateId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC);
oprot.writeI64(struct.columnId);
oprot.writeFieldEnd();
if (struct.keys != null) {
oprot.writeFieldBegin(KEYS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size()));
for (java.nio.ByteBuffer _iter51 : struct.keys)
{
oprot.writeBinary(_iter51);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.value != null) {
oprot.writeFieldBegin(VALUE_FIELD_DESC);
oprot.writeBinary(struct.value);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class putGetPreviousPresence_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public putGetPreviousPresence_argsTupleScheme getScheme() {
return new putGetPreviousPresence_argsTupleScheme();
}
}
private static class putGetPreviousPresence_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<putGetPreviousPresence_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, putGetPreviousPresence_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.transactionOrUpdateId);
oprot.writeI64(struct.columnId);
{
oprot.writeI32(struct.keys.size());
for (java.nio.ByteBuffer _iter52 : struct.keys)
{
oprot.writeBinary(_iter52);
}
}
oprot.writeBinary(struct.value);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, putGetPreviousPresence_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.transactionOrUpdateId = iprot.readI64();
struct.setTransactionOrUpdateIdIsSet(true);
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
{
org.apache.thrift.protocol.TList _list53 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.keys = new java.util.ArrayList<java.nio.ByteBuffer>(_list53.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem54;
for (int _i55 = 0; _i55 < _list53.size; ++_i55)
{
_elem54 = iprot.readBinary();
struct.keys.add(_elem54);
}
}
struct.setKeysIsSet(true);
struct.value = iprot.readBinary();
struct.setValueIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class putGetPreviousPresence_result implements org.apache.thrift.TBase<putGetPreviousPresence_result, putGetPreviousPresence_result._Fields>, java.io.Serializable, Cloneable, Comparable<putGetPreviousPresence_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putGetPreviousPresence_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new putGetPreviousPresence_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new putGetPreviousPresence_resultTupleSchemeFactory();
public boolean 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.BOOL)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putGetPreviousPresence_result.class, metaDataMap);
}
public putGetPreviousPresence_result() {
}
public putGetPreviousPresence_result(
boolean success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public putGetPreviousPresence_result(putGetPreviousPresence_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
}
@Override
public putGetPreviousPresence_result deepCopy() {
return new putGetPreviousPresence_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
}
public boolean isSuccess() {
return this.success;
}
public putGetPreviousPresence_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof putGetPreviousPresence_result)
return this.equals((putGetPreviousPresence_result)that);
return false;
}
public boolean equals(putGetPreviousPresence_result that) {
if (that == null)
return false;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
return hashCode;
}
@Override
public int compareTo(putGetPreviousPresence_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("putGetPreviousPresence_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, java.lang.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 putGetPreviousPresence_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public putGetPreviousPresence_resultStandardScheme getScheme() {
return new putGetPreviousPresence_resultStandardScheme();
}
}
private static class putGetPreviousPresence_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<putGetPreviousPresence_result> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, putGetPreviousPresence_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.BOOL) {
struct.success = iprot.readBool();
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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, putGetPreviousPresence_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class putGetPreviousPresence_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public putGetPreviousPresence_resultTupleScheme getScheme() {
return new putGetPreviousPresence_resultTupleScheme();
}
}
private static class putGetPreviousPresence_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<putGetPreviousPresence_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, putGetPreviousPresence_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, putGetPreviousPresence_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class get_args implements org.apache.thrift.TBase<get_args, get_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_args");
private static final org.apache.thrift.protocol.TField TRANSACTION_OR_UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionOrUpdateId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_argsTupleSchemeFactory();
public long transactionOrUpdateId; // required
public long columnId; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> keys; // 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 {
TRANSACTION_OR_UPDATE_ID((short)1, "transactionOrUpdateId"),
COLUMN_ID((short)2, "columnId"),
KEYS((short)3, "keys");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TRANSACTION_OR_UPDATE_ID
return TRANSACTION_OR_UPDATE_ID;
case 2: // COLUMN_ID
return COLUMN_ID;
case 3: // KEYS
return KEYS;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __TRANSACTIONORUPDATEID_ISSET_ID = 0;
private static final int __COLUMNID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TRANSACTION_OR_UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionOrUpdateId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_args.class, metaDataMap);
}
public get_args() {
}
public get_args(
long transactionOrUpdateId,
long columnId,
java.util.List<java.nio.ByteBuffer> keys)
{
this();
this.transactionOrUpdateId = transactionOrUpdateId;
setTransactionOrUpdateIdIsSet(true);
this.columnId = columnId;
setColumnIdIsSet(true);
this.keys = keys;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public get_args(get_args other) {
__isset_bitfield = other.__isset_bitfield;
this.transactionOrUpdateId = other.transactionOrUpdateId;
this.columnId = other.columnId;
if (other.isSetKeys()) {
java.util.List<java.nio.ByteBuffer> __this__keys = new java.util.ArrayList<java.nio.ByteBuffer>(other.keys);
this.keys = __this__keys;
}
}
@Override
public get_args deepCopy() {
return new get_args(this);
}
@Override
public void clear() {
setTransactionOrUpdateIdIsSet(false);
this.transactionOrUpdateId = 0;
setColumnIdIsSet(false);
this.columnId = 0;
this.keys = null;
}
public long getTransactionOrUpdateId() {
return this.transactionOrUpdateId;
}
public get_args setTransactionOrUpdateId(long transactionOrUpdateId) {
this.transactionOrUpdateId = transactionOrUpdateId;
setTransactionOrUpdateIdIsSet(true);
return this;
}
public void unsetTransactionOrUpdateId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID);
}
/** Returns true if field transactionOrUpdateId is set (has been assigned a value) and false otherwise */
public boolean isSetTransactionOrUpdateId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID);
}
public void setTransactionOrUpdateIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID, value);
}
public long getColumnId() {
return this.columnId;
}
public get_args setColumnId(long columnId) {
this.columnId = columnId;
setColumnIdIsSet(true);
return this;
}
public void unsetColumnId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
/** Returns true if field columnId is set (has been assigned a value) and false otherwise */
public boolean isSetColumnId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
public void setColumnIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value);
}
public int getKeysSize() {
return (this.keys == null) ? 0 : this.keys.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.nio.ByteBuffer> getKeysIterator() {
return (this.keys == null) ? null : this.keys.iterator();
}
public void addToKeys(java.nio.ByteBuffer elem) {
if (this.keys == null) {
this.keys = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.keys.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.nio.ByteBuffer> getKeys() {
return this.keys;
}
public get_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> keys) {
this.keys = keys;
return this;
}
public void unsetKeys() {
this.keys = null;
}
/** Returns true if field keys is set (has been assigned a value) and false otherwise */
public boolean isSetKeys() {
return this.keys != null;
}
public void setKeysIsSet(boolean value) {
if (!value) {
this.keys = null;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
if (value == null) {
unsetTransactionOrUpdateId();
} else {
setTransactionOrUpdateId((java.lang.Long)value);
}
break;
case COLUMN_ID:
if (value == null) {
unsetColumnId();
} else {
setColumnId((java.lang.Long)value);
}
break;
case KEYS:
if (value == null) {
unsetKeys();
} else {
setKeys((java.util.List<java.nio.ByteBuffer>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
return getTransactionOrUpdateId();
case COLUMN_ID:
return getColumnId();
case KEYS:
return getKeys();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
return isSetTransactionOrUpdateId();
case COLUMN_ID:
return isSetColumnId();
case KEYS:
return isSetKeys();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof get_args)
return this.equals((get_args)that);
return false;
}
public boolean equals(get_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_transactionOrUpdateId = true;
boolean that_present_transactionOrUpdateId = true;
if (this_present_transactionOrUpdateId || that_present_transactionOrUpdateId) {
if (!(this_present_transactionOrUpdateId && that_present_transactionOrUpdateId))
return false;
if (this.transactionOrUpdateId != that.transactionOrUpdateId)
return false;
}
boolean this_present_columnId = true;
boolean that_present_columnId = true;
if (this_present_columnId || that_present_columnId) {
if (!(this_present_columnId && that_present_columnId))
return false;
if (this.columnId != that.columnId)
return false;
}
boolean this_present_keys = true && this.isSetKeys();
boolean that_present_keys = true && that.isSetKeys();
if (this_present_keys || that_present_keys) {
if (!(this_present_keys && that_present_keys))
return false;
if (!this.keys.equals(that.keys))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionOrUpdateId);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId);
hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287);
if (isSetKeys())
hashCode = hashCode * 8191 + keys.hashCode();
return hashCode;
}
@Override
public int compareTo(get_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetTransactionOrUpdateId(), other.isSetTransactionOrUpdateId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTransactionOrUpdateId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionOrUpdateId, other.transactionOrUpdateId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetKeys()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("get_args(");
boolean first = true;
sb.append("transactionOrUpdateId:");
sb.append(this.transactionOrUpdateId);
first = false;
if (!first) sb.append(", ");
sb.append("columnId:");
sb.append(this.columnId);
first = false;
if (!first) sb.append(", ");
sb.append("keys:");
if (this.keys == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.keys, sb);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'transactionOrUpdateId' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator.
if (keys == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString());
}
// 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, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class get_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public get_argsStandardScheme getScheme() {
return new get_argsStandardScheme();
}
}
private static class get_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, get_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // TRANSACTION_OR_UPDATE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.transactionOrUpdateId = iprot.readI64();
struct.setTransactionOrUpdateIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // COLUMN_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // KEYS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list56 = iprot.readListBegin();
struct.keys = new java.util.ArrayList<java.nio.ByteBuffer>(_list56.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem57;
for (int _i58 = 0; _i58 < _list56.size; ++_i58)
{
_elem57 = iprot.readBinary();
struct.keys.add(_elem57);
}
iprot.readListEnd();
}
struct.setKeysIsSet(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
if (!struct.isSetTransactionOrUpdateId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionOrUpdateId' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetColumnId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, get_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(TRANSACTION_OR_UPDATE_ID_FIELD_DESC);
oprot.writeI64(struct.transactionOrUpdateId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC);
oprot.writeI64(struct.columnId);
oprot.writeFieldEnd();
if (struct.keys != null) {
oprot.writeFieldBegin(KEYS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size()));
for (java.nio.ByteBuffer _iter59 : struct.keys)
{
oprot.writeBinary(_iter59);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class get_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public get_argsTupleScheme getScheme() {
return new get_argsTupleScheme();
}
}
private static class get_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.transactionOrUpdateId);
oprot.writeI64(struct.columnId);
{
oprot.writeI32(struct.keys.size());
for (java.nio.ByteBuffer _iter60 : struct.keys)
{
oprot.writeBinary(_iter60);
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.transactionOrUpdateId = iprot.readI64();
struct.setTransactionOrUpdateIdIsSet(true);
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
{
org.apache.thrift.protocol.TList _list61 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.keys = new java.util.ArrayList<java.nio.ByteBuffer>(_list61.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem62;
for (int _i63 = 0; _i63 < _list61.size; ++_i63)
{
_elem62 = iprot.readBinary();
struct.keys.add(_elem62);
}
}
struct.setKeysIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class get_result implements org.apache.thrift.TBase<get_result, get_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_resultTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable OptionalBinary 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalBinary.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_result.class, metaDataMap);
}
public get_result() {
}
public get_result(
OptionalBinary success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public get_result(get_result other) {
if (other.isSetSuccess()) {
this.success = new OptionalBinary(other.success);
}
}
@Override
public get_result deepCopy() {
return new get_result(this);
}
@Override
public void clear() {
this.success = null;
}
@org.apache.thrift.annotation.Nullable
public OptionalBinary getSuccess() {
return this.success;
}
public get_result setSuccess(@org.apache.thrift.annotation.Nullable OptionalBinary 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;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((OptionalBinary)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof get_result)
return this.equals((get_result)that);
return false;
}
public boolean equals(get_result that) {
if (that == null)
return false;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
return hashCode;
}
@Override
public int compareTo(get_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("get_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class get_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public get_resultStandardScheme getScheme() {
return new get_resultStandardScheme();
}
}
private static class get_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_result> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, get_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new OptionalBinary();
struct.success.read(iprot);
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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, get_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class get_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public get_resultTupleScheme getScheme() {
return new get_resultTupleScheme();
}
}
private static class get_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, get_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, get_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = new OptionalBinary();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getForUpdate_args implements org.apache.thrift.TBase<getForUpdate_args, getForUpdate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getForUpdate_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getForUpdate_args");
private static final org.apache.thrift.protocol.TField TRANSACTION_OR_UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionOrUpdateId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getForUpdate_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getForUpdate_argsTupleSchemeFactory();
public long transactionOrUpdateId; // required
public long columnId; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> keys; // 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 {
TRANSACTION_OR_UPDATE_ID((short)1, "transactionOrUpdateId"),
COLUMN_ID((short)2, "columnId"),
KEYS((short)3, "keys");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TRANSACTION_OR_UPDATE_ID
return TRANSACTION_OR_UPDATE_ID;
case 2: // COLUMN_ID
return COLUMN_ID;
case 3: // KEYS
return KEYS;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __TRANSACTIONORUPDATEID_ISSET_ID = 0;
private static final int __COLUMNID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TRANSACTION_OR_UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionOrUpdateId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getForUpdate_args.class, metaDataMap);
}
public getForUpdate_args() {
}
public getForUpdate_args(
long transactionOrUpdateId,
long columnId,
java.util.List<java.nio.ByteBuffer> keys)
{
this();
this.transactionOrUpdateId = transactionOrUpdateId;
setTransactionOrUpdateIdIsSet(true);
this.columnId = columnId;
setColumnIdIsSet(true);
this.keys = keys;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getForUpdate_args(getForUpdate_args other) {
__isset_bitfield = other.__isset_bitfield;
this.transactionOrUpdateId = other.transactionOrUpdateId;
this.columnId = other.columnId;
if (other.isSetKeys()) {
java.util.List<java.nio.ByteBuffer> __this__keys = new java.util.ArrayList<java.nio.ByteBuffer>(other.keys);
this.keys = __this__keys;
}
}
@Override
public getForUpdate_args deepCopy() {
return new getForUpdate_args(this);
}
@Override
public void clear() {
setTransactionOrUpdateIdIsSet(false);
this.transactionOrUpdateId = 0;
setColumnIdIsSet(false);
this.columnId = 0;
this.keys = null;
}
public long getTransactionOrUpdateId() {
return this.transactionOrUpdateId;
}
public getForUpdate_args setTransactionOrUpdateId(long transactionOrUpdateId) {
this.transactionOrUpdateId = transactionOrUpdateId;
setTransactionOrUpdateIdIsSet(true);
return this;
}
public void unsetTransactionOrUpdateId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID);
}
/** Returns true if field transactionOrUpdateId is set (has been assigned a value) and false otherwise */
public boolean isSetTransactionOrUpdateId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID);
}
public void setTransactionOrUpdateIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID, value);
}
public long getColumnId() {
return this.columnId;
}
public getForUpdate_args setColumnId(long columnId) {
this.columnId = columnId;
setColumnIdIsSet(true);
return this;
}
public void unsetColumnId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
/** Returns true if field columnId is set (has been assigned a value) and false otherwise */
public boolean isSetColumnId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
public void setColumnIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value);
}
public int getKeysSize() {
return (this.keys == null) ? 0 : this.keys.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.nio.ByteBuffer> getKeysIterator() {
return (this.keys == null) ? null : this.keys.iterator();
}
public void addToKeys(java.nio.ByteBuffer elem) {
if (this.keys == null) {
this.keys = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.keys.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.nio.ByteBuffer> getKeys() {
return this.keys;
}
public getForUpdate_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> keys) {
this.keys = keys;
return this;
}
public void unsetKeys() {
this.keys = null;
}
/** Returns true if field keys is set (has been assigned a value) and false otherwise */
public boolean isSetKeys() {
return this.keys != null;
}
public void setKeysIsSet(boolean value) {
if (!value) {
this.keys = null;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
if (value == null) {
unsetTransactionOrUpdateId();
} else {
setTransactionOrUpdateId((java.lang.Long)value);
}
break;
case COLUMN_ID:
if (value == null) {
unsetColumnId();
} else {
setColumnId((java.lang.Long)value);
}
break;
case KEYS:
if (value == null) {
unsetKeys();
} else {
setKeys((java.util.List<java.nio.ByteBuffer>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
return getTransactionOrUpdateId();
case COLUMN_ID:
return getColumnId();
case KEYS:
return getKeys();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
return isSetTransactionOrUpdateId();
case COLUMN_ID:
return isSetColumnId();
case KEYS:
return isSetKeys();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof getForUpdate_args)
return this.equals((getForUpdate_args)that);
return false;
}
public boolean equals(getForUpdate_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_transactionOrUpdateId = true;
boolean that_present_transactionOrUpdateId = true;
if (this_present_transactionOrUpdateId || that_present_transactionOrUpdateId) {
if (!(this_present_transactionOrUpdateId && that_present_transactionOrUpdateId))
return false;
if (this.transactionOrUpdateId != that.transactionOrUpdateId)
return false;
}
boolean this_present_columnId = true;
boolean that_present_columnId = true;
if (this_present_columnId || that_present_columnId) {
if (!(this_present_columnId && that_present_columnId))
return false;
if (this.columnId != that.columnId)
return false;
}
boolean this_present_keys = true && this.isSetKeys();
boolean that_present_keys = true && that.isSetKeys();
if (this_present_keys || that_present_keys) {
if (!(this_present_keys && that_present_keys))
return false;
if (!this.keys.equals(that.keys))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionOrUpdateId);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId);
hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287);
if (isSetKeys())
hashCode = hashCode * 8191 + keys.hashCode();
return hashCode;
}
@Override
public int compareTo(getForUpdate_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetTransactionOrUpdateId(), other.isSetTransactionOrUpdateId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTransactionOrUpdateId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionOrUpdateId, other.transactionOrUpdateId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetKeys()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getForUpdate_args(");
boolean first = true;
sb.append("transactionOrUpdateId:");
sb.append(this.transactionOrUpdateId);
first = false;
if (!first) sb.append(", ");
sb.append("columnId:");
sb.append(this.columnId);
first = false;
if (!first) sb.append(", ");
sb.append("keys:");
if (this.keys == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.keys, sb);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'transactionOrUpdateId' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator.
if (keys == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString());
}
// 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, java.lang.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 getForUpdate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public getForUpdate_argsStandardScheme getScheme() {
return new getForUpdate_argsStandardScheme();
}
}
private static class getForUpdate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getForUpdate_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getForUpdate_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: // TRANSACTION_OR_UPDATE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.transactionOrUpdateId = iprot.readI64();
struct.setTransactionOrUpdateIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // COLUMN_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // KEYS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list64 = iprot.readListBegin();
struct.keys = new java.util.ArrayList<java.nio.ByteBuffer>(_list64.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem65;
for (int _i66 = 0; _i66 < _list64.size; ++_i66)
{
_elem65 = iprot.readBinary();
struct.keys.add(_elem65);
}
iprot.readListEnd();
}
struct.setKeysIsSet(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
if (!struct.isSetTransactionOrUpdateId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionOrUpdateId' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetColumnId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getForUpdate_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(TRANSACTION_OR_UPDATE_ID_FIELD_DESC);
oprot.writeI64(struct.transactionOrUpdateId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC);
oprot.writeI64(struct.columnId);
oprot.writeFieldEnd();
if (struct.keys != null) {
oprot.writeFieldBegin(KEYS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size()));
for (java.nio.ByteBuffer _iter67 : struct.keys)
{
oprot.writeBinary(_iter67);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getForUpdate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public getForUpdate_argsTupleScheme getScheme() {
return new getForUpdate_argsTupleScheme();
}
}
private static class getForUpdate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getForUpdate_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getForUpdate_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.transactionOrUpdateId);
oprot.writeI64(struct.columnId);
{
oprot.writeI32(struct.keys.size());
for (java.nio.ByteBuffer _iter68 : struct.keys)
{
oprot.writeBinary(_iter68);
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getForUpdate_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.transactionOrUpdateId = iprot.readI64();
struct.setTransactionOrUpdateIdIsSet(true);
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
{
org.apache.thrift.protocol.TList _list69 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.keys = new java.util.ArrayList<java.nio.ByteBuffer>(_list69.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem70;
for (int _i71 = 0; _i71 < _list69.size; ++_i71)
{
_elem70 = iprot.readBinary();
struct.keys.add(_elem70);
}
}
struct.setKeysIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getForUpdate_result implements org.apache.thrift.TBase<getForUpdate_result, getForUpdate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getForUpdate_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getForUpdate_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getForUpdate_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getForUpdate_resultTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable UpdateBegin 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UpdateBegin.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getForUpdate_result.class, metaDataMap);
}
public getForUpdate_result() {
}
public getForUpdate_result(
UpdateBegin success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getForUpdate_result(getForUpdate_result other) {
if (other.isSetSuccess()) {
this.success = new UpdateBegin(other.success);
}
}
@Override
public getForUpdate_result deepCopy() {
return new getForUpdate_result(this);
}
@Override
public void clear() {
this.success = null;
}
@org.apache.thrift.annotation.Nullable
public UpdateBegin getSuccess() {
return this.success;
}
public getForUpdate_result setSuccess(@org.apache.thrift.annotation.Nullable UpdateBegin 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;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((UpdateBegin)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof getForUpdate_result)
return this.equals((getForUpdate_result)that);
return false;
}
public boolean equals(getForUpdate_result that) {
if (that == null)
return false;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
return hashCode;
}
@Override
public int compareTo(getForUpdate_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getForUpdate_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 getForUpdate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public getForUpdate_resultStandardScheme getScheme() {
return new getForUpdate_resultStandardScheme();
}
}
private static class getForUpdate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getForUpdate_result> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getForUpdate_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new UpdateBegin();
struct.success.read(iprot);
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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getForUpdate_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getForUpdate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public getForUpdate_resultTupleScheme getScheme() {
return new getForUpdate_resultTupleScheme();
}
}
private static class getForUpdate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getForUpdate_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getForUpdate_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getForUpdate_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = new UpdateBegin();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class exists_args implements org.apache.thrift.TBase<exists_args, exists_args._Fields>, java.io.Serializable, Cloneable, Comparable<exists_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exists_args");
private static final org.apache.thrift.protocol.TField TRANSACTION_OR_UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionOrUpdateId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new exists_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new exists_argsTupleSchemeFactory();
public long transactionOrUpdateId; // required
public long columnId; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> keys; // 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 {
TRANSACTION_OR_UPDATE_ID((short)1, "transactionOrUpdateId"),
COLUMN_ID((short)3, "columnId"),
KEYS((short)4, "keys");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TRANSACTION_OR_UPDATE_ID
return TRANSACTION_OR_UPDATE_ID;
case 3: // COLUMN_ID
return COLUMN_ID;
case 4: // KEYS
return KEYS;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __TRANSACTIONORUPDATEID_ISSET_ID = 0;
private static final int __COLUMNID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TRANSACTION_OR_UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionOrUpdateId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exists_args.class, metaDataMap);
}
public exists_args() {
}
public exists_args(
long transactionOrUpdateId,
long columnId,
java.util.List<java.nio.ByteBuffer> keys)
{
this();
this.transactionOrUpdateId = transactionOrUpdateId;
setTransactionOrUpdateIdIsSet(true);
this.columnId = columnId;
setColumnIdIsSet(true);
this.keys = keys;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public exists_args(exists_args other) {
__isset_bitfield = other.__isset_bitfield;
this.transactionOrUpdateId = other.transactionOrUpdateId;
this.columnId = other.columnId;
if (other.isSetKeys()) {
java.util.List<java.nio.ByteBuffer> __this__keys = new java.util.ArrayList<java.nio.ByteBuffer>(other.keys);
this.keys = __this__keys;
}
}
@Override
public exists_args deepCopy() {
return new exists_args(this);
}
@Override
public void clear() {
setTransactionOrUpdateIdIsSet(false);
this.transactionOrUpdateId = 0;
setColumnIdIsSet(false);
this.columnId = 0;
this.keys = null;
}
public long getTransactionOrUpdateId() {
return this.transactionOrUpdateId;
}
public exists_args setTransactionOrUpdateId(long transactionOrUpdateId) {
this.transactionOrUpdateId = transactionOrUpdateId;
setTransactionOrUpdateIdIsSet(true);
return this;
}
public void unsetTransactionOrUpdateId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID);
}
/** Returns true if field transactionOrUpdateId is set (has been assigned a value) and false otherwise */
public boolean isSetTransactionOrUpdateId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID);
}
public void setTransactionOrUpdateIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONORUPDATEID_ISSET_ID, value);
}
public long getColumnId() {
return this.columnId;
}
public exists_args setColumnId(long columnId) {
this.columnId = columnId;
setColumnIdIsSet(true);
return this;
}
public void unsetColumnId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
/** Returns true if field columnId is set (has been assigned a value) and false otherwise */
public boolean isSetColumnId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
public void setColumnIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value);
}
public int getKeysSize() {
return (this.keys == null) ? 0 : this.keys.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.nio.ByteBuffer> getKeysIterator() {
return (this.keys == null) ? null : this.keys.iterator();
}
public void addToKeys(java.nio.ByteBuffer elem) {
if (this.keys == null) {
this.keys = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.keys.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.nio.ByteBuffer> getKeys() {
return this.keys;
}
public exists_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> keys) {
this.keys = keys;
return this;
}
public void unsetKeys() {
this.keys = null;
}
/** Returns true if field keys is set (has been assigned a value) and false otherwise */
public boolean isSetKeys() {
return this.keys != null;
}
public void setKeysIsSet(boolean value) {
if (!value) {
this.keys = null;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
if (value == null) {
unsetTransactionOrUpdateId();
} else {
setTransactionOrUpdateId((java.lang.Long)value);
}
break;
case COLUMN_ID:
if (value == null) {
unsetColumnId();
} else {
setColumnId((java.lang.Long)value);
}
break;
case KEYS:
if (value == null) {
unsetKeys();
} else {
setKeys((java.util.List<java.nio.ByteBuffer>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
return getTransactionOrUpdateId();
case COLUMN_ID:
return getColumnId();
case KEYS:
return getKeys();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case TRANSACTION_OR_UPDATE_ID:
return isSetTransactionOrUpdateId();
case COLUMN_ID:
return isSetColumnId();
case KEYS:
return isSetKeys();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof exists_args)
return this.equals((exists_args)that);
return false;
}
public boolean equals(exists_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_transactionOrUpdateId = true;
boolean that_present_transactionOrUpdateId = true;
if (this_present_transactionOrUpdateId || that_present_transactionOrUpdateId) {
if (!(this_present_transactionOrUpdateId && that_present_transactionOrUpdateId))
return false;
if (this.transactionOrUpdateId != that.transactionOrUpdateId)
return false;
}
boolean this_present_columnId = true;
boolean that_present_columnId = true;
if (this_present_columnId || that_present_columnId) {
if (!(this_present_columnId && that_present_columnId))
return false;
if (this.columnId != that.columnId)
return false;
}
boolean this_present_keys = true && this.isSetKeys();
boolean that_present_keys = true && that.isSetKeys();
if (this_present_keys || that_present_keys) {
if (!(this_present_keys && that_present_keys))
return false;
if (!this.keys.equals(that.keys))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionOrUpdateId);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId);
hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287);
if (isSetKeys())
hashCode = hashCode * 8191 + keys.hashCode();
return hashCode;
}
@Override
public int compareTo(exists_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetTransactionOrUpdateId(), other.isSetTransactionOrUpdateId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTransactionOrUpdateId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionOrUpdateId, other.transactionOrUpdateId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetKeys()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("exists_args(");
boolean first = true;
sb.append("transactionOrUpdateId:");
sb.append(this.transactionOrUpdateId);
first = false;
if (!first) sb.append(", ");
sb.append("columnId:");
sb.append(this.columnId);
first = false;
if (!first) sb.append(", ");
sb.append("keys:");
if (this.keys == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.keys, sb);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'transactionOrUpdateId' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator.
if (keys == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString());
}
// 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, java.lang.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 exists_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public exists_argsStandardScheme getScheme() {
return new exists_argsStandardScheme();
}
}
private static class exists_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<exists_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, exists_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: // TRANSACTION_OR_UPDATE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.transactionOrUpdateId = iprot.readI64();
struct.setTransactionOrUpdateIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // COLUMN_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // KEYS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list72 = iprot.readListBegin();
struct.keys = new java.util.ArrayList<java.nio.ByteBuffer>(_list72.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem73;
for (int _i74 = 0; _i74 < _list72.size; ++_i74)
{
_elem73 = iprot.readBinary();
struct.keys.add(_elem73);
}
iprot.readListEnd();
}
struct.setKeysIsSet(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
if (!struct.isSetTransactionOrUpdateId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionOrUpdateId' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetColumnId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, exists_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(TRANSACTION_OR_UPDATE_ID_FIELD_DESC);
oprot.writeI64(struct.transactionOrUpdateId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC);
oprot.writeI64(struct.columnId);
oprot.writeFieldEnd();
if (struct.keys != null) {
oprot.writeFieldBegin(KEYS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size()));
for (java.nio.ByteBuffer _iter75 : struct.keys)
{
oprot.writeBinary(_iter75);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class exists_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public exists_argsTupleScheme getScheme() {
return new exists_argsTupleScheme();
}
}
private static class exists_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<exists_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, exists_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.transactionOrUpdateId);
oprot.writeI64(struct.columnId);
{
oprot.writeI32(struct.keys.size());
for (java.nio.ByteBuffer _iter76 : struct.keys)
{
oprot.writeBinary(_iter76);
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, exists_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.transactionOrUpdateId = iprot.readI64();
struct.setTransactionOrUpdateIdIsSet(true);
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
{
org.apache.thrift.protocol.TList _list77 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.keys = new java.util.ArrayList<java.nio.ByteBuffer>(_list77.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem78;
for (int _i79 = 0; _i79 < _list77.size; ++_i79)
{
_elem78 = iprot.readBinary();
struct.keys.add(_elem78);
}
}
struct.setKeysIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class exists_result implements org.apache.thrift.TBase<exists_result, exists_result._Fields>, java.io.Serializable, Cloneable, Comparable<exists_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exists_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new exists_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new exists_resultTupleSchemeFactory();
public boolean 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.BOOL)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exists_result.class, metaDataMap);
}
public exists_result() {
}
public exists_result(
boolean success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public exists_result(exists_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
}
@Override
public exists_result deepCopy() {
return new exists_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
}
public boolean isSuccess() {
return this.success;
}
public exists_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof exists_result)
return this.equals((exists_result)that);
return false;
}
public boolean equals(exists_result that) {
if (that == null)
return false;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
return hashCode;
}
@Override
public int compareTo(exists_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("exists_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, java.lang.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 exists_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public exists_resultStandardScheme getScheme() {
return new exists_resultStandardScheme();
}
}
private static class exists_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<exists_result> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, exists_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.BOOL) {
struct.success = iprot.readBool();
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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, exists_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class exists_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public exists_resultTupleScheme getScheme() {
return new exists_resultTupleScheme();
}
}
private static class exists_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<exists_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, exists_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, exists_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class openIterator_args implements org.apache.thrift.TBase<openIterator_args, openIterator_args._Fields>, java.io.Serializable, Cloneable, Comparable<openIterator_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("openIterator_args");
private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField COLUMN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("columnId", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField START_KEYS_INCLUSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("startKeysInclusive", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField END_KEYS_EXCLUSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("endKeysExclusive", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final org.apache.thrift.protocol.TField REVERSE_FIELD_DESC = new org.apache.thrift.protocol.TField("reverse", org.apache.thrift.protocol.TType.BOOL, (short)5);
private static final org.apache.thrift.protocol.TField TIMEOUT_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("timeoutMs", org.apache.thrift.protocol.TType.I64, (short)6);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new openIterator_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new openIterator_argsTupleSchemeFactory();
public long transactionId; // required
public long columnId; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> startKeysInclusive; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> endKeysExclusive; // required
public boolean reverse; // required
public long timeoutMs; // 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 {
TRANSACTION_ID((short)1, "transactionId"),
COLUMN_ID((short)2, "columnId"),
START_KEYS_INCLUSIVE((short)3, "startKeysInclusive"),
END_KEYS_EXCLUSIVE((short)4, "endKeysExclusive"),
REVERSE((short)5, "reverse"),
TIMEOUT_MS((short)6, "timeoutMs");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TRANSACTION_ID
return TRANSACTION_ID;
case 2: // COLUMN_ID
return COLUMN_ID;
case 3: // START_KEYS_INCLUSIVE
return START_KEYS_INCLUSIVE;
case 4: // END_KEYS_EXCLUSIVE
return END_KEYS_EXCLUSIVE;
case 5: // REVERSE
return REVERSE;
case 6: // TIMEOUT_MS
return TIMEOUT_MS;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __TRANSACTIONID_ISSET_ID = 0;
private static final int __COLUMNID_ISSET_ID = 1;
private static final int __REVERSE_ISSET_ID = 2;
private static final int __TIMEOUTMS_ISSET_ID = 3;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.COLUMN_ID, new org.apache.thrift.meta_data.FieldMetaData("columnId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.START_KEYS_INCLUSIVE, new org.apache.thrift.meta_data.FieldMetaData("startKeysInclusive", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
tmpMap.put(_Fields.END_KEYS_EXCLUSIVE, new org.apache.thrift.meta_data.FieldMetaData("endKeysExclusive", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
tmpMap.put(_Fields.REVERSE, new org.apache.thrift.meta_data.FieldMetaData("reverse", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.TIMEOUT_MS, new org.apache.thrift.meta_data.FieldMetaData("timeoutMs", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(openIterator_args.class, metaDataMap);
}
public openIterator_args() {
}
public openIterator_args(
long transactionId,
long columnId,
java.util.List<java.nio.ByteBuffer> startKeysInclusive,
java.util.List<java.nio.ByteBuffer> endKeysExclusive,
boolean reverse,
long timeoutMs)
{
this();
this.transactionId = transactionId;
setTransactionIdIsSet(true);
this.columnId = columnId;
setColumnIdIsSet(true);
this.startKeysInclusive = startKeysInclusive;
this.endKeysExclusive = endKeysExclusive;
this.reverse = reverse;
setReverseIsSet(true);
this.timeoutMs = timeoutMs;
setTimeoutMsIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public openIterator_args(openIterator_args other) {
__isset_bitfield = other.__isset_bitfield;
this.transactionId = other.transactionId;
this.columnId = other.columnId;
if (other.isSetStartKeysInclusive()) {
java.util.List<java.nio.ByteBuffer> __this__startKeysInclusive = new java.util.ArrayList<java.nio.ByteBuffer>(other.startKeysInclusive);
this.startKeysInclusive = __this__startKeysInclusive;
}
if (other.isSetEndKeysExclusive()) {
java.util.List<java.nio.ByteBuffer> __this__endKeysExclusive = new java.util.ArrayList<java.nio.ByteBuffer>(other.endKeysExclusive);
this.endKeysExclusive = __this__endKeysExclusive;
}
this.reverse = other.reverse;
this.timeoutMs = other.timeoutMs;
}
@Override
public openIterator_args deepCopy() {
return new openIterator_args(this);
}
@Override
public void clear() {
setTransactionIdIsSet(false);
this.transactionId = 0;
setColumnIdIsSet(false);
this.columnId = 0;
this.startKeysInclusive = null;
this.endKeysExclusive = null;
setReverseIsSet(false);
this.reverse = false;
setTimeoutMsIsSet(false);
this.timeoutMs = 0;
}
public long getTransactionId() {
return this.transactionId;
}
public openIterator_args setTransactionId(long transactionId) {
this.transactionId = transactionId;
setTransactionIdIsSet(true);
return this;
}
public void unsetTransactionId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTIONID_ISSET_ID);
}
/** Returns true if field transactionId is set (has been assigned a value) and false otherwise */
public boolean isSetTransactionId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTIONID_ISSET_ID);
}
public void setTransactionIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTIONID_ISSET_ID, value);
}
public long getColumnId() {
return this.columnId;
}
public openIterator_args setColumnId(long columnId) {
this.columnId = columnId;
setColumnIdIsSet(true);
return this;
}
public void unsetColumnId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
/** Returns true if field columnId is set (has been assigned a value) and false otherwise */
public boolean isSetColumnId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COLUMNID_ISSET_ID);
}
public void setColumnIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COLUMNID_ISSET_ID, value);
}
public int getStartKeysInclusiveSize() {
return (this.startKeysInclusive == null) ? 0 : this.startKeysInclusive.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.nio.ByteBuffer> getStartKeysInclusiveIterator() {
return (this.startKeysInclusive == null) ? null : this.startKeysInclusive.iterator();
}
public void addToStartKeysInclusive(java.nio.ByteBuffer elem) {
if (this.startKeysInclusive == null) {
this.startKeysInclusive = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.startKeysInclusive.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.nio.ByteBuffer> getStartKeysInclusive() {
return this.startKeysInclusive;
}
public openIterator_args setStartKeysInclusive(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> startKeysInclusive) {
this.startKeysInclusive = startKeysInclusive;
return this;
}
public void unsetStartKeysInclusive() {
this.startKeysInclusive = null;
}
/** Returns true if field startKeysInclusive is set (has been assigned a value) and false otherwise */
public boolean isSetStartKeysInclusive() {
return this.startKeysInclusive != null;
}
public void setStartKeysInclusiveIsSet(boolean value) {
if (!value) {
this.startKeysInclusive = null;
}
}
public int getEndKeysExclusiveSize() {
return (this.endKeysExclusive == null) ? 0 : this.endKeysExclusive.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.nio.ByteBuffer> getEndKeysExclusiveIterator() {
return (this.endKeysExclusive == null) ? null : this.endKeysExclusive.iterator();
}
public void addToEndKeysExclusive(java.nio.ByteBuffer elem) {
if (this.endKeysExclusive == null) {
this.endKeysExclusive = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.endKeysExclusive.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.nio.ByteBuffer> getEndKeysExclusive() {
return this.endKeysExclusive;
}
public openIterator_args setEndKeysExclusive(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> endKeysExclusive) {
this.endKeysExclusive = endKeysExclusive;
return this;
}
public void unsetEndKeysExclusive() {
this.endKeysExclusive = null;
}
/** Returns true if field endKeysExclusive is set (has been assigned a value) and false otherwise */
public boolean isSetEndKeysExclusive() {
return this.endKeysExclusive != null;
}
public void setEndKeysExclusiveIsSet(boolean value) {
if (!value) {
this.endKeysExclusive = null;
}
}
public boolean isReverse() {
return this.reverse;
}
public openIterator_args setReverse(boolean reverse) {
this.reverse = reverse;
setReverseIsSet(true);
return this;
}
public void unsetReverse() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REVERSE_ISSET_ID);
}
/** Returns true if field reverse is set (has been assigned a value) and false otherwise */
public boolean isSetReverse() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REVERSE_ISSET_ID);
}
public void setReverseIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REVERSE_ISSET_ID, value);
}
public long getTimeoutMs() {
return this.timeoutMs;
}
public openIterator_args setTimeoutMs(long timeoutMs) {
this.timeoutMs = timeoutMs;
setTimeoutMsIsSet(true);
return this;
}
public void unsetTimeoutMs() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID);
}
/** Returns true if field timeoutMs is set (has been assigned a value) and false otherwise */
public boolean isSetTimeoutMs() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID);
}
public void setTimeoutMsIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TRANSACTION_ID:
if (value == null) {
unsetTransactionId();
} else {
setTransactionId((java.lang.Long)value);
}
break;
case COLUMN_ID:
if (value == null) {
unsetColumnId();
} else {
setColumnId((java.lang.Long)value);
}
break;
case START_KEYS_INCLUSIVE:
if (value == null) {
unsetStartKeysInclusive();
} else {
setStartKeysInclusive((java.util.List<java.nio.ByteBuffer>)value);
}
break;
case END_KEYS_EXCLUSIVE:
if (value == null) {
unsetEndKeysExclusive();
} else {
setEndKeysExclusive((java.util.List<java.nio.ByteBuffer>)value);
}
break;
case REVERSE:
if (value == null) {
unsetReverse();
} else {
setReverse((java.lang.Boolean)value);
}
break;
case TIMEOUT_MS:
if (value == null) {
unsetTimeoutMs();
} else {
setTimeoutMs((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TRANSACTION_ID:
return getTransactionId();
case COLUMN_ID:
return getColumnId();
case START_KEYS_INCLUSIVE:
return getStartKeysInclusive();
case END_KEYS_EXCLUSIVE:
return getEndKeysExclusive();
case REVERSE:
return isReverse();
case TIMEOUT_MS:
return getTimeoutMs();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case TRANSACTION_ID:
return isSetTransactionId();
case COLUMN_ID:
return isSetColumnId();
case START_KEYS_INCLUSIVE:
return isSetStartKeysInclusive();
case END_KEYS_EXCLUSIVE:
return isSetEndKeysExclusive();
case REVERSE:
return isSetReverse();
case TIMEOUT_MS:
return isSetTimeoutMs();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof openIterator_args)
return this.equals((openIterator_args)that);
return false;
}
public boolean equals(openIterator_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_transactionId = true;
boolean that_present_transactionId = true;
if (this_present_transactionId || that_present_transactionId) {
if (!(this_present_transactionId && that_present_transactionId))
return false;
if (this.transactionId != that.transactionId)
return false;
}
boolean this_present_columnId = true;
boolean that_present_columnId = true;
if (this_present_columnId || that_present_columnId) {
if (!(this_present_columnId && that_present_columnId))
return false;
if (this.columnId != that.columnId)
return false;
}
boolean this_present_startKeysInclusive = true && this.isSetStartKeysInclusive();
boolean that_present_startKeysInclusive = true && that.isSetStartKeysInclusive();
if (this_present_startKeysInclusive || that_present_startKeysInclusive) {
if (!(this_present_startKeysInclusive && that_present_startKeysInclusive))
return false;
if (!this.startKeysInclusive.equals(that.startKeysInclusive))
return false;
}
boolean this_present_endKeysExclusive = true && this.isSetEndKeysExclusive();
boolean that_present_endKeysExclusive = true && that.isSetEndKeysExclusive();
if (this_present_endKeysExclusive || that_present_endKeysExclusive) {
if (!(this_present_endKeysExclusive && that_present_endKeysExclusive))
return false;
if (!this.endKeysExclusive.equals(that.endKeysExclusive))
return false;
}
boolean this_present_reverse = true;
boolean that_present_reverse = true;
if (this_present_reverse || that_present_reverse) {
if (!(this_present_reverse && that_present_reverse))
return false;
if (this.reverse != that.reverse)
return false;
}
boolean this_present_timeoutMs = true;
boolean that_present_timeoutMs = true;
if (this_present_timeoutMs || that_present_timeoutMs) {
if (!(this_present_timeoutMs && that_present_timeoutMs))
return false;
if (this.timeoutMs != that.timeoutMs)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transactionId);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(columnId);
hashCode = hashCode * 8191 + ((isSetStartKeysInclusive()) ? 131071 : 524287);
if (isSetStartKeysInclusive())
hashCode = hashCode * 8191 + startKeysInclusive.hashCode();
hashCode = hashCode * 8191 + ((isSetEndKeysExclusive()) ? 131071 : 524287);
if (isSetEndKeysExclusive())
hashCode = hashCode * 8191 + endKeysExclusive.hashCode();
hashCode = hashCode * 8191 + ((reverse) ? 131071 : 524287);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeoutMs);
return hashCode;
}
@Override
public int compareTo(openIterator_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetTransactionId(), other.isSetTransactionId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTransactionId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionId, other.transactionId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnId(), other.isSetColumnId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnId, other.columnId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetStartKeysInclusive(), other.isSetStartKeysInclusive());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStartKeysInclusive()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startKeysInclusive, other.startKeysInclusive);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetEndKeysExclusive(), other.isSetEndKeysExclusive());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEndKeysExclusive()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endKeysExclusive, other.endKeysExclusive);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetReverse(), other.isSetReverse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReverse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reverse, other.reverse);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTimeoutMs(), other.isSetTimeoutMs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimeoutMs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeoutMs, other.timeoutMs);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("openIterator_args(");
boolean first = true;
sb.append("transactionId:");
sb.append(this.transactionId);
first = false;
if (!first) sb.append(", ");
sb.append("columnId:");
sb.append(this.columnId);
first = false;
if (!first) sb.append(", ");
sb.append("startKeysInclusive:");
if (this.startKeysInclusive == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.startKeysInclusive, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("endKeysExclusive:");
if (this.endKeysExclusive == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.endKeysExclusive, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("reverse:");
sb.append(this.reverse);
first = false;
if (!first) sb.append(", ");
sb.append("timeoutMs:");
sb.append(this.timeoutMs);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'transactionId' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'columnId' because it's a primitive and you chose the non-beans generator.
if (startKeysInclusive == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'startKeysInclusive' was not present! Struct: " + toString());
}
// alas, we cannot check 'reverse' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'timeoutMs' because it's a primitive and you chose the non-beans generator.
// 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, java.lang.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 openIterator_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public openIterator_argsStandardScheme getScheme() {
return new openIterator_argsStandardScheme();
}
}
private static class openIterator_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<openIterator_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, openIterator_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: // TRANSACTION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.transactionId = iprot.readI64();
struct.setTransactionIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // COLUMN_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // START_KEYS_INCLUSIVE
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list80 = iprot.readListBegin();
struct.startKeysInclusive = new java.util.ArrayList<java.nio.ByteBuffer>(_list80.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem81;
for (int _i82 = 0; _i82 < _list80.size; ++_i82)
{
_elem81 = iprot.readBinary();
struct.startKeysInclusive.add(_elem81);
}
iprot.readListEnd();
}
struct.setStartKeysInclusiveIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // END_KEYS_EXCLUSIVE
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list83 = iprot.readListBegin();
struct.endKeysExclusive = new java.util.ArrayList<java.nio.ByteBuffer>(_list83.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem84;
for (int _i85 = 0; _i85 < _list83.size; ++_i85)
{
_elem84 = iprot.readBinary();
struct.endKeysExclusive.add(_elem84);
}
iprot.readListEnd();
}
struct.setEndKeysExclusiveIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // REVERSE
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.reverse = iprot.readBool();
struct.setReverseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // TIMEOUT_MS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timeoutMs = iprot.readI64();
struct.setTimeoutMsIsSet(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
if (!struct.isSetTransactionId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'transactionId' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetColumnId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnId' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetReverse()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'reverse' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetTimeoutMs()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'timeoutMs' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, openIterator_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
oprot.writeI64(struct.transactionId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(COLUMN_ID_FIELD_DESC);
oprot.writeI64(struct.columnId);
oprot.writeFieldEnd();
if (struct.startKeysInclusive != null) {
oprot.writeFieldBegin(START_KEYS_INCLUSIVE_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.startKeysInclusive.size()));
for (java.nio.ByteBuffer _iter86 : struct.startKeysInclusive)
{
oprot.writeBinary(_iter86);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.endKeysExclusive != null) {
oprot.writeFieldBegin(END_KEYS_EXCLUSIVE_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.endKeysExclusive.size()));
for (java.nio.ByteBuffer _iter87 : struct.endKeysExclusive)
{
oprot.writeBinary(_iter87);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(REVERSE_FIELD_DESC);
oprot.writeBool(struct.reverse);
oprot.writeFieldEnd();
oprot.writeFieldBegin(TIMEOUT_MS_FIELD_DESC);
oprot.writeI64(struct.timeoutMs);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class openIterator_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public openIterator_argsTupleScheme getScheme() {
return new openIterator_argsTupleScheme();
}
}
private static class openIterator_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<openIterator_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, openIterator_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.transactionId);
oprot.writeI64(struct.columnId);
{
oprot.writeI32(struct.startKeysInclusive.size());
for (java.nio.ByteBuffer _iter88 : struct.startKeysInclusive)
{
oprot.writeBinary(_iter88);
}
}
oprot.writeBool(struct.reverse);
oprot.writeI64(struct.timeoutMs);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetEndKeysExclusive()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetEndKeysExclusive()) {
{
oprot.writeI32(struct.endKeysExclusive.size());
for (java.nio.ByteBuffer _iter89 : struct.endKeysExclusive)
{
oprot.writeBinary(_iter89);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, openIterator_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.transactionId = iprot.readI64();
struct.setTransactionIdIsSet(true);
struct.columnId = iprot.readI64();
struct.setColumnIdIsSet(true);
{
org.apache.thrift.protocol.TList _list90 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.startKeysInclusive = new java.util.ArrayList<java.nio.ByteBuffer>(_list90.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem91;
for (int _i92 = 0; _i92 < _list90.size; ++_i92)
{
_elem91 = iprot.readBinary();
struct.startKeysInclusive.add(_elem91);
}
}
struct.setStartKeysInclusiveIsSet(true);
struct.reverse = iprot.readBool();
struct.setReverseIsSet(true);
struct.timeoutMs = iprot.readI64();
struct.setTimeoutMsIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list93 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.endKeysExclusive = new java.util.ArrayList<java.nio.ByteBuffer>(_list93.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem94;
for (int _i95 = 0; _i95 < _list93.size; ++_i95)
{
_elem94 = iprot.readBinary();
struct.endKeysExclusive.add(_elem94);
}
}
struct.setEndKeysExclusiveIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class openIterator_result implements org.apache.thrift.TBase<openIterator_result, openIterator_result._Fields>, java.io.Serializable, Cloneable, Comparable<openIterator_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("openIterator_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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new openIterator_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new openIterator_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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(openIterator_result.class, metaDataMap);
}
public openIterator_result() {
}
public openIterator_result(
long success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public openIterator_result(openIterator_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
}
@Override
public openIterator_result deepCopy() {
return new openIterator_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = 0;
}
public long getSuccess() {
return this.success;
}
public openIterator_result setSuccess(long success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof openIterator_result)
return this.equals((openIterator_result)that);
return false;
}
public boolean equals(openIterator_result that) {
if (that == null)
return false;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success);
return hashCode;
}
@Override
public int compareTo(openIterator_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("openIterator_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, java.lang.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 openIterator_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public openIterator_resultStandardScheme getScheme() {
return new openIterator_resultStandardScheme();
}
}
private static class openIterator_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<openIterator_result> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, openIterator_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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, openIterator_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 openIterator_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public openIterator_resultTupleScheme getScheme() {
return new openIterator_resultTupleScheme();
}
}
private static class openIterator_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<openIterator_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, openIterator_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.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, openIterator_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readI64();
struct.setSuccessIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class closeIterator_args implements org.apache.thrift.TBase<closeIterator_args, closeIterator_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeIterator_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeIterator_args");
private static final org.apache.thrift.protocol.TField ITERATOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("iteratorId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeIterator_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeIterator_argsTupleSchemeFactory();
public long iteratorId; // 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 {
ITERATOR_ID((short)1, "iteratorId");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ITERATOR_ID
return ITERATOR_ID;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __ITERATORID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ITERATOR_ID, new org.apache.thrift.meta_data.FieldMetaData("iteratorId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeIterator_args.class, metaDataMap);
}
public closeIterator_args() {
}
public closeIterator_args(
long iteratorId)
{
this();
this.iteratorId = iteratorId;
setIteratorIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public closeIterator_args(closeIterator_args other) {
__isset_bitfield = other.__isset_bitfield;
this.iteratorId = other.iteratorId;
}
@Override
public closeIterator_args deepCopy() {
return new closeIterator_args(this);
}
@Override
public void clear() {
setIteratorIdIsSet(false);
this.iteratorId = 0;
}
public long getIteratorId() {
return this.iteratorId;
}
public closeIterator_args setIteratorId(long iteratorId) {
this.iteratorId = iteratorId;
setIteratorIdIsSet(true);
return this;
}
public void unsetIteratorId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ITERATORID_ISSET_ID);
}
/** Returns true if field iteratorId is set (has been assigned a value) and false otherwise */
public boolean isSetIteratorId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ITERATORID_ISSET_ID);
}
public void setIteratorIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ITERATORID_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ITERATOR_ID:
if (value == null) {
unsetIteratorId();
} else {
setIteratorId((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ITERATOR_ID:
return getIteratorId();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case ITERATOR_ID:
return isSetIteratorId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof closeIterator_args)
return this.equals((closeIterator_args)that);
return false;
}
public boolean equals(closeIterator_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_iteratorId = true;
boolean that_present_iteratorId = true;
if (this_present_iteratorId || that_present_iteratorId) {
if (!(this_present_iteratorId && that_present_iteratorId))
return false;
if (this.iteratorId != that.iteratorId)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(iteratorId);
return hashCode;
}
@Override
public int compareTo(closeIterator_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetIteratorId(), other.isSetIteratorId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIteratorId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iteratorId, other.iteratorId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("closeIterator_args(");
boolean first = true;
sb.append("iteratorId:");
sb.append(this.iteratorId);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'iteratorId' because it's a primitive and you chose the non-beans generator.
// 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, java.lang.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 closeIterator_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public closeIterator_argsStandardScheme getScheme() {
return new closeIterator_argsStandardScheme();
}
}
private static class closeIterator_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<closeIterator_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, closeIterator_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: // ITERATOR_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.iteratorId = iprot.readI64();
struct.setIteratorIdIsSet(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
if (!struct.isSetIteratorId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'iteratorId' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, closeIterator_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(ITERATOR_ID_FIELD_DESC);
oprot.writeI64(struct.iteratorId);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class closeIterator_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public closeIterator_argsTupleScheme getScheme() {
return new closeIterator_argsTupleScheme();
}
}
private static class closeIterator_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<closeIterator_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, closeIterator_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.iteratorId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, closeIterator_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.iteratorId = iprot.readI64();
struct.setIteratorIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class closeIterator_result implements org.apache.thrift.TBase<closeIterator_result, closeIterator_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeIterator_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeIterator_result");
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new closeIterator_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new closeIterator_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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeIterator_result.class, metaDataMap);
}
public closeIterator_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public closeIterator_result(closeIterator_result other) {
}
@Override
public closeIterator_result deepCopy() {
return new closeIterator_result(this);
}
@Override
public void clear() {
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof closeIterator_result)
return this.equals((closeIterator_result)that);
return false;
}
public boolean equals(closeIterator_result that) {
if (that == null)
return false;
if (this == that)
return true;
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
return hashCode;
}
@Override
public int compareTo(closeIterator_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("closeIterator_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, java.lang.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 closeIterator_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public closeIterator_resultStandardScheme getScheme() {
return new closeIterator_resultStandardScheme();
}
}
private static class closeIterator_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<closeIterator_result> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, closeIterator_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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, closeIterator_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class closeIterator_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public closeIterator_resultTupleScheme getScheme() {
return new closeIterator_resultTupleScheme();
}
}
private static class closeIterator_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<closeIterator_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, closeIterator_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, closeIterator_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class seekTo_args implements org.apache.thrift.TBase<seekTo_args, seekTo_args._Fields>, java.io.Serializable, Cloneable, Comparable<seekTo_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("seekTo_args");
private static final org.apache.thrift.protocol.TField ITERATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("iterationId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new seekTo_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new seekTo_argsTupleSchemeFactory();
public long iterationId; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> keys; // 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 {
ITERATION_ID((short)1, "iterationId"),
KEYS((short)2, "keys");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ITERATION_ID
return ITERATION_ID;
case 2: // KEYS
return KEYS;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __ITERATIONID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ITERATION_ID, new org.apache.thrift.meta_data.FieldMetaData("iterationId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(seekTo_args.class, metaDataMap);
}
public seekTo_args() {
}
public seekTo_args(
long iterationId,
java.util.List<java.nio.ByteBuffer> keys)
{
this();
this.iterationId = iterationId;
setIterationIdIsSet(true);
this.keys = keys;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public seekTo_args(seekTo_args other) {
__isset_bitfield = other.__isset_bitfield;
this.iterationId = other.iterationId;
if (other.isSetKeys()) {
java.util.List<java.nio.ByteBuffer> __this__keys = new java.util.ArrayList<java.nio.ByteBuffer>(other.keys);
this.keys = __this__keys;
}
}
@Override
public seekTo_args deepCopy() {
return new seekTo_args(this);
}
@Override
public void clear() {
setIterationIdIsSet(false);
this.iterationId = 0;
this.keys = null;
}
public long getIterationId() {
return this.iterationId;
}
public seekTo_args setIterationId(long iterationId) {
this.iterationId = iterationId;
setIterationIdIsSet(true);
return this;
}
public void unsetIterationId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ITERATIONID_ISSET_ID);
}
/** Returns true if field iterationId is set (has been assigned a value) and false otherwise */
public boolean isSetIterationId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ITERATIONID_ISSET_ID);
}
public void setIterationIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ITERATIONID_ISSET_ID, value);
}
public int getKeysSize() {
return (this.keys == null) ? 0 : this.keys.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.nio.ByteBuffer> getKeysIterator() {
return (this.keys == null) ? null : this.keys.iterator();
}
public void addToKeys(java.nio.ByteBuffer elem) {
if (this.keys == null) {
this.keys = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.keys.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.nio.ByteBuffer> getKeys() {
return this.keys;
}
public seekTo_args setKeys(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> keys) {
this.keys = keys;
return this;
}
public void unsetKeys() {
this.keys = null;
}
/** Returns true if field keys is set (has been assigned a value) and false otherwise */
public boolean isSetKeys() {
return this.keys != null;
}
public void setKeysIsSet(boolean value) {
if (!value) {
this.keys = null;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ITERATION_ID:
if (value == null) {
unsetIterationId();
} else {
setIterationId((java.lang.Long)value);
}
break;
case KEYS:
if (value == null) {
unsetKeys();
} else {
setKeys((java.util.List<java.nio.ByteBuffer>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ITERATION_ID:
return getIterationId();
case KEYS:
return getKeys();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case ITERATION_ID:
return isSetIterationId();
case KEYS:
return isSetKeys();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof seekTo_args)
return this.equals((seekTo_args)that);
return false;
}
public boolean equals(seekTo_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_iterationId = true;
boolean that_present_iterationId = true;
if (this_present_iterationId || that_present_iterationId) {
if (!(this_present_iterationId && that_present_iterationId))
return false;
if (this.iterationId != that.iterationId)
return false;
}
boolean this_present_keys = true && this.isSetKeys();
boolean that_present_keys = true && that.isSetKeys();
if (this_present_keys || that_present_keys) {
if (!(this_present_keys && that_present_keys))
return false;
if (!this.keys.equals(that.keys))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(iterationId);
hashCode = hashCode * 8191 + ((isSetKeys()) ? 131071 : 524287);
if (isSetKeys())
hashCode = hashCode * 8191 + keys.hashCode();
return hashCode;
}
@Override
public int compareTo(seekTo_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetIterationId(), other.isSetIterationId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIterationId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iterationId, other.iterationId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetKeys(), other.isSetKeys());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetKeys()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys, other.keys);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("seekTo_args(");
boolean first = true;
sb.append("iterationId:");
sb.append(this.iterationId);
first = false;
if (!first) sb.append(", ");
sb.append("keys:");
if (this.keys == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.keys, sb);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'iterationId' because it's a primitive and you chose the non-beans generator.
if (keys == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys' was not present! Struct: " + toString());
}
// 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, java.lang.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 seekTo_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public seekTo_argsStandardScheme getScheme() {
return new seekTo_argsStandardScheme();
}
}
private static class seekTo_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<seekTo_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, seekTo_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: // ITERATION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.iterationId = iprot.readI64();
struct.setIterationIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // KEYS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list96 = iprot.readListBegin();
struct.keys = new java.util.ArrayList<java.nio.ByteBuffer>(_list96.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem97;
for (int _i98 = 0; _i98 < _list96.size; ++_i98)
{
_elem97 = iprot.readBinary();
struct.keys.add(_elem97);
}
iprot.readListEnd();
}
struct.setKeysIsSet(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
if (!struct.isSetIterationId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'iterationId' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, seekTo_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(ITERATION_ID_FIELD_DESC);
oprot.writeI64(struct.iterationId);
oprot.writeFieldEnd();
if (struct.keys != null) {
oprot.writeFieldBegin(KEYS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size()));
for (java.nio.ByteBuffer _iter99 : struct.keys)
{
oprot.writeBinary(_iter99);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class seekTo_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public seekTo_argsTupleScheme getScheme() {
return new seekTo_argsTupleScheme();
}
}
private static class seekTo_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<seekTo_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, seekTo_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.iterationId);
{
oprot.writeI32(struct.keys.size());
for (java.nio.ByteBuffer _iter100 : struct.keys)
{
oprot.writeBinary(_iter100);
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, seekTo_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.iterationId = iprot.readI64();
struct.setIterationIdIsSet(true);
{
org.apache.thrift.protocol.TList _list101 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.keys = new java.util.ArrayList<java.nio.ByteBuffer>(_list101.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem102;
for (int _i103 = 0; _i103 < _list101.size; ++_i103)
{
_elem102 = iprot.readBinary();
struct.keys.add(_elem102);
}
}
struct.setKeysIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class seekTo_result implements org.apache.thrift.TBase<seekTo_result, seekTo_result._Fields>, java.io.Serializable, Cloneable, Comparable<seekTo_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("seekTo_result");
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new seekTo_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new seekTo_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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(seekTo_result.class, metaDataMap);
}
public seekTo_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public seekTo_result(seekTo_result other) {
}
@Override
public seekTo_result deepCopy() {
return new seekTo_result(this);
}
@Override
public void clear() {
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof seekTo_result)
return this.equals((seekTo_result)that);
return false;
}
public boolean equals(seekTo_result that) {
if (that == null)
return false;
if (this == that)
return true;
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
return hashCode;
}
@Override
public int compareTo(seekTo_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("seekTo_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, java.lang.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 seekTo_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public seekTo_resultStandardScheme getScheme() {
return new seekTo_resultStandardScheme();
}
}
private static class seekTo_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<seekTo_result> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, seekTo_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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, seekTo_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class seekTo_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public seekTo_resultTupleScheme getScheme() {
return new seekTo_resultTupleScheme();
}
}
private static class seekTo_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<seekTo_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, seekTo_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, seekTo_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class subsequent_args implements org.apache.thrift.TBase<subsequent_args, subsequent_args._Fields>, java.io.Serializable, Cloneable, Comparable<subsequent_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("subsequent_args");
private static final org.apache.thrift.protocol.TField ITERATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("iterationId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField SKIP_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("skipCount", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField TAKE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("takeCount", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new subsequent_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new subsequent_argsTupleSchemeFactory();
public long iterationId; // required
public long skipCount; // required
public long takeCount; // 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 {
ITERATION_ID((short)1, "iterationId"),
SKIP_COUNT((short)2, "skipCount"),
TAKE_COUNT((short)3, "takeCount");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ITERATION_ID
return ITERATION_ID;
case 2: // SKIP_COUNT
return SKIP_COUNT;
case 3: // TAKE_COUNT
return TAKE_COUNT;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __ITERATIONID_ISSET_ID = 0;
private static final int __SKIPCOUNT_ISSET_ID = 1;
private static final int __TAKECOUNT_ISSET_ID = 2;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ITERATION_ID, new org.apache.thrift.meta_data.FieldMetaData("iterationId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.SKIP_COUNT, new org.apache.thrift.meta_data.FieldMetaData("skipCount", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.TAKE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("takeCount", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(subsequent_args.class, metaDataMap);
}
public subsequent_args() {
}
public subsequent_args(
long iterationId,
long skipCount,
long takeCount)
{
this();
this.iterationId = iterationId;
setIterationIdIsSet(true);
this.skipCount = skipCount;
setSkipCountIsSet(true);
this.takeCount = takeCount;
setTakeCountIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public subsequent_args(subsequent_args other) {
__isset_bitfield = other.__isset_bitfield;
this.iterationId = other.iterationId;
this.skipCount = other.skipCount;
this.takeCount = other.takeCount;
}
@Override
public subsequent_args deepCopy() {
return new subsequent_args(this);
}
@Override
public void clear() {
setIterationIdIsSet(false);
this.iterationId = 0;
setSkipCountIsSet(false);
this.skipCount = 0;
setTakeCountIsSet(false);
this.takeCount = 0;
}
public long getIterationId() {
return this.iterationId;
}
public subsequent_args setIterationId(long iterationId) {
this.iterationId = iterationId;
setIterationIdIsSet(true);
return this;
}
public void unsetIterationId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ITERATIONID_ISSET_ID);
}
/** Returns true if field iterationId is set (has been assigned a value) and false otherwise */
public boolean isSetIterationId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ITERATIONID_ISSET_ID);
}
public void setIterationIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ITERATIONID_ISSET_ID, value);
}
public long getSkipCount() {
return this.skipCount;
}
public subsequent_args setSkipCount(long skipCount) {
this.skipCount = skipCount;
setSkipCountIsSet(true);
return this;
}
public void unsetSkipCount() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SKIPCOUNT_ISSET_ID);
}
/** Returns true if field skipCount is set (has been assigned a value) and false otherwise */
public boolean isSetSkipCount() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SKIPCOUNT_ISSET_ID);
}
public void setSkipCountIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SKIPCOUNT_ISSET_ID, value);
}
public long getTakeCount() {
return this.takeCount;
}
public subsequent_args setTakeCount(long takeCount) {
this.takeCount = takeCount;
setTakeCountIsSet(true);
return this;
}
public void unsetTakeCount() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TAKECOUNT_ISSET_ID);
}
/** Returns true if field takeCount is set (has been assigned a value) and false otherwise */
public boolean isSetTakeCount() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TAKECOUNT_ISSET_ID);
}
public void setTakeCountIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TAKECOUNT_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ITERATION_ID:
if (value == null) {
unsetIterationId();
} else {
setIterationId((java.lang.Long)value);
}
break;
case SKIP_COUNT:
if (value == null) {
unsetSkipCount();
} else {
setSkipCount((java.lang.Long)value);
}
break;
case TAKE_COUNT:
if (value == null) {
unsetTakeCount();
} else {
setTakeCount((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ITERATION_ID:
return getIterationId();
case SKIP_COUNT:
return getSkipCount();
case TAKE_COUNT:
return getTakeCount();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case ITERATION_ID:
return isSetIterationId();
case SKIP_COUNT:
return isSetSkipCount();
case TAKE_COUNT:
return isSetTakeCount();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof subsequent_args)
return this.equals((subsequent_args)that);
return false;
}
public boolean equals(subsequent_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_iterationId = true;
boolean that_present_iterationId = true;
if (this_present_iterationId || that_present_iterationId) {
if (!(this_present_iterationId && that_present_iterationId))
return false;
if (this.iterationId != that.iterationId)
return false;
}
boolean this_present_skipCount = true;
boolean that_present_skipCount = true;
if (this_present_skipCount || that_present_skipCount) {
if (!(this_present_skipCount && that_present_skipCount))
return false;
if (this.skipCount != that.skipCount)
return false;
}
boolean this_present_takeCount = true;
boolean that_present_takeCount = true;
if (this_present_takeCount || that_present_takeCount) {
if (!(this_present_takeCount && that_present_takeCount))
return false;
if (this.takeCount != that.takeCount)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(iterationId);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(skipCount);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(takeCount);
return hashCode;
}
@Override
public int compareTo(subsequent_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetIterationId(), other.isSetIterationId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIterationId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iterationId, other.iterationId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSkipCount(), other.isSetSkipCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSkipCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skipCount, other.skipCount);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTakeCount(), other.isSetTakeCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTakeCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.takeCount, other.takeCount);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("subsequent_args(");
boolean first = true;
sb.append("iterationId:");
sb.append(this.iterationId);
first = false;
if (!first) sb.append(", ");
sb.append("skipCount:");
sb.append(this.skipCount);
first = false;
if (!first) sb.append(", ");
sb.append("takeCount:");
sb.append(this.takeCount);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'iterationId' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'skipCount' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'takeCount' because it's a primitive and you chose the non-beans generator.
// 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, java.lang.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 subsequent_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public subsequent_argsStandardScheme getScheme() {
return new subsequent_argsStandardScheme();
}
}
private static class subsequent_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<subsequent_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, subsequent_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: // ITERATION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.iterationId = iprot.readI64();
struct.setIterationIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // SKIP_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.skipCount = iprot.readI64();
struct.setSkipCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TAKE_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.takeCount = iprot.readI64();
struct.setTakeCountIsSet(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
if (!struct.isSetIterationId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'iterationId' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetSkipCount()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'skipCount' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetTakeCount()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'takeCount' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, subsequent_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(ITERATION_ID_FIELD_DESC);
oprot.writeI64(struct.iterationId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(SKIP_COUNT_FIELD_DESC);
oprot.writeI64(struct.skipCount);
oprot.writeFieldEnd();
oprot.writeFieldBegin(TAKE_COUNT_FIELD_DESC);
oprot.writeI64(struct.takeCount);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class subsequent_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public subsequent_argsTupleScheme getScheme() {
return new subsequent_argsTupleScheme();
}
}
private static class subsequent_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<subsequent_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, subsequent_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.iterationId);
oprot.writeI64(struct.skipCount);
oprot.writeI64(struct.takeCount);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, subsequent_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.iterationId = iprot.readI64();
struct.setIterationIdIsSet(true);
struct.skipCount = iprot.readI64();
struct.setSkipCountIsSet(true);
struct.takeCount = iprot.readI64();
struct.setTakeCountIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class subsequentExists_args implements org.apache.thrift.TBase<subsequentExists_args, subsequentExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<subsequentExists_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("subsequentExists_args");
private static final org.apache.thrift.protocol.TField ITERATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("iterationId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField SKIP_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("skipCount", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField TAKE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("takeCount", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new subsequentExists_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new subsequentExists_argsTupleSchemeFactory();
public long iterationId; // required
public long skipCount; // required
public long takeCount; // 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 {
ITERATION_ID((short)1, "iterationId"),
SKIP_COUNT((short)2, "skipCount"),
TAKE_COUNT((short)3, "takeCount");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ITERATION_ID
return ITERATION_ID;
case 2: // SKIP_COUNT
return SKIP_COUNT;
case 3: // TAKE_COUNT
return TAKE_COUNT;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __ITERATIONID_ISSET_ID = 0;
private static final int __SKIPCOUNT_ISSET_ID = 1;
private static final int __TAKECOUNT_ISSET_ID = 2;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ITERATION_ID, new org.apache.thrift.meta_data.FieldMetaData("iterationId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.SKIP_COUNT, new org.apache.thrift.meta_data.FieldMetaData("skipCount", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.TAKE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("takeCount", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(subsequentExists_args.class, metaDataMap);
}
public subsequentExists_args() {
}
public subsequentExists_args(
long iterationId,
long skipCount,
long takeCount)
{
this();
this.iterationId = iterationId;
setIterationIdIsSet(true);
this.skipCount = skipCount;
setSkipCountIsSet(true);
this.takeCount = takeCount;
setTakeCountIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public subsequentExists_args(subsequentExists_args other) {
__isset_bitfield = other.__isset_bitfield;
this.iterationId = other.iterationId;
this.skipCount = other.skipCount;
this.takeCount = other.takeCount;
}
@Override
public subsequentExists_args deepCopy() {
return new subsequentExists_args(this);
}
@Override
public void clear() {
setIterationIdIsSet(false);
this.iterationId = 0;
setSkipCountIsSet(false);
this.skipCount = 0;
setTakeCountIsSet(false);
this.takeCount = 0;
}
public long getIterationId() {
return this.iterationId;
}
public subsequentExists_args setIterationId(long iterationId) {
this.iterationId = iterationId;
setIterationIdIsSet(true);
return this;
}
public void unsetIterationId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ITERATIONID_ISSET_ID);
}
/** Returns true if field iterationId is set (has been assigned a value) and false otherwise */
public boolean isSetIterationId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ITERATIONID_ISSET_ID);
}
public void setIterationIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ITERATIONID_ISSET_ID, value);
}
public long getSkipCount() {
return this.skipCount;
}
public subsequentExists_args setSkipCount(long skipCount) {
this.skipCount = skipCount;
setSkipCountIsSet(true);
return this;
}
public void unsetSkipCount() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SKIPCOUNT_ISSET_ID);
}
/** Returns true if field skipCount is set (has been assigned a value) and false otherwise */
public boolean isSetSkipCount() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SKIPCOUNT_ISSET_ID);
}
public void setSkipCountIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SKIPCOUNT_ISSET_ID, value);
}
public long getTakeCount() {
return this.takeCount;
}
public subsequentExists_args setTakeCount(long takeCount) {
this.takeCount = takeCount;
setTakeCountIsSet(true);
return this;
}
public void unsetTakeCount() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TAKECOUNT_ISSET_ID);
}
/** Returns true if field takeCount is set (has been assigned a value) and false otherwise */
public boolean isSetTakeCount() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TAKECOUNT_ISSET_ID);
}
public void setTakeCountIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TAKECOUNT_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ITERATION_ID:
if (value == null) {
unsetIterationId();
} else {
setIterationId((java.lang.Long)value);
}
break;
case SKIP_COUNT:
if (value == null) {
unsetSkipCount();
} else {
setSkipCount((java.lang.Long)value);
}
break;
case TAKE_COUNT:
if (value == null) {
unsetTakeCount();
} else {
setTakeCount((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ITERATION_ID:
return getIterationId();
case SKIP_COUNT:
return getSkipCount();
case TAKE_COUNT:
return getTakeCount();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case ITERATION_ID:
return isSetIterationId();
case SKIP_COUNT:
return isSetSkipCount();
case TAKE_COUNT:
return isSetTakeCount();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof subsequentExists_args)
return this.equals((subsequentExists_args)that);
return false;
}
public boolean equals(subsequentExists_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_iterationId = true;
boolean that_present_iterationId = true;
if (this_present_iterationId || that_present_iterationId) {
if (!(this_present_iterationId && that_present_iterationId))
return false;
if (this.iterationId != that.iterationId)
return false;
}
boolean this_present_skipCount = true;
boolean that_present_skipCount = true;
if (this_present_skipCount || that_present_skipCount) {
if (!(this_present_skipCount && that_present_skipCount))
return false;
if (this.skipCount != that.skipCount)
return false;
}
boolean this_present_takeCount = true;
boolean that_present_takeCount = true;
if (this_present_takeCount || that_present_takeCount) {
if (!(this_present_takeCount && that_present_takeCount))
return false;
if (this.takeCount != that.takeCount)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(iterationId);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(skipCount);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(takeCount);
return hashCode;
}
@Override
public int compareTo(subsequentExists_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetIterationId(), other.isSetIterationId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIterationId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iterationId, other.iterationId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSkipCount(), other.isSetSkipCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSkipCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skipCount, other.skipCount);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTakeCount(), other.isSetTakeCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTakeCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.takeCount, other.takeCount);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("subsequentExists_args(");
boolean first = true;
sb.append("iterationId:");
sb.append(this.iterationId);
first = false;
if (!first) sb.append(", ");
sb.append("skipCount:");
sb.append(this.skipCount);
first = false;
if (!first) sb.append(", ");
sb.append("takeCount:");
sb.append(this.takeCount);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'iterationId' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'skipCount' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'takeCount' because it's a primitive and you chose the non-beans generator.
// 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, java.lang.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 subsequentExists_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public subsequentExists_argsStandardScheme getScheme() {
return new subsequentExists_argsStandardScheme();
}
}
private static class subsequentExists_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<subsequentExists_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, subsequentExists_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: // ITERATION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.iterationId = iprot.readI64();
struct.setIterationIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // SKIP_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.skipCount = iprot.readI64();
struct.setSkipCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TAKE_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.takeCount = iprot.readI64();
struct.setTakeCountIsSet(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
if (!struct.isSetIterationId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'iterationId' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetSkipCount()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'skipCount' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetTakeCount()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'takeCount' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, subsequentExists_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(ITERATION_ID_FIELD_DESC);
oprot.writeI64(struct.iterationId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(SKIP_COUNT_FIELD_DESC);
oprot.writeI64(struct.skipCount);
oprot.writeFieldEnd();
oprot.writeFieldBegin(TAKE_COUNT_FIELD_DESC);
oprot.writeI64(struct.takeCount);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class subsequentExists_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public subsequentExists_argsTupleScheme getScheme() {
return new subsequentExists_argsTupleScheme();
}
}
private static class subsequentExists_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<subsequentExists_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, subsequentExists_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.iterationId);
oprot.writeI64(struct.skipCount);
oprot.writeI64(struct.takeCount);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, subsequentExists_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.iterationId = iprot.readI64();
struct.setIterationIdIsSet(true);
struct.skipCount = iprot.readI64();
struct.setSkipCountIsSet(true);
struct.takeCount = iprot.readI64();
struct.setTakeCountIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class subsequentExists_result implements org.apache.thrift.TBase<subsequentExists_result, subsequentExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<subsequentExists_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("subsequentExists_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new subsequentExists_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new subsequentExists_resultTupleSchemeFactory();
public boolean 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.BOOL)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(subsequentExists_result.class, metaDataMap);
}
public subsequentExists_result() {
}
public subsequentExists_result(
boolean success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public subsequentExists_result(subsequentExists_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
}
@Override
public subsequentExists_result deepCopy() {
return new subsequentExists_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
}
public boolean isSuccess() {
return this.success;
}
public subsequentExists_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof subsequentExists_result)
return this.equals((subsequentExists_result)that);
return false;
}
public boolean equals(subsequentExists_result that) {
if (that == null)
return false;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
return hashCode;
}
@Override
public int compareTo(subsequentExists_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("subsequentExists_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, java.lang.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 subsequentExists_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public subsequentExists_resultStandardScheme getScheme() {
return new subsequentExists_resultStandardScheme();
}
}
private static class subsequentExists_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<subsequentExists_result> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, subsequentExists_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.BOOL) {
struct.success = iprot.readBool();
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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, subsequentExists_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class subsequentExists_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public subsequentExists_resultTupleScheme getScheme() {
return new subsequentExists_resultTupleScheme();
}
}
private static class subsequentExists_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<subsequentExists_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, subsequentExists_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, subsequentExists_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class subsequentMultiGet_args implements org.apache.thrift.TBase<subsequentMultiGet_args, subsequentMultiGet_args._Fields>, java.io.Serializable, Cloneable, Comparable<subsequentMultiGet_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("subsequentMultiGet_args");
private static final org.apache.thrift.protocol.TField ITERATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("iterationId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField SKIP_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("skipCount", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField TAKE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("takeCount", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new subsequentMultiGet_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new subsequentMultiGet_argsTupleSchemeFactory();
public long iterationId; // required
public long skipCount; // required
public long takeCount; // 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 {
ITERATION_ID((short)1, "iterationId"),
SKIP_COUNT((short)2, "skipCount"),
TAKE_COUNT((short)3, "takeCount");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ITERATION_ID
return ITERATION_ID;
case 2: // SKIP_COUNT
return SKIP_COUNT;
case 3: // TAKE_COUNT
return TAKE_COUNT;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __ITERATIONID_ISSET_ID = 0;
private static final int __SKIPCOUNT_ISSET_ID = 1;
private static final int __TAKECOUNT_ISSET_ID = 2;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ITERATION_ID, new org.apache.thrift.meta_data.FieldMetaData("iterationId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.SKIP_COUNT, new org.apache.thrift.meta_data.FieldMetaData("skipCount", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.TAKE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("takeCount", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(subsequentMultiGet_args.class, metaDataMap);
}
public subsequentMultiGet_args() {
}
public subsequentMultiGet_args(
long iterationId,
long skipCount,
long takeCount)
{
this();
this.iterationId = iterationId;
setIterationIdIsSet(true);
this.skipCount = skipCount;
setSkipCountIsSet(true);
this.takeCount = takeCount;
setTakeCountIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public subsequentMultiGet_args(subsequentMultiGet_args other) {
__isset_bitfield = other.__isset_bitfield;
this.iterationId = other.iterationId;
this.skipCount = other.skipCount;
this.takeCount = other.takeCount;
}
@Override
public subsequentMultiGet_args deepCopy() {
return new subsequentMultiGet_args(this);
}
@Override
public void clear() {
setIterationIdIsSet(false);
this.iterationId = 0;
setSkipCountIsSet(false);
this.skipCount = 0;
setTakeCountIsSet(false);
this.takeCount = 0;
}
public long getIterationId() {
return this.iterationId;
}
public subsequentMultiGet_args setIterationId(long iterationId) {
this.iterationId = iterationId;
setIterationIdIsSet(true);
return this;
}
public void unsetIterationId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ITERATIONID_ISSET_ID);
}
/** Returns true if field iterationId is set (has been assigned a value) and false otherwise */
public boolean isSetIterationId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ITERATIONID_ISSET_ID);
}
public void setIterationIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ITERATIONID_ISSET_ID, value);
}
public long getSkipCount() {
return this.skipCount;
}
public subsequentMultiGet_args setSkipCount(long skipCount) {
this.skipCount = skipCount;
setSkipCountIsSet(true);
return this;
}
public void unsetSkipCount() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SKIPCOUNT_ISSET_ID);
}
/** Returns true if field skipCount is set (has been assigned a value) and false otherwise */
public boolean isSetSkipCount() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SKIPCOUNT_ISSET_ID);
}
public void setSkipCountIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SKIPCOUNT_ISSET_ID, value);
}
public long getTakeCount() {
return this.takeCount;
}
public subsequentMultiGet_args setTakeCount(long takeCount) {
this.takeCount = takeCount;
setTakeCountIsSet(true);
return this;
}
public void unsetTakeCount() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TAKECOUNT_ISSET_ID);
}
/** Returns true if field takeCount is set (has been assigned a value) and false otherwise */
public boolean isSetTakeCount() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TAKECOUNT_ISSET_ID);
}
public void setTakeCountIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TAKECOUNT_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ITERATION_ID:
if (value == null) {
unsetIterationId();
} else {
setIterationId((java.lang.Long)value);
}
break;
case SKIP_COUNT:
if (value == null) {
unsetSkipCount();
} else {
setSkipCount((java.lang.Long)value);
}
break;
case TAKE_COUNT:
if (value == null) {
unsetTakeCount();
} else {
setTakeCount((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ITERATION_ID:
return getIterationId();
case SKIP_COUNT:
return getSkipCount();
case TAKE_COUNT:
return getTakeCount();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case ITERATION_ID:
return isSetIterationId();
case SKIP_COUNT:
return isSetSkipCount();
case TAKE_COUNT:
return isSetTakeCount();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof subsequentMultiGet_args)
return this.equals((subsequentMultiGet_args)that);
return false;
}
public boolean equals(subsequentMultiGet_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_iterationId = true;
boolean that_present_iterationId = true;
if (this_present_iterationId || that_present_iterationId) {
if (!(this_present_iterationId && that_present_iterationId))
return false;
if (this.iterationId != that.iterationId)
return false;
}
boolean this_present_skipCount = true;
boolean that_present_skipCount = true;
if (this_present_skipCount || that_present_skipCount) {
if (!(this_present_skipCount && that_present_skipCount))
return false;
if (this.skipCount != that.skipCount)
return false;
}
boolean this_present_takeCount = true;
boolean that_present_takeCount = true;
if (this_present_takeCount || that_present_takeCount) {
if (!(this_present_takeCount && that_present_takeCount))
return false;
if (this.takeCount != that.takeCount)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(iterationId);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(skipCount);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(takeCount);
return hashCode;
}
@Override
public int compareTo(subsequentMultiGet_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetIterationId(), other.isSetIterationId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIterationId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iterationId, other.iterationId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSkipCount(), other.isSetSkipCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSkipCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skipCount, other.skipCount);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTakeCount(), other.isSetTakeCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTakeCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.takeCount, other.takeCount);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("subsequentMultiGet_args(");
boolean first = true;
sb.append("iterationId:");
sb.append(this.iterationId);
first = false;
if (!first) sb.append(", ");
sb.append("skipCount:");
sb.append(this.skipCount);
first = false;
if (!first) sb.append(", ");
sb.append("takeCount:");
sb.append(this.takeCount);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'iterationId' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'skipCount' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'takeCount' because it's a primitive and you chose the non-beans generator.
// 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, java.lang.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 subsequentMultiGet_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public subsequentMultiGet_argsStandardScheme getScheme() {
return new subsequentMultiGet_argsStandardScheme();
}
}
private static class subsequentMultiGet_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<subsequentMultiGet_args> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, subsequentMultiGet_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: // ITERATION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.iterationId = iprot.readI64();
struct.setIterationIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // SKIP_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.skipCount = iprot.readI64();
struct.setSkipCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TAKE_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.takeCount = iprot.readI64();
struct.setTakeCountIsSet(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
if (!struct.isSetIterationId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'iterationId' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetSkipCount()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'skipCount' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetTakeCount()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'takeCount' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, subsequentMultiGet_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(ITERATION_ID_FIELD_DESC);
oprot.writeI64(struct.iterationId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(SKIP_COUNT_FIELD_DESC);
oprot.writeI64(struct.skipCount);
oprot.writeFieldEnd();
oprot.writeFieldBegin(TAKE_COUNT_FIELD_DESC);
oprot.writeI64(struct.takeCount);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class subsequentMultiGet_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public subsequentMultiGet_argsTupleScheme getScheme() {
return new subsequentMultiGet_argsTupleScheme();
}
}
private static class subsequentMultiGet_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<subsequentMultiGet_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, subsequentMultiGet_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.iterationId);
oprot.writeI64(struct.skipCount);
oprot.writeI64(struct.takeCount);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, subsequentMultiGet_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.iterationId = iprot.readI64();
struct.setIterationIdIsSet(true);
struct.skipCount = iprot.readI64();
struct.setSkipCountIsSet(true);
struct.takeCount = iprot.readI64();
struct.setTakeCountIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class subsequentMultiGet_result implements org.apache.thrift.TBase<subsequentMultiGet_result, subsequentMultiGet_result._Fields>, java.io.Serializable, Cloneable, Comparable<subsequentMultiGet_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("subsequentMultiGet_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new subsequentMultiGet_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new subsequentMultiGet_resultTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.util.List<OptionalBinary> 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalBinary.class))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(subsequentMultiGet_result.class, metaDataMap);
}
public subsequentMultiGet_result() {
}
public subsequentMultiGet_result(
java.util.List<OptionalBinary> success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public subsequentMultiGet_result(subsequentMultiGet_result other) {
if (other.isSetSuccess()) {
java.util.List<OptionalBinary> __this__success = new java.util.ArrayList<OptionalBinary>(other.success.size());
for (OptionalBinary other_element : other.success) {
__this__success.add(new OptionalBinary(other_element));
}
this.success = __this__success;
}
}
@Override
public subsequentMultiGet_result deepCopy() {
return new subsequentMultiGet_result(this);
}
@Override
public void clear() {
this.success = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<OptionalBinary> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(OptionalBinary elem) {
if (this.success == null) {
this.success = new java.util.ArrayList<OptionalBinary>();
}
this.success.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<OptionalBinary> getSuccess() {
return this.success;
}
public subsequentMultiGet_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<OptionalBinary> 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;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.util.List<OptionalBinary>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof subsequentMultiGet_result)
return this.equals((subsequentMultiGet_result)that);
return false;
}
public boolean equals(subsequentMultiGet_result that) {
if (that == null)
return false;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
return hashCode;
}
@Override
public int compareTo(subsequentMultiGet_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("subsequentMultiGet_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 subsequentMultiGet_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public subsequentMultiGet_resultStandardScheme getScheme() {
return new subsequentMultiGet_resultStandardScheme();
}
}
private static class subsequentMultiGet_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<subsequentMultiGet_result> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, subsequentMultiGet_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list104 = iprot.readListBegin();
struct.success = new java.util.ArrayList<OptionalBinary>(_list104.size);
@org.apache.thrift.annotation.Nullable OptionalBinary _elem105;
for (int _i106 = 0; _i106 < _list104.size; ++_i106)
{
_elem105 = new OptionalBinary();
_elem105.read(iprot);
struct.success.add(_elem105);
}
iprot.readListEnd();
}
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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, subsequentMultiGet_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
for (OptionalBinary _iter107 : struct.success)
{
_iter107.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class subsequentMultiGet_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public subsequentMultiGet_resultTupleScheme getScheme() {
return new subsequentMultiGet_resultTupleScheme();
}
}
private static class subsequentMultiGet_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<subsequentMultiGet_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, subsequentMultiGet_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (OptionalBinary _iter108 : struct.success)
{
_iter108.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, subsequentMultiGet_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list109 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.success = new java.util.ArrayList<OptionalBinary>(_list109.size);
@org.apache.thrift.annotation.Nullable OptionalBinary _elem110;
for (int _i111 = 0; _i111 < _list109.size; ++_i111)
{
_elem110 = new OptionalBinary();
_elem110.read(iprot);
struct.success.add(_elem110);
}
}
struct.setSuccessIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
}