/**
* Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25")
public class THBaseService {
public interface Iface {
/**
* Test for the existence of columns in the table, as specified in the TGet.
*
* @return true if the specified TGet matches one or more keys, false if not
*
* @param table the table to check on
*
* @param tget the TGet to check for
*/
public boolean exists(ByteBuffer table, TGet tget) throws TIOError, org.apache.thrift.TException;
/**
* Test for the existence of columns in the table, as specified by the TGets.
*
* This will return an array of booleans. Each value will be true if the related Get matches
* one or more keys, false if not.
*
* @param table the table to check on
*
* @param tgets a list of TGets to check for
*/
public List<Boolean> existsAll(ByteBuffer table, List<TGet> tgets) throws TIOError, org.apache.thrift.TException;
/**
* Method for getting data from a row.
*
* If the row cannot be found an empty Result is returned.
* This can be checked by the empty field of the TResult
*
* @return the result
*
* @param table the table to get from
*
* @param tget the TGet to fetch
*/
public TResult get(ByteBuffer table, TGet tget) throws TIOError, org.apache.thrift.TException;
/**
* Method for getting multiple rows.
*
* If a row cannot be found there will be a null
* value in the result list for that TGet at the
* same position.
*
* So the Results are in the same order as the TGets.
*
* @param table the table to get from
*
* @param tgets a list of TGets to fetch, the Result list
* will have the Results at corresponding positions
* or null if there was an error
*/
public List<TResult> getMultiple(ByteBuffer table, List<TGet> tgets) throws TIOError, org.apache.thrift.TException;
/**
* Commit a TPut to a table.
*
* @param table the table to put data in
*
* @param tput the TPut to put
*/
public void put(ByteBuffer table, TPut tput) throws TIOError, org.apache.thrift.TException;
/**
* Atomically checks if a row/family/qualifier value matches the expected
* value. If it does, it adds the TPut.
*
* @return true if the new put was executed, false otherwise
*
* @param table to check in and put to
*
* @param row row to check
*
* @param family column family to check
*
* @param qualifier column qualifier to check
*
* @param value the expected value, if not provided the
* check is for the non-existence of the
* column in question
*
* @param tput the TPut to put if the check succeeds
*/
public boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TPut tput) throws TIOError, org.apache.thrift.TException;
/**
* Commit a List of Puts to the table.
*
* @param table the table to put data in
*
* @param tputs a list of TPuts to commit
*/
public void putMultiple(ByteBuffer table, List<TPut> tputs) throws TIOError, org.apache.thrift.TException;
/**
* Deletes as specified by the TDelete.
*
* Note: "delete" is a reserved keyword and cannot be used in Thrift
* thus the inconsistent naming scheme from the other functions.
*
* @param table the table to delete from
*
* @param tdelete the TDelete to delete
*/
public void deleteSingle(ByteBuffer table, TDelete tdelete) throws TIOError, org.apache.thrift.TException;
/**
* Bulk commit a List of TDeletes to the table.
*
* Throws a TIOError if any of the deletes fail.
*
* Always returns an empty list for backwards compatibility.
*
* @param table the table to delete from
*
* @param tdeletes list of TDeletes to delete
*/
public List<TDelete> deleteMultiple(ByteBuffer table, List<TDelete> tdeletes) throws TIOError, org.apache.thrift.TException;
/**
* Atomically checks if a row/family/qualifier value matches the expected
* value. If it does, it adds the delete.
*
* @return true if the new delete was executed, false otherwise
*
* @param table to check in and delete from
*
* @param row row to check
*
* @param family column family to check
*
* @param qualifier column qualifier to check
*
* @param value the expected value, if not provided the
* check is for the non-existence of the
* column in question
*
* @param tdelete the TDelete to execute if the check succeeds
*/
public boolean checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TDelete tdelete) throws TIOError, org.apache.thrift.TException;
public TResult increment(ByteBuffer table, TIncrement tincrement) throws TIOError, org.apache.thrift.TException;
public TResult append(ByteBuffer table, TAppend tappend) throws TIOError, org.apache.thrift.TException;
/**
* Get a Scanner for the provided TScan object.
*
* @return Scanner Id to be used with other scanner procedures
*
* @param table the table to get the Scanner for
*
* @param tscan the scan object to get a Scanner for
*/
public int openScanner(ByteBuffer table, TScan tscan) throws TIOError, org.apache.thrift.TException;
/**
* Grabs multiple rows from a Scanner.
*
* @return Between zero and numRows TResults
*
* @param scannerId the Id of the Scanner to return rows from. This is an Id returned from the openScanner function.
*
* @param numRows number of rows to return
*/
public List<TResult> getScannerRows(int scannerId, int numRows) throws TIOError, TIllegalArgument, org.apache.thrift.TException;
/**
* Closes the scanner. Should be called to free server side resources timely.
* Typically close once the scanner is not needed anymore, i.e. after looping
* over it to get all the required rows.
*
* @param scannerId the Id of the Scanner to close *
*/
public void closeScanner(int scannerId) throws TIOError, TIllegalArgument, org.apache.thrift.TException;
/**
* mutateRow performs multiple mutations atomically on a single row.
*
* @param table table to apply the mutations
*
* @param trowMutations mutations to apply
*/
public void mutateRow(ByteBuffer table, TRowMutations trowMutations) throws TIOError, org.apache.thrift.TException;
/**
* Get results for the provided TScan object.
* This helper function opens a scanner, get the results and close the scanner.
*
* @return between zero and numRows TResults
*
* @param table the table to get the Scanner for
*
* @param tscan the scan object to get a Scanner for
*
* @param numRows number of rows to return
*/
public List<TResult> getScannerResults(ByteBuffer table, TScan tscan, int numRows) throws TIOError, org.apache.thrift.TException;
/**
* Given a table and a row get the location of the region that
* would contain the given row key.
*
* reload = true means the cache will be cleared and the location
* will be fetched from meta.
*
* @param table
* @param row
* @param reload
*/
public THRegionLocation getRegionLocation(ByteBuffer table, ByteBuffer row, boolean reload) throws TIOError, org.apache.thrift.TException;
/**
* Get all of the region locations for a given table.
*
*
* @param table
*/
public List<THRegionLocation> getAllRegionLocations(ByteBuffer table) throws TIOError, org.apache.thrift.TException;
/**
* Atomically checks if a row/family/qualifier value matches the expected
* value. If it does, it mutates the row.
*
* @return true if the row was mutated, false otherwise
*
* @param table to check in and delete from
*
* @param row row to check
*
* @param family column family to check
*
* @param qualifier column qualifier to check
*
* @param compareOp comparison to make on the value
*
* @param value the expected value to be compared against, if not provided the
* check is for the non-existence of the column in question
*
* @param rowMutations row mutations to execute if the value matches
*/
public boolean checkAndMutate(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, TCompareOp compareOp, ByteBuffer value, TRowMutations rowMutations) throws TIOError, org.apache.thrift.TException;
}
public interface AsyncIface {
public void exists(ByteBuffer table, TGet tget, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void existsAll(ByteBuffer table, List<TGet> tgets, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.existsAll_call> resultHandler) throws org.apache.thrift.TException;
public void get(ByteBuffer table, TGet tget, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void getMultiple(ByteBuffer table, List<TGet> tgets, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void put(ByteBuffer table, TPut tput, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TPut tput, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void putMultiple(ByteBuffer table, List<TPut> tputs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void deleteSingle(ByteBuffer table, TDelete tdelete, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void deleteMultiple(ByteBuffer table, List<TDelete> tdeletes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TDelete tdelete, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void increment(ByteBuffer table, TIncrement tincrement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void append(ByteBuffer table, TAppend tappend, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void openScanner(ByteBuffer table, TScan tscan, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void getScannerRows(int scannerId, int numRows, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void closeScanner(int scannerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void mutateRow(ByteBuffer table, TRowMutations trowMutations, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void getScannerResults(ByteBuffer table, TScan tscan, int numRows, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void getRegionLocation(ByteBuffer table, ByteBuffer row, boolean reload, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void getAllRegionLocations(ByteBuffer table, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void checkAndMutate(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, TCompareOp compareOp, ByteBuffer value, TRowMutations rowMutations, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
}
public static class Client extends org.apache.thrift.TServiceClient implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
return new Client(prot);
}
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(org.apache.thrift.protocol.TProtocol prot)
{
super(prot, prot);
}
public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
super(iprot, oprot);
}
public boolean exists(ByteBuffer table, TGet tget) throws TIOError, org.apache.thrift.TException
{
send_exists(table, tget);
return recv_exists();
}
public void send_exists(ByteBuffer table, TGet tget) throws org.apache.thrift.TException
{
exists_args args = new exists_args();
args.setTable(table);
args.setTget(tget);
sendBase("exists", args);
}
public boolean recv_exists() throws TIOError, org.apache.thrift.TException
{
exists_result result = new exists_result();
receiveBase(result, "exists");
if (result.isSetSuccess()) {
return result.success;
}
if (result.io != null) {
throw result.io;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "exists failed: unknown result");
}
public List<Boolean> existsAll(ByteBuffer table, List<TGet> tgets) throws TIOError, org.apache.thrift.TException
{
send_existsAll(table, tgets);
return recv_existsAll();
}
public void send_existsAll(ByteBuffer table, List<TGet> tgets) throws org.apache.thrift.TException
{
existsAll_args args = new existsAll_args();
args.setTable(table);
args.setTgets(tgets);
sendBase("existsAll", args);
}
public List<Boolean> recv_existsAll() throws TIOError, org.apache.thrift.TException
{
existsAll_result result = new existsAll_result();
receiveBase(result, "existsAll");
if (result.isSetSuccess()) {
return result.success;
}
if (result.io != null) {
throw result.io;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "existsAll failed: unknown result");
}
public TResult get(ByteBuffer table, TGet tget) throws TIOError, org.apache.thrift.TException
{
send_get(table, tget);
return recv_get();
}
public void send_get(ByteBuffer table, TGet tget) throws org.apache.thrift.TException
{
get_args args = new get_args();
args.setTable(table);
args.setTget(tget);
sendBase("get", args);
}
public TResult recv_get() throws TIOError, org.apache.thrift.TException
{
get_result result = new get_result();
receiveBase(result, "get");
if (result.isSetSuccess()) {
return result.success;
}
if (result.io != null) {
throw result.io;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get failed: unknown result");
}
public List<TResult> getMultiple(ByteBuffer table, List<TGet> tgets) throws TIOError, org.apache.thrift.TException
{
send_getMultiple(table, tgets);
return recv_getMultiple();
}
public void send_getMultiple(ByteBuffer table, List<TGet> tgets) throws org.apache.thrift.TException
{
getMultiple_args args = new getMultiple_args();
args.setTable(table);
args.setTgets(tgets);
sendBase("getMultiple", args);
}
public List<TResult> recv_getMultiple() throws TIOError, org.apache.thrift.TException
{
getMultiple_result result = new getMultiple_result();
receiveBase(result, "getMultiple");
if (result.isSetSuccess()) {
return result.success;
}
if (result.io != null) {
throw result.io;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getMultiple failed: unknown result");
}
public void put(ByteBuffer table, TPut tput) throws TIOError, org.apache.thrift.TException
{
send_put(table, tput);
recv_put();
}
public void send_put(ByteBuffer table, TPut tput) throws org.apache.thrift.TException
{
put_args args = new put_args();
args.setTable(table);
args.setTput(tput);
sendBase("put", args);
}
public void recv_put() throws TIOError, org.apache.thrift.TException
{
put_result result = new put_result();
receiveBase(result, "put");
if (result.io != null) {
throw result.io;
}
return;
}
public boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TPut tput) throws TIOError, org.apache.thrift.TException
{
send_checkAndPut(table, row, family, qualifier, value, tput);
return recv_checkAndPut();
}
public void send_checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TPut tput) throws org.apache.thrift.TException
{
checkAndPut_args args = new checkAndPut_args();
args.setTable(table);
args.setRow(row);
args.setFamily(family);
args.setQualifier(qualifier);
args.setValue(value);
args.setTput(tput);
sendBase("checkAndPut", args);
}
public boolean recv_checkAndPut() throws TIOError, org.apache.thrift.TException
{
checkAndPut_result result = new checkAndPut_result();
receiveBase(result, "checkAndPut");
if (result.isSetSuccess()) {
return result.success;
}
if (result.io != null) {
throw result.io;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "checkAndPut failed: unknown result");
}
public void putMultiple(ByteBuffer table, List<TPut> tputs) throws TIOError, org.apache.thrift.TException
{
send_putMultiple(table, tputs);
recv_putMultiple();
}
public void send_putMultiple(ByteBuffer table, List<TPut> tputs) throws org.apache.thrift.TException
{
putMultiple_args args = new putMultiple_args();
args.setTable(table);
args.setTputs(tputs);
sendBase("putMultiple", args);
}
public void recv_putMultiple() throws TIOError, org.apache.thrift.TException
{
putMultiple_result result = new putMultiple_result();
receiveBase(result, "putMultiple");
if (result.io != null) {
throw result.io;
}
return;
}
public void deleteSingle(ByteBuffer table, TDelete tdelete) throws TIOError, org.apache.thrift.TException
{
send_deleteSingle(table, tdelete);
recv_deleteSingle();
}
public void send_deleteSingle(ByteBuffer table, TDelete tdelete) throws org.apache.thrift.TException
{
deleteSingle_args args = new deleteSingle_args();
args.setTable(table);
args.setTdelete(tdelete);
sendBase("deleteSingle", args);
}
public void recv_deleteSingle() throws TIOError, org.apache.thrift.TException
{
deleteSingle_result result = new deleteSingle_result();
receiveBase(result, "deleteSingle");
if (result.io != null) {
throw result.io;
}
return;
}
public List<TDelete> deleteMultiple(ByteBuffer table, List<TDelete> tdeletes) throws TIOError, org.apache.thrift.TException
{
send_deleteMultiple(table, tdeletes);
return recv_deleteMultiple();
}
public void send_deleteMultiple(ByteBuffer table, List<TDelete> tdeletes) throws org.apache.thrift.TException
{
deleteMultiple_args args = new deleteMultiple_args();
args.setTable(table);
args.setTdeletes(tdeletes);
sendBase("deleteMultiple", args);
}
public List<TDelete> recv_deleteMultiple() throws TIOError, org.apache.thrift.TException
{
deleteMultiple_result result = new deleteMultiple_result();
receiveBase(result, "deleteMultiple");
if (result.isSetSuccess()) {
return result.success;
}
if (result.io != null) {
throw result.io;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteMultiple failed: unknown result");
}
public boolean checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TDelete tdelete) throws TIOError, org.apache.thrift.TException
{
send_checkAndDelete(table, row, family, qualifier, value, tdelete);
return recv_checkAndDelete();
}
public void send_checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TDelete tdelete) throws org.apache.thrift.TException
{
checkAndDelete_args args = new checkAndDelete_args();
args.setTable(table);
args.setRow(row);
args.setFamily(family);
args.setQualifier(qualifier);
args.setValue(value);
args.setTdelete(tdelete);
sendBase("checkAndDelete", args);
}
public boolean recv_checkAndDelete() throws TIOError, org.apache.thrift.TException
{
checkAndDelete_result result = new checkAndDelete_result();
receiveBase(result, "checkAndDelete");
if (result.isSetSuccess()) {
return result.success;
}
if (result.io != null) {
throw result.io;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "checkAndDelete failed: unknown result");
}
public TResult increment(ByteBuffer table, TIncrement tincrement) throws TIOError, org.apache.thrift.TException
{
send_increment(table, tincrement);
return recv_increment();
}
public void send_increment(ByteBuffer table, TIncrement tincrement) throws org.apache.thrift.TException
{
increment_args args = new increment_args();
args.setTable(table);
args.setTincrement(tincrement);
sendBase("increment", args);
}
public TResult recv_increment() throws TIOError, org.apache.thrift.TException
{
increment_result result = new increment_result();
receiveBase(result, "increment");
if (result.isSetSuccess()) {
return result.success;
}
if (result.io != null) {
throw result.io;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "increment failed: unknown result");
}
public TResult append(ByteBuffer table, TAppend tappend) throws TIOError, org.apache.thrift.TException
{
send_append(table, tappend);
return recv_append();
}
public void send_append(ByteBuffer table, TAppend tappend) throws org.apache.thrift.TException
{
append_args args = new append_args();
args.setTable(table);
args.setTappend(tappend);
sendBase("append", args);
}
public TResult recv_append() throws TIOError, org.apache.thrift.TException
{
append_result result = new append_result();
receiveBase(result, "append");
if (result.isSetSuccess()) {
return result.success;
}
if (result.io != null) {
throw result.io;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "append failed: unknown result");
}
public int openScanner(ByteBuffer table, TScan tscan) throws TIOError, org.apache.thrift.TException
{
send_openScanner(table, tscan);
return recv_openScanner();
}
public void send_openScanner(ByteBuffer table, TScan tscan) throws org.apache.thrift.TException
{
openScanner_args args = new openScanner_args();
args.setTable(table);
args.setTscan(tscan);
sendBase("openScanner", args);
}
public int recv_openScanner() throws TIOError, org.apache.thrift.TException
{
openScanner_result result = new openScanner_result();
receiveBase(result, "openScanner");
if (result.isSetSuccess()) {
return result.success;
}
if (result.io != null) {
throw result.io;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "openScanner failed: unknown result");
}
public List<TResult> getScannerRows(int scannerId, int numRows) throws TIOError, TIllegalArgument, org.apache.thrift.TException
{
send_getScannerRows(scannerId, numRows);
return recv_getScannerRows();
}
public void send_getScannerRows(int scannerId, int numRows) throws org.apache.thrift.TException
{
getScannerRows_args args = new getScannerRows_args();
args.setScannerId(scannerId);
args.setNumRows(numRows);
sendBase("getScannerRows", args);
}
public List<TResult> recv_getScannerRows() throws TIOError, TIllegalArgument, org.apache.thrift.TException
{
getScannerRows_result result = new getScannerRows_result();
receiveBase(result, "getScannerRows");
if (result.isSetSuccess()) {
return result.success;
}
if (result.io != null) {
throw result.io;
}
if (result.ia != null) {
throw result.ia;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getScannerRows failed: unknown result");
}
public void closeScanner(int scannerId) throws TIOError, TIllegalArgument, org.apache.thrift.TException
{
send_closeScanner(scannerId);
recv_closeScanner();
}
public void send_closeScanner(int scannerId) throws org.apache.thrift.TException
{
closeScanner_args args = new closeScanner_args();
args.setScannerId(scannerId);
sendBase("closeScanner", args);
}
public void recv_closeScanner() throws TIOError, TIllegalArgument, org.apache.thrift.TException
{
closeScanner_result result = new closeScanner_result();
receiveBase(result, "closeScanner");
if (result.io != null) {
throw result.io;
}
if (result.ia != null) {
throw result.ia;
}
return;
}
public void mutateRow(ByteBuffer table, TRowMutations trowMutations) throws TIOError, org.apache.thrift.TException
{
send_mutateRow(table, trowMutations);
recv_mutateRow();
}
public void send_mutateRow(ByteBuffer table, TRowMutations trowMutations) throws org.apache.thrift.TException
{
mutateRow_args args = new mutateRow_args();
args.setTable(table);
args.setTrowMutations(trowMutations);
sendBase("mutateRow", args);
}
public void recv_mutateRow() throws TIOError, org.apache.thrift.TException
{
mutateRow_result result = new mutateRow_result();
receiveBase(result, "mutateRow");
if (result.io != null) {
throw result.io;
}
return;
}
public List<TResult> getScannerResults(ByteBuffer table, TScan tscan, int numRows) throws TIOError, org.apache.thrift.TException
{
send_getScannerResults(table, tscan, numRows);
return recv_getScannerResults();
}
public void send_getScannerResults(ByteBuffer table, TScan tscan, int numRows) throws org.apache.thrift.TException
{
getScannerResults_args args = new getScannerResults_args();
args.setTable(table);
args.setTscan(tscan);
args.setNumRows(numRows);
sendBase("getScannerResults", args);
}
public List<TResult> recv_getScannerResults() throws TIOError, org.apache.thrift.TException
{
getScannerResults_result result = new getScannerResults_result();
receiveBase(result, "getScannerResults");
if (result.isSetSuccess()) {
return result.success;
}
if (result.io != null) {
throw result.io;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getScannerResults failed: unknown result");
}
public THRegionLocation getRegionLocation(ByteBuffer table, ByteBuffer row, boolean reload) throws TIOError, org.apache.thrift.TException
{
send_getRegionLocation(table, row, reload);
return recv_getRegionLocation();
}
public void send_getRegionLocation(ByteBuffer table, ByteBuffer row, boolean reload) throws org.apache.thrift.TException
{
getRegionLocation_args args = new getRegionLocation_args();
args.setTable(table);
args.setRow(row);
args.setReload(reload);
sendBase("getRegionLocation", args);
}
public THRegionLocation recv_getRegionLocation() throws TIOError, org.apache.thrift.TException
{
getRegionLocation_result result = new getRegionLocation_result();
receiveBase(result, "getRegionLocation");
if (result.isSetSuccess()) {
return result.success;
}
if (result.io != null) {
throw result.io;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRegionLocation failed: unknown result");
}
public List<THRegionLocation> getAllRegionLocations(ByteBuffer table) throws TIOError, org.apache.thrift.TException
{
send_getAllRegionLocations(table);
return recv_getAllRegionLocations();
}
public void send_getAllRegionLocations(ByteBuffer table) throws org.apache.thrift.TException
{
getAllRegionLocations_args args = new getAllRegionLocations_args();
args.setTable(table);
sendBase("getAllRegionLocations", args);
}
public List<THRegionLocation> recv_getAllRegionLocations() throws TIOError, org.apache.thrift.TException
{
getAllRegionLocations_result result = new getAllRegionLocations_result();
receiveBase(result, "getAllRegionLocations");
if (result.isSetSuccess()) {
return result.success;
}
if (result.io != null) {
throw result.io;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllRegionLocations failed: unknown result");
}
public boolean checkAndMutate(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, TCompareOp compareOp, ByteBuffer value, TRowMutations rowMutations) throws TIOError, org.apache.thrift.TException
{
send_checkAndMutate(table, row, family, qualifier, compareOp, value, rowMutations);
return recv_checkAndMutate();
}
public void send_checkAndMutate(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, TCompareOp compareOp, ByteBuffer value, TRowMutations rowMutations) throws org.apache.thrift.TException
{
checkAndMutate_args args = new checkAndMutate_args();
args.setTable(table);
args.setRow(row);
args.setFamily(family);
args.setQualifier(qualifier);
args.setCompareOp(compareOp);
args.setValue(value);
args.setRowMutations(rowMutations);
sendBase("checkAndMutate", args);
}
public boolean recv_checkAndMutate() throws TIOError, org.apache.thrift.TException
{
checkAndMutate_result result = new checkAndMutate_result();
receiveBase(result, "checkAndMutate");
if (result.isSetSuccess()) {
return result.success;
}
if (result.io != null) {
throw result.io;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "checkAndMutate failed: unknown result");
}
}
public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
private org.apache.thrift.async.TAsyncClientManager clientManager;
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void exists(ByteBuffer table, TGet tget, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
exists_call method_call = new exists_call(table, tget, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class exists_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer table;
private TGet tget;
public exists_call(ByteBuffer table, TGet tget, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.table = table;
this.tget = tget;
}
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.setTable(table);
args.setTget(tget);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws TIOError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_exists();
}
}
public void existsAll(ByteBuffer table, List<TGet> tgets, org.apache.thrift.async.AsyncMethodCallback<existsAll_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
existsAll_call method_call = new existsAll_call(table, tgets, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class existsAll_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer table;
private List<TGet> tgets;
public existsAll_call(ByteBuffer table, List<TGet> tgets, org.apache.thrift.async.AsyncMethodCallback<existsAll_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.table = table;
this.tgets = tgets;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("existsAll", org.apache.thrift.protocol.TMessageType.CALL, 0));
existsAll_args args = new existsAll_args();
args.setTable(table);
args.setTgets(tgets);
args.write(prot);
prot.writeMessageEnd();
}
public List<Boolean> getResult() throws TIOError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_existsAll();
}
}
public void get(ByteBuffer table, TGet tget, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
get_call method_call = new get_call(table, tget, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class get_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer table;
private TGet tget;
public get_call(ByteBuffer table, TGet tget, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.table = table;
this.tget = tget;
}
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.setTable(table);
args.setTget(tget);
args.write(prot);
prot.writeMessageEnd();
}
public TResult getResult() throws TIOError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_get();
}
}
public void getMultiple(ByteBuffer table, List<TGet> tgets, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getMultiple_call method_call = new getMultiple_call(table, tgets, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getMultiple_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer table;
private List<TGet> tgets;
public getMultiple_call(ByteBuffer table, List<TGet> tgets, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.table = table;
this.tgets = tgets;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getMultiple", org.apache.thrift.protocol.TMessageType.CALL, 0));
getMultiple_args args = new getMultiple_args();
args.setTable(table);
args.setTgets(tgets);
args.write(prot);
prot.writeMessageEnd();
}
public List<TResult> getResult() throws TIOError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getMultiple();
}
}
public void put(ByteBuffer table, TPut tput, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
put_call method_call = new put_call(table, tput, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class put_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer table;
private TPut tput;
public put_call(ByteBuffer table, TPut tput, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.table = table;
this.tput = tput;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("put", org.apache.thrift.protocol.TMessageType.CALL, 0));
put_args args = new put_args();
args.setTable(table);
args.setTput(tput);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws TIOError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_put();
}
}
public void checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TPut tput, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
checkAndPut_call method_call = new checkAndPut_call(table, row, family, qualifier, value, tput, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class checkAndPut_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer table;
private ByteBuffer row;
private ByteBuffer family;
private ByteBuffer qualifier;
private ByteBuffer value;
private TPut tput;
public checkAndPut_call(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TPut tput, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.table = table;
this.row = row;
this.family = family;
this.qualifier = qualifier;
this.value = value;
this.tput = tput;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("checkAndPut", org.apache.thrift.protocol.TMessageType.CALL, 0));
checkAndPut_args args = new checkAndPut_args();
args.setTable(table);
args.setRow(row);
args.setFamily(family);
args.setQualifier(qualifier);
args.setValue(value);
args.setTput(tput);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws TIOError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_checkAndPut();
}
}
public void putMultiple(ByteBuffer table, List<TPut> tputs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
putMultiple_call method_call = new putMultiple_call(table, tputs, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class putMultiple_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer table;
private List<TPut> tputs;
public putMultiple_call(ByteBuffer table, List<TPut> tputs, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.table = table;
this.tputs = tputs;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("putMultiple", org.apache.thrift.protocol.TMessageType.CALL, 0));
putMultiple_args args = new putMultiple_args();
args.setTable(table);
args.setTputs(tputs);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws TIOError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_putMultiple();
}
}
public void deleteSingle(ByteBuffer table, TDelete tdelete, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
deleteSingle_call method_call = new deleteSingle_call(table, tdelete, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteSingle_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer table;
private TDelete tdelete;
public deleteSingle_call(ByteBuffer table, TDelete tdelete, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.table = table;
this.tdelete = tdelete;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteSingle", org.apache.thrift.protocol.TMessageType.CALL, 0));
deleteSingle_args args = new deleteSingle_args();
args.setTable(table);
args.setTdelete(tdelete);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws TIOError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_deleteSingle();
}
}
public void deleteMultiple(ByteBuffer table, List<TDelete> tdeletes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
deleteMultiple_call method_call = new deleteMultiple_call(table, tdeletes, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteMultiple_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer table;
private List<TDelete> tdeletes;
public deleteMultiple_call(ByteBuffer table, List<TDelete> tdeletes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.table = table;
this.tdeletes = tdeletes;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteMultiple", org.apache.thrift.protocol.TMessageType.CALL, 0));
deleteMultiple_args args = new deleteMultiple_args();
args.setTable(table);
args.setTdeletes(tdeletes);
args.write(prot);
prot.writeMessageEnd();
}
public List<TDelete> getResult() throws TIOError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_deleteMultiple();
}
}
public void checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TDelete tdelete, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
checkAndDelete_call method_call = new checkAndDelete_call(table, row, family, qualifier, value, tdelete, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class checkAndDelete_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer table;
private ByteBuffer row;
private ByteBuffer family;
private ByteBuffer qualifier;
private ByteBuffer value;
private TDelete tdelete;
public checkAndDelete_call(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TDelete tdelete, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.table = table;
this.row = row;
this.family = family;
this.qualifier = qualifier;
this.value = value;
this.tdelete = tdelete;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("checkAndDelete", org.apache.thrift.protocol.TMessageType.CALL, 0));
checkAndDelete_args args = new checkAndDelete_args();
args.setTable(table);
args.setRow(row);
args.setFamily(family);
args.setQualifier(qualifier);
args.setValue(value);
args.setTdelete(tdelete);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws TIOError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_checkAndDelete();
}
}
public void increment(ByteBuffer table, TIncrement tincrement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
increment_call method_call = new increment_call(table, tincrement, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class increment_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer table;
private TIncrement tincrement;
public increment_call(ByteBuffer table, TIncrement tincrement, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.table = table;
this.tincrement = tincrement;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("increment", org.apache.thrift.protocol.TMessageType.CALL, 0));
increment_args args = new increment_args();
args.setTable(table);
args.setTincrement(tincrement);
args.write(prot);
prot.writeMessageEnd();
}
public TResult getResult() throws TIOError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_increment();
}
}
public void append(ByteBuffer table, TAppend tappend, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
append_call method_call = new append_call(table, tappend, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class append_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer table;
private TAppend tappend;
public append_call(ByteBuffer table, TAppend tappend, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.table = table;
this.tappend = tappend;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("append", org.apache.thrift.protocol.TMessageType.CALL, 0));
append_args args = new append_args();
args.setTable(table);
args.setTappend(tappend);
args.write(prot);
prot.writeMessageEnd();
}
public TResult getResult() throws TIOError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_append();
}
}
public void openScanner(ByteBuffer table, TScan tscan, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
openScanner_call method_call = new openScanner_call(table, tscan, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class openScanner_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer table;
private TScan tscan;
public openScanner_call(ByteBuffer table, TScan tscan, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.table = table;
this.tscan = tscan;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("openScanner", org.apache.thrift.protocol.TMessageType.CALL, 0));
openScanner_args args = new openScanner_args();
args.setTable(table);
args.setTscan(tscan);
args.write(prot);
prot.writeMessageEnd();
}
public int getResult() throws TIOError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_openScanner();
}
}
public void getScannerRows(int scannerId, int numRows, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getScannerRows_call method_call = new getScannerRows_call(scannerId, numRows, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getScannerRows_call extends org.apache.thrift.async.TAsyncMethodCall {
private int scannerId;
private int numRows;
public getScannerRows_call(int scannerId, int numRows, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.scannerId = scannerId;
this.numRows = numRows;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getScannerRows", org.apache.thrift.protocol.TMessageType.CALL, 0));
getScannerRows_args args = new getScannerRows_args();
args.setScannerId(scannerId);
args.setNumRows(numRows);
args.write(prot);
prot.writeMessageEnd();
}
public List<TResult> getResult() throws TIOError, TIllegalArgument, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getScannerRows();
}
}
public void closeScanner(int scannerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
closeScanner_call method_call = new closeScanner_call(scannerId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class closeScanner_call extends org.apache.thrift.async.TAsyncMethodCall {
private int scannerId;
public closeScanner_call(int scannerId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.scannerId = scannerId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeScanner", org.apache.thrift.protocol.TMessageType.CALL, 0));
closeScanner_args args = new closeScanner_args();
args.setScannerId(scannerId);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws TIOError, TIllegalArgument, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_closeScanner();
}
}
public void mutateRow(ByteBuffer table, TRowMutations trowMutations, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
mutateRow_call method_call = new mutateRow_call(table, trowMutations, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class mutateRow_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer table;
private TRowMutations trowMutations;
public mutateRow_call(ByteBuffer table, TRowMutations trowMutations, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.table = table;
this.trowMutations = trowMutations;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mutateRow", org.apache.thrift.protocol.TMessageType.CALL, 0));
mutateRow_args args = new mutateRow_args();
args.setTable(table);
args.setTrowMutations(trowMutations);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws TIOError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_mutateRow();
}
}
public void getScannerResults(ByteBuffer table, TScan tscan, int numRows, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getScannerResults_call method_call = new getScannerResults_call(table, tscan, numRows, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getScannerResults_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer table;
private TScan tscan;
private int numRows;
public getScannerResults_call(ByteBuffer table, TScan tscan, int numRows, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.table = table;
this.tscan = tscan;
this.numRows = numRows;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getScannerResults", org.apache.thrift.protocol.TMessageType.CALL, 0));
getScannerResults_args args = new getScannerResults_args();
args.setTable(table);
args.setTscan(tscan);
args.setNumRows(numRows);
args.write(prot);
prot.writeMessageEnd();
}
public List<TResult> getResult() throws TIOError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getScannerResults();
}
}
public void getRegionLocation(ByteBuffer table, ByteBuffer row, boolean reload, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getRegionLocation_call method_call = new getRegionLocation_call(table, row, reload, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getRegionLocation_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer table;
private ByteBuffer row;
private boolean reload;
public getRegionLocation_call(ByteBuffer table, ByteBuffer row, boolean reload, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.table = table;
this.row = row;
this.reload = reload;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRegionLocation", org.apache.thrift.protocol.TMessageType.CALL, 0));
getRegionLocation_args args = new getRegionLocation_args();
args.setTable(table);
args.setRow(row);
args.setReload(reload);
args.write(prot);
prot.writeMessageEnd();
}
public THRegionLocation getResult() throws TIOError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getRegionLocation();
}
}
public void getAllRegionLocations(ByteBuffer table, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getAllRegionLocations_call method_call = new getAllRegionLocations_call(table, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getAllRegionLocations_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer table;
public getAllRegionLocations_call(ByteBuffer table, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.table = table;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllRegionLocations", org.apache.thrift.protocol.TMessageType.CALL, 0));
getAllRegionLocations_args args = new getAllRegionLocations_args();
args.setTable(table);
args.write(prot);
prot.writeMessageEnd();
}
public List<THRegionLocation> getResult() throws TIOError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getAllRegionLocations();
}
}
public void checkAndMutate(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, TCompareOp compareOp, ByteBuffer value, TRowMutations rowMutations, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
checkAndMutate_call method_call = new checkAndMutate_call(table, row, family, qualifier, compareOp, value, rowMutations, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class checkAndMutate_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer table;
private ByteBuffer row;
private ByteBuffer family;
private ByteBuffer qualifier;
private TCompareOp compareOp;
private ByteBuffer value;
private TRowMutations rowMutations;
public checkAndMutate_call(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, TCompareOp compareOp, ByteBuffer value, TRowMutations rowMutations, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.table = table;
this.row = row;
this.family = family;
this.qualifier = qualifier;
this.compareOp = compareOp;
this.value = value;
this.rowMutations = rowMutations;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("checkAndMutate", org.apache.thrift.protocol.TMessageType.CALL, 0));
checkAndMutate_args args = new checkAndMutate_args();
args.setTable(table);
args.setRow(row);
args.setFamily(family);
args.setQualifier(qualifier);
args.setCompareOp(compareOp);
args.setValue(value);
args.setRowMutations(rowMutations);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws TIOError, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_checkAndMutate();
}
}
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("exists", new exists());
processMap.put("existsAll", new existsAll());
processMap.put("get", new get());
processMap.put("getMultiple", new getMultiple());
processMap.put("put", new put());
processMap.put("checkAndPut", new checkAndPut());
processMap.put("putMultiple", new putMultiple());
processMap.put("deleteSingle", new deleteSingle());
processMap.put("deleteMultiple", new deleteMultiple());
processMap.put("checkAndDelete", new checkAndDelete());
processMap.put("increment", new increment());
processMap.put("append", new append());
processMap.put("openScanner", new openScanner());
processMap.put("getScannerRows", new getScannerRows());
processMap.put("closeScanner", new closeScanner());
processMap.put("mutateRow", new mutateRow());
processMap.put("getScannerResults", new getScannerResults());
processMap.put("getRegionLocation", new getRegionLocation());
processMap.put("getAllRegionLocations", new getAllRegionLocations());
processMap.put("checkAndMutate", new checkAndMutate());
return processMap;
}
public static class exists<I extends Iface> extends org.apache.thrift.ProcessFunction<I, exists_args> {
public exists() {
super("exists");
}
public exists_args getEmptyArgsInstance() {
return new exists_args();
}
protected boolean isOneway() {
return false;
}
public exists_result getResult(I iface, exists_args args) throws org.apache.thrift.TException {
exists_result result = new exists_result();
try {
result.success = iface.exists(args.table, args.tget);
result.setSuccessIsSet(true);
} catch (TIOError io) {
result.io = io;
}
return result;
}
}
public static class existsAll<I extends Iface> extends org.apache.thrift.ProcessFunction<I, existsAll_args> {
public existsAll() {
super("existsAll");
}
public existsAll_args getEmptyArgsInstance() {
return new existsAll_args();
}
protected boolean isOneway() {
return false;
}
public existsAll_result getResult(I iface, existsAll_args args) throws org.apache.thrift.TException {
existsAll_result result = new existsAll_result();
try {
result.success = iface.existsAll(args.table, args.tgets);
} catch (TIOError io) {
result.io = io;
}
return result;
}
}
public static class get<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_args> {
public get() {
super("get");
}
public get_args getEmptyArgsInstance() {
return new get_args();
}
protected boolean isOneway() {
return false;
}
public get_result getResult(I iface, get_args args) throws org.apache.thrift.TException {
get_result result = new get_result();
try {
result.success = iface.get(args.table, args.tget);
} catch (TIOError io) {
result.io = io;
}
return result;
}
}
public static class getMultiple<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getMultiple_args> {
public getMultiple() {
super("getMultiple");
}
public getMultiple_args getEmptyArgsInstance() {
return new getMultiple_args();
}
protected boolean isOneway() {
return false;
}
public getMultiple_result getResult(I iface, getMultiple_args args) throws org.apache.thrift.TException {
getMultiple_result result = new getMultiple_result();
try {
result.success = iface.getMultiple(args.table, args.tgets);
} catch (TIOError io) {
result.io = io;
}
return result;
}
}
public static class put<I extends Iface> extends org.apache.thrift.ProcessFunction<I, put_args> {
public put() {
super("put");
}
public put_args getEmptyArgsInstance() {
return new put_args();
}
protected boolean isOneway() {
return false;
}
public put_result getResult(I iface, put_args args) throws org.apache.thrift.TException {
put_result result = new put_result();
try {
iface.put(args.table, args.tput);
} catch (TIOError io) {
result.io = io;
}
return result;
}
}
public static class checkAndPut<I extends Iface> extends org.apache.thrift.ProcessFunction<I, checkAndPut_args> {
public checkAndPut() {
super("checkAndPut");
}
public checkAndPut_args getEmptyArgsInstance() {
return new checkAndPut_args();
}
protected boolean isOneway() {
return false;
}
public checkAndPut_result getResult(I iface, checkAndPut_args args) throws org.apache.thrift.TException {
checkAndPut_result result = new checkAndPut_result();
try {
result.success = iface.checkAndPut(args.table, args.row, args.family, args.qualifier, args.value, args.tput);
result.setSuccessIsSet(true);
} catch (TIOError io) {
result.io = io;
}
return result;
}
}
public static class putMultiple<I extends Iface> extends org.apache.thrift.ProcessFunction<I, putMultiple_args> {
public putMultiple() {
super("putMultiple");
}
public putMultiple_args getEmptyArgsInstance() {
return new putMultiple_args();
}
protected boolean isOneway() {
return false;
}
public putMultiple_result getResult(I iface, putMultiple_args args) throws org.apache.thrift.TException {
putMultiple_result result = new putMultiple_result();
try {
iface.putMultiple(args.table, args.tputs);
} catch (TIOError io) {
result.io = io;
}
return result;
}
}
public static class deleteSingle<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteSingle_args> {
public deleteSingle() {
super("deleteSingle");
}
public deleteSingle_args getEmptyArgsInstance() {
return new deleteSingle_args();
}
protected boolean isOneway() {
return false;
}
public deleteSingle_result getResult(I iface, deleteSingle_args args) throws org.apache.thrift.TException {
deleteSingle_result result = new deleteSingle_result();
try {
iface.deleteSingle(args.table, args.tdelete);
} catch (TIOError io) {
result.io = io;
}
return result;
}
}
public static class deleteMultiple<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteMultiple_args> {
public deleteMultiple() {
super("deleteMultiple");
}
public deleteMultiple_args getEmptyArgsInstance() {
return new deleteMultiple_args();
}
protected boolean isOneway() {
return false;
}
public deleteMultiple_result getResult(I iface, deleteMultiple_args args) throws org.apache.thrift.TException {
deleteMultiple_result result = new deleteMultiple_result();
try {
result.success = iface.deleteMultiple(args.table, args.tdeletes);
} catch (TIOError io) {
result.io = io;
}
return result;
}
}
public static class checkAndDelete<I extends Iface> extends org.apache.thrift.ProcessFunction<I, checkAndDelete_args> {
public checkAndDelete() {
super("checkAndDelete");
}
public checkAndDelete_args getEmptyArgsInstance() {
return new checkAndDelete_args();
}
protected boolean isOneway() {
return false;
}
public checkAndDelete_result getResult(I iface, checkAndDelete_args args) throws org.apache.thrift.TException {
checkAndDelete_result result = new checkAndDelete_result();
try {
result.success = iface.checkAndDelete(args.table, args.row, args.family, args.qualifier, args.value, args.tdelete);
result.setSuccessIsSet(true);
} catch (TIOError io) {
result.io = io;
}
return result;
}
}
public static class increment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, increment_args> {
public increment() {
super("increment");
}
public increment_args getEmptyArgsInstance() {
return new increment_args();
}
protected boolean isOneway() {
return false;
}
public increment_result getResult(I iface, increment_args args) throws org.apache.thrift.TException {
increment_result result = new increment_result();
try {
result.success = iface.increment(args.table, args.tincrement);
} catch (TIOError io) {
result.io = io;
}
return result;
}
}
public static class append<I extends Iface> extends org.apache.thrift.ProcessFunction<I, append_args> {
public append() {
super("append");
}
public append_args getEmptyArgsInstance() {
return new append_args();
}
protected boolean isOneway() {
return false;
}
public append_result getResult(I iface, append_args args) throws org.apache.thrift.TException {
append_result result = new append_result();
try {
result.success = iface.append(args.table, args.tappend);
} catch (TIOError io) {
result.io = io;
}
return result;
}
}
public static class openScanner<I extends Iface> extends org.apache.thrift.ProcessFunction<I, openScanner_args> {
public openScanner() {
super("openScanner");
}
public openScanner_args getEmptyArgsInstance() {
return new openScanner_args();
}
protected boolean isOneway() {
return false;
}
public openScanner_result getResult(I iface, openScanner_args args) throws org.apache.thrift.TException {
openScanner_result result = new openScanner_result();
try {
result.success = iface.openScanner(args.table, args.tscan);
result.setSuccessIsSet(true);
} catch (TIOError io) {
result.io = io;
}
return result;
}
}
public static class getScannerRows<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getScannerRows_args> {
public getScannerRows() {
super("getScannerRows");
}
public getScannerRows_args getEmptyArgsInstance() {
return new getScannerRows_args();
}
protected boolean isOneway() {
return false;
}
public getScannerRows_result getResult(I iface, getScannerRows_args args) throws org.apache.thrift.TException {
getScannerRows_result result = new getScannerRows_result();
try {
result.success = iface.getScannerRows(args.scannerId, args.numRows);
} catch (TIOError io) {
result.io = io;
} catch (TIllegalArgument ia) {
result.ia = ia;
}
return result;
}
}
public static class closeScanner<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closeScanner_args> {
public closeScanner() {
super("closeScanner");
}
public closeScanner_args getEmptyArgsInstance() {
return new closeScanner_args();
}
protected boolean isOneway() {
return false;
}
public closeScanner_result getResult(I iface, closeScanner_args args) throws org.apache.thrift.TException {
closeScanner_result result = new closeScanner_result();
try {
iface.closeScanner(args.scannerId);
} catch (TIOError io) {
result.io = io;
} catch (TIllegalArgument ia) {
result.ia = ia;
}
return result;
}
}
public static class mutateRow<I extends Iface> extends org.apache.thrift.ProcessFunction<I, mutateRow_args> {
public mutateRow() {
super("mutateRow");
}
public mutateRow_args getEmptyArgsInstance() {
return new mutateRow_args();
}
protected boolean isOneway() {
return false;
}
public mutateRow_result getResult(I iface, mutateRow_args args) throws org.apache.thrift.TException {
mutateRow_result result = new mutateRow_result();
try {
iface.mutateRow(args.table, args.trowMutations);
} catch (TIOError io) {
result.io = io;
}
return result;
}
}
public static class getScannerResults<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getScannerResults_args> {
public getScannerResults() {
super("getScannerResults");
}
public getScannerResults_args getEmptyArgsInstance() {
return new getScannerResults_args();
}
protected boolean isOneway() {
return false;
}
public getScannerResults_result getResult(I iface, getScannerResults_args args) throws org.apache.thrift.TException {
getScannerResults_result result = new getScannerResults_result();
try {
result.success = iface.getScannerResults(args.table, args.tscan, args.numRows);
} catch (TIOError io) {
result.io = io;
}
return result;
}
}
public static class getRegionLocation<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRegionLocation_args> {
public getRegionLocation() {
super("getRegionLocation");
}
public getRegionLocation_args getEmptyArgsInstance() {
return new getRegionLocation_args();
}
protected boolean isOneway() {
return false;
}
public getRegionLocation_result getResult(I iface, getRegionLocation_args args) throws org.apache.thrift.TException {
getRegionLocation_result result = new getRegionLocation_result();
try {
result.success = iface.getRegionLocation(args.table, args.row, args.reload);
} catch (TIOError io) {
result.io = io;
}
return result;
}
}
public static class getAllRegionLocations<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllRegionLocations_args> {
public getAllRegionLocations() {
super("getAllRegionLocations");
}
public getAllRegionLocations_args getEmptyArgsInstance() {
return new getAllRegionLocations_args();
}
protected boolean isOneway() {
return false;
}
public getAllRegionLocations_result getResult(I iface, getAllRegionLocations_args args) throws org.apache.thrift.TException {
getAllRegionLocations_result result = new getAllRegionLocations_result();
try {
result.success = iface.getAllRegionLocations(args.table);
} catch (TIOError io) {
result.io = io;
}
return result;
}
}
public static class checkAndMutate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, checkAndMutate_args> {
public checkAndMutate() {
super("checkAndMutate");
}
public checkAndMutate_args getEmptyArgsInstance() {
return new checkAndMutate_args();
}
protected boolean isOneway() {
return false;
}
public checkAndMutate_result getResult(I iface, checkAndMutate_args args) throws org.apache.thrift.TException {
checkAndMutate_result result = new checkAndMutate_result();
try {
result.success = iface.checkAndMutate(args.table, args.row, args.family, args.qualifier, args.compareOp, args.value, args.rowMutations);
result.setSuccessIsSet(true);
} catch (TIOError io) {
result.io = io;
}
return result;
}
}
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
}
protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("exists", new exists());
processMap.put("get", new get());
processMap.put("getMultiple", new getMultiple());
processMap.put("put", new put());
processMap.put("checkAndPut", new checkAndPut());
processMap.put("putMultiple", new putMultiple());
processMap.put("deleteSingle", new deleteSingle());
processMap.put("deleteMultiple", new deleteMultiple());
processMap.put("checkAndDelete", new checkAndDelete());
processMap.put("increment", new increment());
processMap.put("append", new append());
processMap.put("openScanner", new openScanner());
processMap.put("getScannerRows", new getScannerRows());
processMap.put("closeScanner", new closeScanner());
processMap.put("mutateRow", new mutateRow());
processMap.put("getScannerResults", new getScannerResults());
processMap.put("getRegionLocation", new getRegionLocation());
processMap.put("getAllRegionLocations", new getAllRegionLocations());
processMap.put("checkAndMutate", new checkAndMutate());
return processMap;
}
public static class exists<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, exists_args, Boolean> {
public exists() {
super("exists");
}
public exists_args getEmptyArgsInstance() {
return new exists_args();
}
public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Boolean>() {
public void onComplete(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);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
exists_result result = new exists_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, exists_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
iface.exists(args.table, args.tget,resultHandler);
}
}
public static class get<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_args, TResult> {
public get() {
super("get");
}
public get_args getEmptyArgsInstance() {
return new get_args();
}
public AsyncMethodCallback<TResult> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<TResult>() {
public void onComplete(TResult o) {
get_result result = new get_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
get_result result = new get_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, get_args args, org.apache.thrift.async.AsyncMethodCallback<TResult> resultHandler) throws TException {
iface.get(args.table, args.tget,resultHandler);
}
}
public static class getMultiple<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getMultiple_args, List<TResult>> {
public getMultiple() {
super("getMultiple");
}
public getMultiple_args getEmptyArgsInstance() {
return new getMultiple_args();
}
public AsyncMethodCallback<List<TResult>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<List<TResult>>() {
public void onComplete(List<TResult> o) {
getMultiple_result result = new getMultiple_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
getMultiple_result result = new getMultiple_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, getMultiple_args args, org.apache.thrift.async.AsyncMethodCallback<List<TResult>> resultHandler) throws TException {
iface.getMultiple(args.table, args.tgets,resultHandler);
}
}
public static class put<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, put_args, Void> {
public put() {
super("put");
}
public put_args getEmptyArgsInstance() {
return new put_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
put_result result = new put_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
put_result result = new put_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, put_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.put(args.table, args.tput,resultHandler);
}
}
public static class checkAndPut<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, checkAndPut_args, Boolean> {
public checkAndPut() {
super("checkAndPut");
}
public checkAndPut_args getEmptyArgsInstance() {
return new checkAndPut_args();
}
public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Boolean>() {
public void onComplete(Boolean o) {
checkAndPut_result result = new checkAndPut_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
checkAndPut_result result = new checkAndPut_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, checkAndPut_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
iface.checkAndPut(args.table, args.row, args.family, args.qualifier, args.value, args.tput,resultHandler);
}
}
public static class putMultiple<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, putMultiple_args, Void> {
public putMultiple() {
super("putMultiple");
}
public putMultiple_args getEmptyArgsInstance() {
return new putMultiple_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
putMultiple_result result = new putMultiple_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
putMultiple_result result = new putMultiple_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, putMultiple_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.putMultiple(args.table, args.tputs,resultHandler);
}
}
public static class deleteSingle<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteSingle_args, Void> {
public deleteSingle() {
super("deleteSingle");
}
public deleteSingle_args getEmptyArgsInstance() {
return new deleteSingle_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
deleteSingle_result result = new deleteSingle_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
deleteSingle_result result = new deleteSingle_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, deleteSingle_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.deleteSingle(args.table, args.tdelete,resultHandler);
}
}
public static class deleteMultiple<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteMultiple_args, List<TDelete>> {
public deleteMultiple() {
super("deleteMultiple");
}
public deleteMultiple_args getEmptyArgsInstance() {
return new deleteMultiple_args();
}
public AsyncMethodCallback<List<TDelete>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<List<TDelete>>() {
public void onComplete(List<TDelete> o) {
deleteMultiple_result result = new deleteMultiple_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
deleteMultiple_result result = new deleteMultiple_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, deleteMultiple_args args, org.apache.thrift.async.AsyncMethodCallback<List<TDelete>> resultHandler) throws TException {
iface.deleteMultiple(args.table, args.tdeletes,resultHandler);
}
}
public static class checkAndDelete<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, checkAndDelete_args, Boolean> {
public checkAndDelete() {
super("checkAndDelete");
}
public checkAndDelete_args getEmptyArgsInstance() {
return new checkAndDelete_args();
}
public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Boolean>() {
public void onComplete(Boolean o) {
checkAndDelete_result result = new checkAndDelete_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
checkAndDelete_result result = new checkAndDelete_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, checkAndDelete_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
iface.checkAndDelete(args.table, args.row, args.family, args.qualifier, args.value, args.tdelete,resultHandler);
}
}
public static class increment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, increment_args, TResult> {
public increment() {
super("increment");
}
public increment_args getEmptyArgsInstance() {
return new increment_args();
}
public AsyncMethodCallback<TResult> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<TResult>() {
public void onComplete(TResult o) {
increment_result result = new increment_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
increment_result result = new increment_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, increment_args args, org.apache.thrift.async.AsyncMethodCallback<TResult> resultHandler) throws TException {
iface.increment(args.table, args.tincrement,resultHandler);
}
}
public static class append<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, append_args, TResult> {
public append() {
super("append");
}
public append_args getEmptyArgsInstance() {
return new append_args();
}
public AsyncMethodCallback<TResult> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<TResult>() {
public void onComplete(TResult o) {
append_result result = new append_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
append_result result = new append_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, append_args args, org.apache.thrift.async.AsyncMethodCallback<TResult> resultHandler) throws TException {
iface.append(args.table, args.tappend,resultHandler);
}
}
public static class openScanner<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, openScanner_args, Integer> {
public openScanner() {
super("openScanner");
}
public openScanner_args getEmptyArgsInstance() {
return new openScanner_args();
}
public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Integer>() {
public void onComplete(Integer o) {
openScanner_result result = new openScanner_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
openScanner_result result = new openScanner_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, openScanner_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
iface.openScanner(args.table, args.tscan,resultHandler);
}
}
public static class getScannerRows<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getScannerRows_args, List<TResult>> {
public getScannerRows() {
super("getScannerRows");
}
public getScannerRows_args getEmptyArgsInstance() {
return new getScannerRows_args();
}
public AsyncMethodCallback<List<TResult>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<List<TResult>>() {
public void onComplete(List<TResult> o) {
getScannerRows_result result = new getScannerRows_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
getScannerRows_result result = new getScannerRows_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else if (e instanceof TIllegalArgument) {
result.ia = (TIllegalArgument) e;
result.setIaIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, getScannerRows_args args, org.apache.thrift.async.AsyncMethodCallback<List<TResult>> resultHandler) throws TException {
iface.getScannerRows(args.scannerId, args.numRows,resultHandler);
}
}
public static class closeScanner<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, closeScanner_args, Void> {
public closeScanner() {
super("closeScanner");
}
public closeScanner_args getEmptyArgsInstance() {
return new closeScanner_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
closeScanner_result result = new closeScanner_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
closeScanner_result result = new closeScanner_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else if (e instanceof TIllegalArgument) {
result.ia = (TIllegalArgument) e;
result.setIaIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, closeScanner_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.closeScanner(args.scannerId,resultHandler);
}
}
public static class mutateRow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, mutateRow_args, Void> {
public mutateRow() {
super("mutateRow");
}
public mutateRow_args getEmptyArgsInstance() {
return new mutateRow_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
mutateRow_result result = new mutateRow_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
mutateRow_result result = new mutateRow_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, mutateRow_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.mutateRow(args.table, args.trowMutations,resultHandler);
}
}
public static class getScannerResults<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getScannerResults_args, List<TResult>> {
public getScannerResults() {
super("getScannerResults");
}
public getScannerResults_args getEmptyArgsInstance() {
return new getScannerResults_args();
}
public AsyncMethodCallback<List<TResult>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<List<TResult>>() {
public void onComplete(List<TResult> o) {
getScannerResults_result result = new getScannerResults_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
getScannerResults_result result = new getScannerResults_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, getScannerResults_args args, org.apache.thrift.async.AsyncMethodCallback<List<TResult>> resultHandler) throws TException {
iface.getScannerResults(args.table, args.tscan, args.numRows,resultHandler);
}
}
public static class getRegionLocation<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getRegionLocation_args, THRegionLocation> {
public getRegionLocation() {
super("getRegionLocation");
}
public getRegionLocation_args getEmptyArgsInstance() {
return new getRegionLocation_args();
}
public AsyncMethodCallback<THRegionLocation> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<THRegionLocation>() {
public void onComplete(THRegionLocation o) {
getRegionLocation_result result = new getRegionLocation_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
getRegionLocation_result result = new getRegionLocation_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, getRegionLocation_args args, org.apache.thrift.async.AsyncMethodCallback<THRegionLocation> resultHandler) throws TException {
iface.getRegionLocation(args.table, args.row, args.reload,resultHandler);
}
}
public static class getAllRegionLocations<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllRegionLocations_args, List<THRegionLocation>> {
public getAllRegionLocations() {
super("getAllRegionLocations");
}
public getAllRegionLocations_args getEmptyArgsInstance() {
return new getAllRegionLocations_args();
}
public AsyncMethodCallback<List<THRegionLocation>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<List<THRegionLocation>>() {
public void onComplete(List<THRegionLocation> o) {
getAllRegionLocations_result result = new getAllRegionLocations_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
getAllRegionLocations_result result = new getAllRegionLocations_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, getAllRegionLocations_args args, org.apache.thrift.async.AsyncMethodCallback<List<THRegionLocation>> resultHandler) throws TException {
iface.getAllRegionLocations(args.table,resultHandler);
}
}
public static class checkAndMutate<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, checkAndMutate_args, Boolean> {
public checkAndMutate() {
super("checkAndMutate");
}
public checkAndMutate_args getEmptyArgsInstance() {
return new checkAndMutate_args();
}
public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Boolean>() {
public void onComplete(Boolean o) {
checkAndMutate_result result = new checkAndMutate_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
checkAndMutate_result result = new checkAndMutate_result();
if (e instanceof TIOError) {
result.io = (TIOError) e;
result.setIoIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, checkAndMutate_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
iface.checkAndMutate(args.table, args.row, args.family, args.qualifier, args.compareOp, args.value, args.rowMutations,resultHandler);
}
}
}
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 TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TGET_FIELD_DESC = new org.apache.thrift.protocol.TField("tget", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new exists_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new exists_argsTupleSchemeFactory());
}
/**
* the table to check on
*/
public ByteBuffer table; // required
/**
* the TGet to check for
*/
public TGet tget; // 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 {
/**
* the table to check on
*/
TABLE((short)1, "table"),
/**
* the TGet to check for
*/
TGET((short)2, "tget");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
return TABLE;
case 2: // TGET
return TGET;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.TGET, new org.apache.thrift.meta_data.FieldMetaData("tget", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGet.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exists_args.class, metaDataMap);
}
public exists_args() {
}
public exists_args(
ByteBuffer table,
TGet tget)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
this.tget = tget;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public exists_args(exists_args other) {
if (other.isSetTable()) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
if (other.isSetTget()) {
this.tget = new TGet(other.tget);
}
}
public exists_args deepCopy() {
return new exists_args(this);
}
@Override
public void clear() {
this.table = null;
this.tget = null;
}
/**
* the table to check on
*/
public byte[] getTable() {
setTable(org.apache.thrift.TBaseHelper.rightSize(table));
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
/**
* the table to check on
*/
public exists_args setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
return this;
}
public exists_args setTable(ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
/**
* the TGet to check for
*/
public TGet getTget() {
return this.tget;
}
/**
* the TGet to check for
*/
public exists_args setTget(TGet tget) {
this.tget = tget;
return this;
}
public void unsetTget() {
this.tget = null;
}
/** Returns true if field tget is set (has been assigned a value) and false otherwise */
public boolean isSetTget() {
return this.tget != null;
}
public void setTgetIsSet(boolean value) {
if (!value) {
this.tget = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
}
break;
case TGET:
if (value == null) {
unsetTget();
} else {
setTget((TGet)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
case TGET:
return getTget();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
case TGET:
return isSetTget();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof exists_args)
return this.equals((exists_args)that);
return false;
}
public boolean equals(exists_args that) {
if (that == null)
return false;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_tget = true && this.isSetTget();
boolean that_present_tget = true && that.isSetTget();
if (this_present_tget || that_present_tget) {
if (!(this_present_tget && that_present_tget))
return false;
if (!this.tget.equals(that.tget))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
boolean present_tget = true && (isSetTget());
list.add(present_tget);
if (present_tget)
list.add(tget);
return list.hashCode();
}
@Override
public int compareTo(exists_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTget()).compareTo(other.isSetTget());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTget()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tget, other.tget);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("exists_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.table, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("tget:");
if (this.tget == null) {
sb.append("null");
} else {
sb.append(this.tget);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (tget == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tget' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (tget != null) {
tget.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class exists_argsStandardSchemeFactory implements SchemeFactory {
public exists_argsStandardScheme getScheme() {
return new exists_argsStandardScheme();
}
}
private static class exists_argsStandardScheme extends StandardScheme<exists_args> {
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: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TGET
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.tget = new TGet();
struct.tget.read(iprot);
struct.setTgetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, exists_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeBinary(struct.table);
oprot.writeFieldEnd();
}
if (struct.tget != null) {
oprot.writeFieldBegin(TGET_FIELD_DESC);
struct.tget.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class exists_argsTupleSchemeFactory implements SchemeFactory {
public exists_argsTupleScheme getScheme() {
return new exists_argsTupleScheme();
}
}
private static class exists_argsTupleScheme extends TupleScheme<exists_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, exists_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
struct.tget.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, exists_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
struct.tget = new TGet();
struct.tget.read(iprot);
struct.setTgetIsSet(true);
}
}
}
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.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new exists_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new exists_resultTupleSchemeFactory());
}
public boolean success; // required
public TIOError io; // 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"),
IO((short)1, "io");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IO
return IO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exists_result.class, metaDataMap);
}
public exists_result() {
}
public exists_result(
boolean success,
TIOError io)
{
this();
this.success = success;
setSuccessIsSet(true);
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public exists_result(exists_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
}
public exists_result deepCopy() {
return new exists_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.io = null;
}
public boolean isSuccess() {
return this.success;
}
public exists_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public TIOError getIo() {
return this.io;
}
public exists_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case IO:
return getIo();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IO:
return isSetIo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof exists_result)
return this.equals((exists_result)that);
return false;
}
public boolean equals(exists_result that) {
if (that == null)
return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true;
list.add(present_success);
if (present_success)
list.add(success);
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
return list.hashCode();
}
@Override
public int compareTo(exists_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("exists_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class exists_resultStandardSchemeFactory implements SchemeFactory {
public exists_resultStandardScheme getScheme() {
return new exists_resultStandardScheme();
}
}
private static class exists_resultStandardScheme extends StandardScheme<exists_result> {
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;
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, 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();
}
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class exists_resultTupleSchemeFactory implements SchemeFactory {
public exists_resultTupleScheme getScheme() {
return new exists_resultTupleScheme();
}
}
private static class exists_resultTupleScheme extends TupleScheme<exists_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, exists_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIo()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, exists_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class existsAll_args implements org.apache.thrift.TBase<existsAll_args, existsAll_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("existsAll_args");
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short) 1);
private static final org.apache.thrift.protocol.TField TGETS_FIELD_DESC = new org.apache.thrift.protocol.TField("tgets", org.apache.thrift.protocol.TType.LIST, (short) 2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new existsAll_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new existsAll_argsTupleSchemeFactory());
}
/**
* the table to check on
*/
public ByteBuffer table; // required
/**
* a list of TGets to check for
*/
public List<TGet> tgets; // 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 {
/**
* the table to check on
*/
TABLE((short) 1, "table"),
/**
* a list of TGets to check for
*/
TGETS((short) 2, "tgets");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch (fieldId) {
case 1: // TABLE
return TABLE;
case 2: // TGETS
return TGETS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING, true)));
tmpMap.put(_Fields.TGETS, new org.apache.thrift.meta_data.FieldMetaData("tgets", org.apache.thrift.TFieldRequirementType.REQUIRED,
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, TGet.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(existsAll_args.class, metaDataMap);
}
public existsAll_args() {
}
public existsAll_args(
ByteBuffer table,
List<TGet> tgets) {
this();
this.table = table;
this.tgets = tgets;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public existsAll_args(existsAll_args other) {
if (other.isSetTable()) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
;
}
if (other.isSetTgets()) {
List<TGet> __this__tgets = new ArrayList<TGet>();
for (TGet other_element : other.tgets) {
__this__tgets.add(new TGet(other_element));
}
this.tgets = __this__tgets;
}
}
public existsAll_args deepCopy() {
return new existsAll_args(this);
}
@Override
public void clear() {
this.table = null;
this.tgets = null;
}
/**
* the table to check on
*/
public byte[] getTable() {
setTable(org.apache.thrift.TBaseHelper.rightSize(table));
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
return table;
}
/**
* the table to check on
*/
public existsAll_args setTable(byte[] table) {
setTable(table == null ? (ByteBuffer) null : ByteBuffer.wrap(table));
return this;
}
public existsAll_args setTable(ByteBuffer table) {
this.table = table;
return this;
}
public void unsetTable() {
this.table = null;
}
/**
* Returns true if field table is set (has been assigned a value) and false otherwise
*/
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
public int getTgetsSize() {
return (this.tgets == null) ? 0 : this.tgets.size();
}
public java.util.Iterator<TGet> getTgetsIterator() {
return (this.tgets == null) ? null : this.tgets.iterator();
}
public void addToTgets(TGet elem) {
if (this.tgets == null) {
this.tgets = new ArrayList<TGet>();
}
this.tgets.add(elem);
}
/**
* a list of TGets to check for
*/
public List<TGet> getTgets() {
return this.tgets;
}
/**
* a list of TGets to check for
*/
public existsAll_args setTgets(List<TGet> tgets) {
this.tgets = tgets;
return this;
}
public void unsetTgets() {
this.tgets = null;
}
/**
* Returns true if field tgets is set (has been assigned a value) and false otherwise
*/
public boolean isSetTgets() {
return this.tgets != null;
}
public void setTgetsIsSet(boolean value) {
if (!value) {
this.tgets = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer) value);
}
break;
case TGETS:
if (value == null) {
unsetTgets();
} else {
setTgets((List<TGet>) value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
case TGETS:
return getTgets();
}
throw new IllegalStateException();
}
/**
* Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
*/
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
case TGETS:
return isSetTgets();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof existsAll_args)
return this.equals((existsAll_args) that);
return false;
}
public boolean equals(existsAll_args that) {
if (that == null)
return false;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_tgets = true && this.isSetTgets();
boolean that_present_tgets = true && that.isSetTgets();
if (this_present_tgets || that_present_tgets) {
if (!(this_present_tgets && that_present_tgets))
return false;
if (!this.tgets.equals(that.tgets))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(existsAll_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
existsAll_args typedOther = (existsAll_args) other;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(typedOther.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, typedOther.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTgets()).compareTo(typedOther.isSetTgets());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTgets()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tgets, typedOther.tgets);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("existsAll_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.table, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("tgets:");
if (this.tgets == null) {
sb.append("null");
} else {
sb.append(this.tgets);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (tgets == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tgets' 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, 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 existsAll_argsStandardSchemeFactory implements SchemeFactory {
public existsAll_argsStandardScheme getScheme() {
return new existsAll_argsStandardScheme();
}
}
private static class existsAll_argsStandardScheme extends StandardScheme<existsAll_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, existsAll_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: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TGETS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list132 = iprot.readListBegin();
struct.tgets = new ArrayList<TGet>(_list132.size);
for (int _i133 = 0; _i133 < _list132.size; ++_i133) {
TGet _elem134; // required
_elem134 = new TGet();
_elem134.read(iprot);
struct.tgets.add(_elem134);
}
iprot.readListEnd();
}
struct.setTgetsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, existsAll_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeBinary(struct.table);
oprot.writeFieldEnd();
}
if (struct.tgets != null) {
oprot.writeFieldBegin(TGETS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tgets.size()));
for (TGet _iter135 : struct.tgets) {
_iter135.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class existsAll_argsTupleSchemeFactory implements SchemeFactory {
public existsAll_argsTupleScheme getScheme() {
return new existsAll_argsTupleScheme();
}
}
private static class existsAll_argsTupleScheme extends TupleScheme<existsAll_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, existsAll_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
{
oprot.writeI32(struct.tgets.size());
for (TGet _iter136 : struct.tgets) {
_iter136.write(oprot);
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, existsAll_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
{
org.apache.thrift.protocol.TList _list137 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.tgets = new ArrayList<TGet>(_list137.size);
for (int _i138 = 0; _i138 < _list137.size; ++_i138) {
TGet _elem139; // required
_elem139 = new TGet();
_elem139.read(iprot);
struct.tgets.add(_elem139);
}
}
struct.setTgetsIsSet(true);
}
}
}
public static class existsAll_result implements org.apache.thrift.TBase<existsAll_result, existsAll_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("existsAll_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.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new existsAll_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new existsAll_resultTupleSchemeFactory());
}
public List<Boolean> success; // required
public TIOError io; // 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"),
IO((short) 1, "io");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch (fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IO
return IO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))));
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(existsAll_result.class, metaDataMap);
}
public existsAll_result() {
}
public existsAll_result(
List<Boolean> success,
TIOError io) {
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public existsAll_result(existsAll_result other) {
if (other.isSetSuccess()) {
List<Boolean> __this__success = new ArrayList<Boolean>();
for (Boolean other_element : other.success) {
__this__success.add(other_element);
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
}
public existsAll_result deepCopy() {
return new existsAll_result(this);
}
@Override
public void clear() {
this.success = null;
this.io = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<Boolean> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(boolean elem) {
if (this.success == null) {
this.success = new ArrayList<Boolean>();
}
this.success.add(elem);
}
public List<Boolean> getSuccess() {
return this.success;
}
public existsAll_result setSuccess(List<Boolean> success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/**
* Returns true if field success is set (has been assigned a value) and false otherwise
*/
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public TIOError getIo() {
return this.io;
}
public existsAll_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/**
* Returns true if field io is set (has been assigned a value) and false otherwise
*/
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((List<Boolean>) value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError) value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case IO:
return getIo();
}
throw new IllegalStateException();
}
/**
* Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
*/
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IO:
return isSetIo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof existsAll_result)
return this.equals((existsAll_result) that);
return false;
}
public boolean equals(existsAll_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(existsAll_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
existsAll_result typedOther = (existsAll_result) other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("existsAll_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class existsAll_resultStandardSchemeFactory implements SchemeFactory {
public existsAll_resultStandardScheme getScheme() {
return new existsAll_resultStandardScheme();
}
}
private static class existsAll_resultStandardScheme extends StandardScheme<existsAll_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, existsAll_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 _list140 = iprot.readListBegin();
struct.success = new ArrayList<Boolean>(_list140.size);
for (int _i141 = 0; _i141 < _list140.size; ++_i141) {
boolean _elem142; // required
_elem142 = iprot.readBool();
struct.success.add(_elem142);
}
iprot.readListEnd();
}
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, existsAll_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.BOOL, struct.success.size()));
for (boolean _iter143 : struct.success) {
oprot.writeBool(_iter143);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class existsAll_resultTupleSchemeFactory implements SchemeFactory {
public existsAll_resultTupleScheme getScheme() {
return new existsAll_resultTupleScheme();
}
}
private static class existsAll_resultTupleScheme extends TupleScheme<existsAll_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, existsAll_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIo()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (boolean _iter144 : struct.success) {
oprot.writeBool(_iter144);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, existsAll_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list145 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BOOL, iprot.readI32());
struct.success = new ArrayList<Boolean>(_list145.size);
for (int _i146 = 0; _i146 < _list145.size; ++_i146) {
boolean _elem147; // required
_elem147 = iprot.readBool();
struct.success.add(_elem147);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class get_args implements org.apache.thrift.TBase<get_args, get_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_args");
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TGET_FIELD_DESC = new org.apache.thrift.protocol.TField("tget", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new get_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new get_argsTupleSchemeFactory());
}
/**
* the table to get from
*/
public ByteBuffer table; // required
/**
* the TGet to fetch
*/
public TGet tget; // 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 {
/**
* the table to get from
*/
TABLE((short)1, "table"),
/**
* the TGet to fetch
*/
TGET((short)2, "tget");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
return TABLE;
case 2: // TGET
return TGET;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.TGET, new org.apache.thrift.meta_data.FieldMetaData("tget", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGet.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_args.class, metaDataMap);
}
public get_args() {
}
public get_args(
ByteBuffer table,
TGet tget)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
this.tget = tget;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public get_args(get_args other) {
if (other.isSetTable()) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
if (other.isSetTget()) {
this.tget = new TGet(other.tget);
}
}
public get_args deepCopy() {
return new get_args(this);
}
@Override
public void clear() {
this.table = null;
this.tget = null;
}
/**
* the table to get from
*/
public byte[] getTable() {
setTable(org.apache.thrift.TBaseHelper.rightSize(table));
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
/**
* the table to get from
*/
public get_args setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
return this;
}
public get_args setTable(ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
/**
* the TGet to fetch
*/
public TGet getTget() {
return this.tget;
}
/**
* the TGet to fetch
*/
public get_args setTget(TGet tget) {
this.tget = tget;
return this;
}
public void unsetTget() {
this.tget = null;
}
/** Returns true if field tget is set (has been assigned a value) and false otherwise */
public boolean isSetTget() {
return this.tget != null;
}
public void setTgetIsSet(boolean value) {
if (!value) {
this.tget = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
}
break;
case TGET:
if (value == null) {
unsetTget();
} else {
setTget((TGet)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
case TGET:
return getTget();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
case TGET:
return isSetTget();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof get_args)
return this.equals((get_args)that);
return false;
}
public boolean equals(get_args that) {
if (that == null)
return false;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_tget = true && this.isSetTget();
boolean that_present_tget = true && that.isSetTget();
if (this_present_tget || that_present_tget) {
if (!(this_present_tget && that_present_tget))
return false;
if (!this.tget.equals(that.tget))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
boolean present_tget = true && (isSetTget());
list.add(present_tget);
if (present_tget)
list.add(tget);
return list.hashCode();
}
@Override
public int compareTo(get_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTget()).compareTo(other.isSetTget());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTget()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tget, other.tget);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("get_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.table, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("tget:");
if (this.tget == null) {
sb.append("null");
} else {
sb.append(this.tget);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (tget == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tget' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (tget != null) {
tget.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class get_argsStandardSchemeFactory implements SchemeFactory {
public get_argsStandardScheme getScheme() {
return new get_argsStandardScheme();
}
}
private static class get_argsStandardScheme extends StandardScheme<get_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, get_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TGET
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.tget = new TGet();
struct.tget.read(iprot);
struct.setTgetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, get_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeBinary(struct.table);
oprot.writeFieldEnd();
}
if (struct.tget != null) {
oprot.writeFieldBegin(TGET_FIELD_DESC);
struct.tget.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class get_argsTupleSchemeFactory implements SchemeFactory {
public get_argsTupleScheme getScheme() {
return new get_argsTupleScheme();
}
}
private static class get_argsTupleScheme extends TupleScheme<get_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
struct.tget.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
struct.tget = new TGet();
struct.tget.read(iprot);
struct.setTgetIsSet(true);
}
}
}
public static class get_result implements org.apache.thrift.TBase<get_result, get_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new get_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new get_resultTupleSchemeFactory());
}
public TResult success; // required
public TIOError io; // 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"),
IO((short)1, "io");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IO
return IO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResult.class)));
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_result.class, metaDataMap);
}
public get_result() {
}
public get_result(
TResult success,
TIOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public get_result(get_result other) {
if (other.isSetSuccess()) {
this.success = new TResult(other.success);
}
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
}
public get_result deepCopy() {
return new get_result(this);
}
@Override
public void clear() {
this.success = null;
this.io = null;
}
public TResult getSuccess() {
return this.success;
}
public get_result setSuccess(TResult success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public TIOError getIo() {
return this.io;
}
public get_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((TResult)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case IO:
return getIo();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IO:
return isSetIo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof get_result)
return this.equals((get_result)that);
return false;
}
public boolean equals(get_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.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;
}
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
return list.hashCode();
}
@Override
public int compareTo(get_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("get_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class get_resultStandardSchemeFactory implements SchemeFactory {
public get_resultStandardScheme getScheme() {
return new get_resultStandardScheme();
}
}
private static class get_resultStandardScheme extends StandardScheme<get_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, get_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new TResult();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, 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();
}
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class get_resultTupleSchemeFactory implements SchemeFactory {
public get_resultTupleScheme getScheme() {
return new get_resultTupleScheme();
}
}
private static class get_resultTupleScheme extends TupleScheme<get_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, get_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIo()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, get_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new TResult();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class getMultiple_args implements org.apache.thrift.TBase<getMultiple_args, getMultiple_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMultiple_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMultiple_args");
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TGETS_FIELD_DESC = new org.apache.thrift.protocol.TField("tgets", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getMultiple_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getMultiple_argsTupleSchemeFactory());
}
/**
* the table to get from
*/
public ByteBuffer table; // required
/**
* a list of TGets to fetch, the Result list
* will have the Results at corresponding positions
* or null if there was an error
*/
public List<TGet> tgets; // 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 {
/**
* the table to get from
*/
TABLE((short)1, "table"),
/**
* a list of TGets to fetch, the Result list
* will have the Results at corresponding positions
* or null if there was an error
*/
TGETS((short)2, "tgets");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
return TABLE;
case 2: // TGETS
return TGETS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.TGETS, new org.apache.thrift.meta_data.FieldMetaData("tgets", org.apache.thrift.TFieldRequirementType.REQUIRED,
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, TGet.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMultiple_args.class, metaDataMap);
}
public getMultiple_args() {
}
public getMultiple_args(
ByteBuffer table,
List<TGet> tgets)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
this.tgets = tgets;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getMultiple_args(getMultiple_args other) {
if (other.isSetTable()) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
if (other.isSetTgets()) {
List<TGet> __this__tgets = new ArrayList<TGet>(other.tgets.size());
for (TGet other_element : other.tgets) {
__this__tgets.add(new TGet(other_element));
}
this.tgets = __this__tgets;
}
}
public getMultiple_args deepCopy() {
return new getMultiple_args(this);
}
@Override
public void clear() {
this.table = null;
this.tgets = null;
}
/**
* the table to get from
*/
public byte[] getTable() {
setTable(org.apache.thrift.TBaseHelper.rightSize(table));
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
/**
* the table to get from
*/
public getMultiple_args setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
return this;
}
public getMultiple_args setTable(ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
public int getTgetsSize() {
return (this.tgets == null) ? 0 : this.tgets.size();
}
public java.util.Iterator<TGet> getTgetsIterator() {
return (this.tgets == null) ? null : this.tgets.iterator();
}
public void addToTgets(TGet elem) {
if (this.tgets == null) {
this.tgets = new ArrayList<TGet>();
}
this.tgets.add(elem);
}
/**
* a list of TGets to fetch, the Result list
* will have the Results at corresponding positions
* or null if there was an error
*/
public List<TGet> getTgets() {
return this.tgets;
}
/**
* a list of TGets to fetch, the Result list
* will have the Results at corresponding positions
* or null if there was an error
*/
public getMultiple_args setTgets(List<TGet> tgets) {
this.tgets = tgets;
return this;
}
public void unsetTgets() {
this.tgets = null;
}
/** Returns true if field tgets is set (has been assigned a value) and false otherwise */
public boolean isSetTgets() {
return this.tgets != null;
}
public void setTgetsIsSet(boolean value) {
if (!value) {
this.tgets = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
}
break;
case TGETS:
if (value == null) {
unsetTgets();
} else {
setTgets((List<TGet>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
case TGETS:
return getTgets();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
case TGETS:
return isSetTgets();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getMultiple_args)
return this.equals((getMultiple_args)that);
return false;
}
public boolean equals(getMultiple_args that) {
if (that == null)
return false;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_tgets = true && this.isSetTgets();
boolean that_present_tgets = true && that.isSetTgets();
if (this_present_tgets || that_present_tgets) {
if (!(this_present_tgets && that_present_tgets))
return false;
if (!this.tgets.equals(that.tgets))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
boolean present_tgets = true && (isSetTgets());
list.add(present_tgets);
if (present_tgets)
list.add(tgets);
return list.hashCode();
}
@Override
public int compareTo(getMultiple_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTgets()).compareTo(other.isSetTgets());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTgets()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tgets, other.tgets);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getMultiple_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.table, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("tgets:");
if (this.tgets == null) {
sb.append("null");
} else {
sb.append(this.tgets);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (tgets == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tgets' 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, 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 getMultiple_argsStandardSchemeFactory implements SchemeFactory {
public getMultiple_argsStandardScheme getScheme() {
return new getMultiple_argsStandardScheme();
}
}
private static class getMultiple_argsStandardScheme extends StandardScheme<getMultiple_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getMultiple_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: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TGETS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list132 = iprot.readListBegin();
struct.tgets = new ArrayList<TGet>(_list132.size);
TGet _elem133;
for (int _i134 = 0; _i134 < _list132.size; ++_i134)
{
_elem133 = new TGet();
_elem133.read(iprot);
struct.tgets.add(_elem133);
}
iprot.readListEnd();
}
struct.setTgetsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getMultiple_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeBinary(struct.table);
oprot.writeFieldEnd();
}
if (struct.tgets != null) {
oprot.writeFieldBegin(TGETS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tgets.size()));
for (TGet _iter135 : struct.tgets)
{
_iter135.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getMultiple_argsTupleSchemeFactory implements SchemeFactory {
public getMultiple_argsTupleScheme getScheme() {
return new getMultiple_argsTupleScheme();
}
}
private static class getMultiple_argsTupleScheme extends TupleScheme<getMultiple_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getMultiple_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
{
oprot.writeI32(struct.tgets.size());
for (TGet _iter136 : struct.tgets)
{
_iter136.write(oprot);
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getMultiple_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
{
org.apache.thrift.protocol.TList _list137 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.tgets = new ArrayList<TGet>(_list137.size);
TGet _elem138;
for (int _i139 = 0; _i139 < _list137.size; ++_i139)
{
_elem138 = new TGet();
_elem138.read(iprot);
struct.tgets.add(_elem138);
}
}
struct.setTgetsIsSet(true);
}
}
}
public static class getMultiple_result implements org.apache.thrift.TBase<getMultiple_result, getMultiple_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMultiple_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMultiple_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.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getMultiple_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getMultiple_resultTupleSchemeFactory());
}
public List<TResult> success; // required
public TIOError io; // 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"),
IO((short)1, "io");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IO
return IO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResult.class))));
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMultiple_result.class, metaDataMap);
}
public getMultiple_result() {
}
public getMultiple_result(
List<TResult> success,
TIOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getMultiple_result(getMultiple_result other) {
if (other.isSetSuccess()) {
List<TResult> __this__success = new ArrayList<TResult>(other.success.size());
for (TResult other_element : other.success) {
__this__success.add(new TResult(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
}
public getMultiple_result deepCopy() {
return new getMultiple_result(this);
}
@Override
public void clear() {
this.success = null;
this.io = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<TResult> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TResult elem) {
if (this.success == null) {
this.success = new ArrayList<TResult>();
}
this.success.add(elem);
}
public List<TResult> getSuccess() {
return this.success;
}
public getMultiple_result setSuccess(List<TResult> success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public TIOError getIo() {
return this.io;
}
public getMultiple_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((List<TResult>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case IO:
return getIo();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IO:
return isSetIo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getMultiple_result)
return this.equals((getMultiple_result)that);
return false;
}
public boolean equals(getMultiple_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
return list.hashCode();
}
@Override
public int compareTo(getMultiple_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getMultiple_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getMultiple_resultStandardSchemeFactory implements SchemeFactory {
public getMultiple_resultStandardScheme getScheme() {
return new getMultiple_resultStandardScheme();
}
}
private static class getMultiple_resultStandardScheme extends StandardScheme<getMultiple_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getMultiple_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 _list140 = iprot.readListBegin();
struct.success = new ArrayList<TResult>(_list140.size);
TResult _elem141;
for (int _i142 = 0; _i142 < _list140.size; ++_i142)
{
_elem141 = new TResult();
_elem141.read(iprot);
struct.success.add(_elem141);
}
iprot.readListEnd();
}
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getMultiple_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 (TResult _iter143 : struct.success)
{
_iter143.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getMultiple_resultTupleSchemeFactory implements SchemeFactory {
public getMultiple_resultTupleScheme getScheme() {
return new getMultiple_resultTupleScheme();
}
}
private static class getMultiple_resultTupleScheme extends TupleScheme<getMultiple_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getMultiple_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIo()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (TResult _iter144 : struct.success)
{
_iter144.write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getMultiple_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list145 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TResult>(_list145.size);
TResult _elem146;
for (int _i147 = 0; _i147 < _list145.size; ++_i147)
{
_elem146 = new TResult();
_elem146.read(iprot);
struct.success.add(_elem146);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
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 TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TPUT_FIELD_DESC = new org.apache.thrift.protocol.TField("tput", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new put_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new put_argsTupleSchemeFactory());
}
/**
* the table to put data in
*/
public ByteBuffer table; // required
/**
* the TPut to put
*/
public TPut tput; // 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 {
/**
* the table to put data in
*/
TABLE((short)1, "table"),
/**
* the TPut to put
*/
TPUT((short)2, "tput");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
return TABLE;
case 2: // TPUT
return TPUT;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.TPUT, new org.apache.thrift.meta_data.FieldMetaData("tput", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPut.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_args.class, metaDataMap);
}
public put_args() {
}
public put_args(
ByteBuffer table,
TPut tput)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
this.tput = tput;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public put_args(put_args other) {
if (other.isSetTable()) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
if (other.isSetTput()) {
this.tput = new TPut(other.tput);
}
}
public put_args deepCopy() {
return new put_args(this);
}
@Override
public void clear() {
this.table = null;
this.tput = null;
}
/**
* the table to put data in
*/
public byte[] getTable() {
setTable(org.apache.thrift.TBaseHelper.rightSize(table));
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
/**
* the table to put data in
*/
public put_args setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
return this;
}
public put_args setTable(ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
/**
* the TPut to put
*/
public TPut getTput() {
return this.tput;
}
/**
* the TPut to put
*/
public put_args setTput(TPut tput) {
this.tput = tput;
return this;
}
public void unsetTput() {
this.tput = null;
}
/** Returns true if field tput is set (has been assigned a value) and false otherwise */
public boolean isSetTput() {
return this.tput != null;
}
public void setTputIsSet(boolean value) {
if (!value) {
this.tput = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
}
break;
case TPUT:
if (value == null) {
unsetTput();
} else {
setTput((TPut)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
case TPUT:
return getTput();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
case TPUT:
return isSetTput();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof put_args)
return this.equals((put_args)that);
return false;
}
public boolean equals(put_args that) {
if (that == null)
return false;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_tput = true && this.isSetTput();
boolean that_present_tput = true && that.isSetTput();
if (this_present_tput || that_present_tput) {
if (!(this_present_tput && that_present_tput))
return false;
if (!this.tput.equals(that.tput))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
boolean present_tput = true && (isSetTput());
list.add(present_tput);
if (present_tput)
list.add(tput);
return list.hashCode();
}
@Override
public int compareTo(put_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTput()).compareTo(other.isSetTput());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTput()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tput, other.tput);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("put_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.table, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("tput:");
if (this.tput == null) {
sb.append("null");
} else {
sb.append(this.tput);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (tput == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tput' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (tput != null) {
tput.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class put_argsStandardSchemeFactory implements SchemeFactory {
public put_argsStandardScheme getScheme() {
return new put_argsStandardScheme();
}
}
private static class put_argsStandardScheme extends StandardScheme<put_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, put_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TPUT
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.tput = new TPut();
struct.tput.read(iprot);
struct.setTputIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, put_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeBinary(struct.table);
oprot.writeFieldEnd();
}
if (struct.tput != null) {
oprot.writeFieldBegin(TPUT_FIELD_DESC);
struct.tput.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class put_argsTupleSchemeFactory implements SchemeFactory {
public put_argsTupleScheme getScheme() {
return new put_argsTupleScheme();
}
}
private static class put_argsTupleScheme extends TupleScheme<put_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, put_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
struct.tput.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, put_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
struct.tput = new TPut();
struct.tput.read(iprot);
struct.setTputIsSet(true);
}
}
}
public static class put_result implements org.apache.thrift.TBase<put_result, put_result._Fields>, java.io.Serializable, Cloneable, Comparable<put_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("put_result");
private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new put_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new put_resultTupleSchemeFactory());
}
public TIOError io; // 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 {
IO((short)1, "io");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // IO
return IO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_result.class, metaDataMap);
}
public put_result() {
}
public put_result(
TIOError io)
{
this();
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public put_result(put_result other) {
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
}
public put_result deepCopy() {
return new put_result(this);
}
@Override
public void clear() {
this.io = null;
}
public TIOError getIo() {
return this.io;
}
public put_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case IO:
return getIo();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case IO:
return isSetIo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof put_result)
return this.equals((put_result)that);
return false;
}
public boolean equals(put_result that) {
if (that == null)
return false;
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
return list.hashCode();
}
@Override
public int compareTo(put_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("put_result(");
boolean first = true;
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class put_resultStandardSchemeFactory implements SchemeFactory {
public put_resultStandardScheme getScheme() {
return new put_resultStandardScheme();
}
}
private static class put_resultStandardScheme extends StandardScheme<put_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, put_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, put_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class put_resultTupleSchemeFactory implements SchemeFactory {
public put_resultTupleScheme getScheme() {
return new put_resultTupleScheme();
}
}
private static class put_resultTupleScheme extends TupleScheme<put_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, put_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetIo()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, put_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class checkAndPut_args implements org.apache.thrift.TBase<checkAndPut_args, checkAndPut_args._Fields>, java.io.Serializable, Cloneable, Comparable<checkAndPut_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkAndPut_args");
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField FAMILY_FIELD_DESC = new org.apache.thrift.protocol.TField("family", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("qualifier", org.apache.thrift.protocol.TType.STRING, (short)4);
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)5);
private static final org.apache.thrift.protocol.TField TPUT_FIELD_DESC = new org.apache.thrift.protocol.TField("tput", org.apache.thrift.protocol.TType.STRUCT, (short)6);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new checkAndPut_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new checkAndPut_argsTupleSchemeFactory());
}
/**
* to check in and put to
*/
public ByteBuffer table; // required
/**
* row to check
*/
public ByteBuffer row; // required
/**
* column family to check
*/
public ByteBuffer family; // required
/**
* column qualifier to check
*/
public ByteBuffer qualifier; // required
/**
* the expected value, if not provided the
* check is for the non-existence of the
* column in question
*/
public ByteBuffer value; // required
/**
* the TPut to put if the check succeeds
*/
public TPut tput; // 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 {
/**
* to check in and put to
*/
TABLE((short)1, "table"),
/**
* row to check
*/
ROW((short)2, "row"),
/**
* column family to check
*/
FAMILY((short)3, "family"),
/**
* column qualifier to check
*/
QUALIFIER((short)4, "qualifier"),
/**
* the expected value, if not provided the
* check is for the non-existence of the
* column in question
*/
VALUE((short)5, "value"),
/**
* the TPut to put if the check succeeds
*/
TPUT((short)6, "tput");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
return TABLE;
case 2: // ROW
return ROW;
case 3: // FAMILY
return FAMILY;
case 4: // QUALIFIER
return QUALIFIER;
case 5: // VALUE
return VALUE;
case 6: // TPUT
return TPUT;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.FAMILY, new org.apache.thrift.meta_data.FieldMetaData("family", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("qualifier", org.apache.thrift.TFieldRequirementType.REQUIRED,
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.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.TPUT, new org.apache.thrift.meta_data.FieldMetaData("tput", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPut.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkAndPut_args.class, metaDataMap);
}
public checkAndPut_args() {
}
public checkAndPut_args(
ByteBuffer table,
ByteBuffer row,
ByteBuffer family,
ByteBuffer qualifier,
ByteBuffer value,
TPut tput)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
this.family = org.apache.thrift.TBaseHelper.copyBinary(family);
this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier);
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
this.tput = tput;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public checkAndPut_args(checkAndPut_args other) {
if (other.isSetTable()) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
if (other.isSetRow()) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
}
if (other.isSetFamily()) {
this.family = org.apache.thrift.TBaseHelper.copyBinary(other.family);
}
if (other.isSetQualifier()) {
this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(other.qualifier);
}
if (other.isSetValue()) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value);
}
if (other.isSetTput()) {
this.tput = new TPut(other.tput);
}
}
public checkAndPut_args deepCopy() {
return new checkAndPut_args(this);
}
@Override
public void clear() {
this.table = null;
this.row = null;
this.family = null;
this.qualifier = null;
this.value = null;
this.tput = null;
}
/**
* to check in and put to
*/
public byte[] getTable() {
setTable(org.apache.thrift.TBaseHelper.rightSize(table));
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
/**
* to check in and put to
*/
public checkAndPut_args setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
return this;
}
public checkAndPut_args setTable(ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
/**
* row to check
*/
public byte[] getRow() {
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
return org.apache.thrift.TBaseHelper.copyBinary(row);
}
/**
* row to check
*/
public checkAndPut_args setRow(byte[] row) {
this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
return this;
}
public checkAndPut_args setRow(ByteBuffer row) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
public void unsetRow() {
this.row = null;
}
/** Returns true if field row is set (has been assigned a value) and false otherwise */
public boolean isSetRow() {
return this.row != null;
}
public void setRowIsSet(boolean value) {
if (!value) {
this.row = null;
}
}
/**
* column family to check
*/
public byte[] getFamily() {
setFamily(org.apache.thrift.TBaseHelper.rightSize(family));
return family == null ? null : family.array();
}
public ByteBuffer bufferForFamily() {
return org.apache.thrift.TBaseHelper.copyBinary(family);
}
/**
* column family to check
*/
public checkAndPut_args setFamily(byte[] family) {
this.family = family == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(family, family.length));
return this;
}
public checkAndPut_args setFamily(ByteBuffer family) {
this.family = org.apache.thrift.TBaseHelper.copyBinary(family);
return this;
}
public void unsetFamily() {
this.family = null;
}
/** Returns true if field family is set (has been assigned a value) and false otherwise */
public boolean isSetFamily() {
return this.family != null;
}
public void setFamilyIsSet(boolean value) {
if (!value) {
this.family = null;
}
}
/**
* column qualifier to check
*/
public byte[] getQualifier() {
setQualifier(org.apache.thrift.TBaseHelper.rightSize(qualifier));
return qualifier == null ? null : qualifier.array();
}
public ByteBuffer bufferForQualifier() {
return org.apache.thrift.TBaseHelper.copyBinary(qualifier);
}
/**
* column qualifier to check
*/
public checkAndPut_args setQualifier(byte[] qualifier) {
this.qualifier = qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(qualifier, qualifier.length));
return this;
}
public checkAndPut_args setQualifier(ByteBuffer qualifier) {
this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier);
return this;
}
public void unsetQualifier() {
this.qualifier = null;
}
/** Returns true if field qualifier is set (has been assigned a value) and false otherwise */
public boolean isSetQualifier() {
return this.qualifier != null;
}
public void setQualifierIsSet(boolean value) {
if (!value) {
this.qualifier = null;
}
}
/**
* the expected value, if not provided the
* check is for the non-existence of the
* column in question
*/
public byte[] getValue() {
setValue(org.apache.thrift.TBaseHelper.rightSize(value));
return value == null ? null : value.array();
}
public ByteBuffer bufferForValue() {
return org.apache.thrift.TBaseHelper.copyBinary(value);
}
/**
* the expected value, if not provided the
* check is for the non-existence of the
* column in question
*/
public checkAndPut_args setValue(byte[] value) {
this.value = value == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(value, value.length));
return this;
}
public checkAndPut_args setValue(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;
}
}
/**
* the TPut to put if the check succeeds
*/
public TPut getTput() {
return this.tput;
}
/**
* the TPut to put if the check succeeds
*/
public checkAndPut_args setTput(TPut tput) {
this.tput = tput;
return this;
}
public void unsetTput() {
this.tput = null;
}
/** Returns true if field tput is set (has been assigned a value) and false otherwise */
public boolean isSetTput() {
return this.tput != null;
}
public void setTputIsSet(boolean value) {
if (!value) {
this.tput = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
}
break;
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
}
break;
case FAMILY:
if (value == null) {
unsetFamily();
} else {
setFamily((ByteBuffer)value);
}
break;
case QUALIFIER:
if (value == null) {
unsetQualifier();
} else {
setQualifier((ByteBuffer)value);
}
break;
case VALUE:
if (value == null) {
unsetValue();
} else {
setValue((ByteBuffer)value);
}
break;
case TPUT:
if (value == null) {
unsetTput();
} else {
setTput((TPut)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
case ROW:
return getRow();
case FAMILY:
return getFamily();
case QUALIFIER:
return getQualifier();
case VALUE:
return getValue();
case TPUT:
return getTput();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
case ROW:
return isSetRow();
case FAMILY:
return isSetFamily();
case QUALIFIER:
return isSetQualifier();
case VALUE:
return isSetValue();
case TPUT:
return isSetTput();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof checkAndPut_args)
return this.equals((checkAndPut_args)that);
return false;
}
public boolean equals(checkAndPut_args that) {
if (that == null)
return false;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_row = true && this.isSetRow();
boolean that_present_row = true && that.isSetRow();
if (this_present_row || that_present_row) {
if (!(this_present_row && that_present_row))
return false;
if (!this.row.equals(that.row))
return false;
}
boolean this_present_family = true && this.isSetFamily();
boolean that_present_family = true && that.isSetFamily();
if (this_present_family || that_present_family) {
if (!(this_present_family && that_present_family))
return false;
if (!this.family.equals(that.family))
return false;
}
boolean this_present_qualifier = true && this.isSetQualifier();
boolean that_present_qualifier = true && that.isSetQualifier();
if (this_present_qualifier || that_present_qualifier) {
if (!(this_present_qualifier && that_present_qualifier))
return false;
if (!this.qualifier.equals(that.qualifier))
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;
}
boolean this_present_tput = true && this.isSetTput();
boolean that_present_tput = true && that.isSetTput();
if (this_present_tput || that_present_tput) {
if (!(this_present_tput && that_present_tput))
return false;
if (!this.tput.equals(that.tput))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
boolean present_row = true && (isSetRow());
list.add(present_row);
if (present_row)
list.add(row);
boolean present_family = true && (isSetFamily());
list.add(present_family);
if (present_family)
list.add(family);
boolean present_qualifier = true && (isSetQualifier());
list.add(present_qualifier);
if (present_qualifier)
list.add(qualifier);
boolean present_value = true && (isSetValue());
list.add(present_value);
if (present_value)
list.add(value);
boolean present_tput = true && (isSetTput());
list.add(present_tput);
if (present_tput)
list.add(tput);
return list.hashCode();
}
@Override
public int compareTo(checkAndPut_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, other.row);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetFamily()).compareTo(other.isSetFamily());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFamily()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.family, other.family);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQualifier()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifier, other.qualifier);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetValue()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTput()).compareTo(other.isSetTput());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTput()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tput, other.tput);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("checkAndPut_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.table, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("row:");
if (this.row == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.row, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("family:");
if (this.family == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.family, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("qualifier:");
if (this.qualifier == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.qualifier, 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;
if (!first) sb.append(", ");
sb.append("tput:");
if (this.tput == null) {
sb.append("null");
} else {
sb.append(this.tput);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (row == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'row' was not present! Struct: " + toString());
}
if (family == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'family' was not present! Struct: " + toString());
}
if (qualifier == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'qualifier' was not present! Struct: " + toString());
}
if (tput == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tput' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (tput != null) {
tput.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class checkAndPut_argsStandardSchemeFactory implements SchemeFactory {
public checkAndPut_argsStandardScheme getScheme() {
return new checkAndPut_argsStandardScheme();
}
}
private static class checkAndPut_argsStandardScheme extends StandardScheme<checkAndPut_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, checkAndPut_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: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // ROW
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // FAMILY
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.family = iprot.readBinary();
struct.setFamilyIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // QUALIFIER
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.qualifier = iprot.readBinary();
struct.setQualifierIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // 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;
case 6: // TPUT
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.tput = new TPut();
struct.tput.read(iprot);
struct.setTputIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, checkAndPut_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeBinary(struct.table);
oprot.writeFieldEnd();
}
if (struct.row != null) {
oprot.writeFieldBegin(ROW_FIELD_DESC);
oprot.writeBinary(struct.row);
oprot.writeFieldEnd();
}
if (struct.family != null) {
oprot.writeFieldBegin(FAMILY_FIELD_DESC);
oprot.writeBinary(struct.family);
oprot.writeFieldEnd();
}
if (struct.qualifier != null) {
oprot.writeFieldBegin(QUALIFIER_FIELD_DESC);
oprot.writeBinary(struct.qualifier);
oprot.writeFieldEnd();
}
if (struct.value != null) {
oprot.writeFieldBegin(VALUE_FIELD_DESC);
oprot.writeBinary(struct.value);
oprot.writeFieldEnd();
}
if (struct.tput != null) {
oprot.writeFieldBegin(TPUT_FIELD_DESC);
struct.tput.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class checkAndPut_argsTupleSchemeFactory implements SchemeFactory {
public checkAndPut_argsTupleScheme getScheme() {
return new checkAndPut_argsTupleScheme();
}
}
private static class checkAndPut_argsTupleScheme extends TupleScheme<checkAndPut_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, checkAndPut_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
oprot.writeBinary(struct.row);
oprot.writeBinary(struct.family);
oprot.writeBinary(struct.qualifier);
struct.tput.write(oprot);
BitSet optionals = new BitSet();
if (struct.isSetValue()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetValue()) {
oprot.writeBinary(struct.value);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, checkAndPut_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
struct.family = iprot.readBinary();
struct.setFamilyIsSet(true);
struct.qualifier = iprot.readBinary();
struct.setQualifierIsSet(true);
struct.tput = new TPut();
struct.tput.read(iprot);
struct.setTputIsSet(true);
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.value = iprot.readBinary();
struct.setValueIsSet(true);
}
}
}
}
public static class checkAndPut_result implements org.apache.thrift.TBase<checkAndPut_result, checkAndPut_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkAndPut_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkAndPut_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.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new checkAndPut_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new checkAndPut_resultTupleSchemeFactory());
}
public boolean success; // required
public TIOError io; // 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"),
IO((short)1, "io");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IO
return IO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkAndPut_result.class, metaDataMap);
}
public checkAndPut_result() {
}
public checkAndPut_result(
boolean success,
TIOError io)
{
this();
this.success = success;
setSuccessIsSet(true);
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public checkAndPut_result(checkAndPut_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
}
public checkAndPut_result deepCopy() {
return new checkAndPut_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.io = null;
}
public boolean isSuccess() {
return this.success;
}
public checkAndPut_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public TIOError getIo() {
return this.io;
}
public checkAndPut_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case IO:
return getIo();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IO:
return isSetIo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof checkAndPut_result)
return this.equals((checkAndPut_result)that);
return false;
}
public boolean equals(checkAndPut_result that) {
if (that == null)
return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true;
list.add(present_success);
if (present_success)
list.add(success);
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
return list.hashCode();
}
@Override
public int compareTo(checkAndPut_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("checkAndPut_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class checkAndPut_resultStandardSchemeFactory implements SchemeFactory {
public checkAndPut_resultStandardScheme getScheme() {
return new checkAndPut_resultStandardScheme();
}
}
private static class checkAndPut_resultStandardScheme extends StandardScheme<checkAndPut_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, checkAndPut_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;
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, checkAndPut_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();
}
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class checkAndPut_resultTupleSchemeFactory implements SchemeFactory {
public checkAndPut_resultTupleScheme getScheme() {
return new checkAndPut_resultTupleScheme();
}
}
private static class checkAndPut_resultTupleScheme extends TupleScheme<checkAndPut_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, checkAndPut_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIo()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, checkAndPut_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class putMultiple_args implements org.apache.thrift.TBase<putMultiple_args, putMultiple_args._Fields>, java.io.Serializable, Cloneable, Comparable<putMultiple_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putMultiple_args");
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("tputs", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new putMultiple_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new putMultiple_argsTupleSchemeFactory());
}
/**
* the table to put data in
*/
public ByteBuffer table; // required
/**
* a list of TPuts to commit
*/
public List<TPut> tputs; // 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 {
/**
* the table to put data in
*/
TABLE((short)1, "table"),
/**
* a list of TPuts to commit
*/
TPUTS((short)2, "tputs");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
return TABLE;
case 2: // TPUTS
return TPUTS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.TPUTS, new org.apache.thrift.meta_data.FieldMetaData("tputs", org.apache.thrift.TFieldRequirementType.REQUIRED,
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, TPut.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putMultiple_args.class, metaDataMap);
}
public putMultiple_args() {
}
public putMultiple_args(
ByteBuffer table,
List<TPut> tputs)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
this.tputs = tputs;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public putMultiple_args(putMultiple_args other) {
if (other.isSetTable()) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
if (other.isSetTputs()) {
List<TPut> __this__tputs = new ArrayList<TPut>(other.tputs.size());
for (TPut other_element : other.tputs) {
__this__tputs.add(new TPut(other_element));
}
this.tputs = __this__tputs;
}
}
public putMultiple_args deepCopy() {
return new putMultiple_args(this);
}
@Override
public void clear() {
this.table = null;
this.tputs = null;
}
/**
* the table to put data in
*/
public byte[] getTable() {
setTable(org.apache.thrift.TBaseHelper.rightSize(table));
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
/**
* the table to put data in
*/
public putMultiple_args setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
return this;
}
public putMultiple_args setTable(ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
public int getTputsSize() {
return (this.tputs == null) ? 0 : this.tputs.size();
}
public java.util.Iterator<TPut> getTputsIterator() {
return (this.tputs == null) ? null : this.tputs.iterator();
}
public void addToTputs(TPut elem) {
if (this.tputs == null) {
this.tputs = new ArrayList<TPut>();
}
this.tputs.add(elem);
}
/**
* a list of TPuts to commit
*/
public List<TPut> getTputs() {
return this.tputs;
}
/**
* a list of TPuts to commit
*/
public putMultiple_args setTputs(List<TPut> tputs) {
this.tputs = tputs;
return this;
}
public void unsetTputs() {
this.tputs = null;
}
/** Returns true if field tputs is set (has been assigned a value) and false otherwise */
public boolean isSetTputs() {
return this.tputs != null;
}
public void setTputsIsSet(boolean value) {
if (!value) {
this.tputs = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
}
break;
case TPUTS:
if (value == null) {
unsetTputs();
} else {
setTputs((List<TPut>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
case TPUTS:
return getTputs();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
case TPUTS:
return isSetTputs();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof putMultiple_args)
return this.equals((putMultiple_args)that);
return false;
}
public boolean equals(putMultiple_args that) {
if (that == null)
return false;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_tputs = true && this.isSetTputs();
boolean that_present_tputs = true && that.isSetTputs();
if (this_present_tputs || that_present_tputs) {
if (!(this_present_tputs && that_present_tputs))
return false;
if (!this.tputs.equals(that.tputs))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
boolean present_tputs = true && (isSetTputs());
list.add(present_tputs);
if (present_tputs)
list.add(tputs);
return list.hashCode();
}
@Override
public int compareTo(putMultiple_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTputs()).compareTo(other.isSetTputs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTputs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tputs, other.tputs);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("putMultiple_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.table, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("tputs:");
if (this.tputs == null) {
sb.append("null");
} else {
sb.append(this.tputs);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (tputs == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tputs' 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, 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 putMultiple_argsStandardSchemeFactory implements SchemeFactory {
public putMultiple_argsStandardScheme getScheme() {
return new putMultiple_argsStandardScheme();
}
}
private static class putMultiple_argsStandardScheme extends StandardScheme<putMultiple_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, putMultiple_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: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TPUTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list148 = iprot.readListBegin();
struct.tputs = new ArrayList<TPut>(_list148.size);
TPut _elem149;
for (int _i150 = 0; _i150 < _list148.size; ++_i150)
{
_elem149 = new TPut();
_elem149.read(iprot);
struct.tputs.add(_elem149);
}
iprot.readListEnd();
}
struct.setTputsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, putMultiple_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeBinary(struct.table);
oprot.writeFieldEnd();
}
if (struct.tputs != null) {
oprot.writeFieldBegin(TPUTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tputs.size()));
for (TPut _iter151 : struct.tputs)
{
_iter151.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class putMultiple_argsTupleSchemeFactory implements SchemeFactory {
public putMultiple_argsTupleScheme getScheme() {
return new putMultiple_argsTupleScheme();
}
}
private static class putMultiple_argsTupleScheme extends TupleScheme<putMultiple_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, putMultiple_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
{
oprot.writeI32(struct.tputs.size());
for (TPut _iter152 : struct.tputs)
{
_iter152.write(oprot);
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, putMultiple_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
{
org.apache.thrift.protocol.TList _list153 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.tputs = new ArrayList<TPut>(_list153.size);
TPut _elem154;
for (int _i155 = 0; _i155 < _list153.size; ++_i155)
{
_elem154 = new TPut();
_elem154.read(iprot);
struct.tputs.add(_elem154);
}
}
struct.setTputsIsSet(true);
}
}
}
public static class putMultiple_result implements org.apache.thrift.TBase<putMultiple_result, putMultiple_result._Fields>, java.io.Serializable, Cloneable, Comparable<putMultiple_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putMultiple_result");
private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new putMultiple_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new putMultiple_resultTupleSchemeFactory());
}
public TIOError io; // 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 {
IO((short)1, "io");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // IO
return IO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putMultiple_result.class, metaDataMap);
}
public putMultiple_result() {
}
public putMultiple_result(
TIOError io)
{
this();
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public putMultiple_result(putMultiple_result other) {
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
}
public putMultiple_result deepCopy() {
return new putMultiple_result(this);
}
@Override
public void clear() {
this.io = null;
}
public TIOError getIo() {
return this.io;
}
public putMultiple_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case IO:
return getIo();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case IO:
return isSetIo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof putMultiple_result)
return this.equals((putMultiple_result)that);
return false;
}
public boolean equals(putMultiple_result that) {
if (that == null)
return false;
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
return list.hashCode();
}
@Override
public int compareTo(putMultiple_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("putMultiple_result(");
boolean first = true;
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class putMultiple_resultStandardSchemeFactory implements SchemeFactory {
public putMultiple_resultStandardScheme getScheme() {
return new putMultiple_resultStandardScheme();
}
}
private static class putMultiple_resultStandardScheme extends StandardScheme<putMultiple_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, putMultiple_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, putMultiple_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class putMultiple_resultTupleSchemeFactory implements SchemeFactory {
public putMultiple_resultTupleScheme getScheme() {
return new putMultiple_resultTupleScheme();
}
}
private static class putMultiple_resultTupleScheme extends TupleScheme<putMultiple_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, putMultiple_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetIo()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, putMultiple_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class deleteSingle_args implements org.apache.thrift.TBase<deleteSingle_args, deleteSingle_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteSingle_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteSingle_args");
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TDELETE_FIELD_DESC = new org.apache.thrift.protocol.TField("tdelete", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteSingle_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteSingle_argsTupleSchemeFactory());
}
/**
* the table to delete from
*/
public ByteBuffer table; // required
/**
* the TDelete to delete
*/
public TDelete tdelete; // 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 {
/**
* the table to delete from
*/
TABLE((short)1, "table"),
/**
* the TDelete to delete
*/
TDELETE((short)2, "tdelete");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
return TABLE;
case 2: // TDELETE
return TDELETE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.TDELETE, new org.apache.thrift.meta_data.FieldMetaData("tdelete", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDelete.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteSingle_args.class, metaDataMap);
}
public deleteSingle_args() {
}
public deleteSingle_args(
ByteBuffer table,
TDelete tdelete)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
this.tdelete = tdelete;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteSingle_args(deleteSingle_args other) {
if (other.isSetTable()) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
if (other.isSetTdelete()) {
this.tdelete = new TDelete(other.tdelete);
}
}
public deleteSingle_args deepCopy() {
return new deleteSingle_args(this);
}
@Override
public void clear() {
this.table = null;
this.tdelete = null;
}
/**
* the table to delete from
*/
public byte[] getTable() {
setTable(org.apache.thrift.TBaseHelper.rightSize(table));
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
/**
* the table to delete from
*/
public deleteSingle_args setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
return this;
}
public deleteSingle_args setTable(ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
/**
* the TDelete to delete
*/
public TDelete getTdelete() {
return this.tdelete;
}
/**
* the TDelete to delete
*/
public deleteSingle_args setTdelete(TDelete tdelete) {
this.tdelete = tdelete;
return this;
}
public void unsetTdelete() {
this.tdelete = null;
}
/** Returns true if field tdelete is set (has been assigned a value) and false otherwise */
public boolean isSetTdelete() {
return this.tdelete != null;
}
public void setTdeleteIsSet(boolean value) {
if (!value) {
this.tdelete = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
}
break;
case TDELETE:
if (value == null) {
unsetTdelete();
} else {
setTdelete((TDelete)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
case TDELETE:
return getTdelete();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
case TDELETE:
return isSetTdelete();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteSingle_args)
return this.equals((deleteSingle_args)that);
return false;
}
public boolean equals(deleteSingle_args that) {
if (that == null)
return false;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_tdelete = true && this.isSetTdelete();
boolean that_present_tdelete = true && that.isSetTdelete();
if (this_present_tdelete || that_present_tdelete) {
if (!(this_present_tdelete && that_present_tdelete))
return false;
if (!this.tdelete.equals(that.tdelete))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
boolean present_tdelete = true && (isSetTdelete());
list.add(present_tdelete);
if (present_tdelete)
list.add(tdelete);
return list.hashCode();
}
@Override
public int compareTo(deleteSingle_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTdelete()).compareTo(other.isSetTdelete());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTdelete()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tdelete, other.tdelete);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("deleteSingle_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.table, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("tdelete:");
if (this.tdelete == null) {
sb.append("null");
} else {
sb.append(this.tdelete);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (tdelete == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tdelete' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (tdelete != null) {
tdelete.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class deleteSingle_argsStandardSchemeFactory implements SchemeFactory {
public deleteSingle_argsStandardScheme getScheme() {
return new deleteSingle_argsStandardScheme();
}
}
private static class deleteSingle_argsStandardScheme extends StandardScheme<deleteSingle_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteSingle_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: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TDELETE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.tdelete = new TDelete();
struct.tdelete.read(iprot);
struct.setTdeleteIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, deleteSingle_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeBinary(struct.table);
oprot.writeFieldEnd();
}
if (struct.tdelete != null) {
oprot.writeFieldBegin(TDELETE_FIELD_DESC);
struct.tdelete.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteSingle_argsTupleSchemeFactory implements SchemeFactory {
public deleteSingle_argsTupleScheme getScheme() {
return new deleteSingle_argsTupleScheme();
}
}
private static class deleteSingle_argsTupleScheme extends TupleScheme<deleteSingle_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteSingle_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
struct.tdelete.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteSingle_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
struct.tdelete = new TDelete();
struct.tdelete.read(iprot);
struct.setTdeleteIsSet(true);
}
}
}
public static class deleteSingle_result implements org.apache.thrift.TBase<deleteSingle_result, deleteSingle_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteSingle_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteSingle_result");
private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteSingle_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteSingle_resultTupleSchemeFactory());
}
public TIOError io; // 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 {
IO((short)1, "io");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // IO
return IO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteSingle_result.class, metaDataMap);
}
public deleteSingle_result() {
}
public deleteSingle_result(
TIOError io)
{
this();
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteSingle_result(deleteSingle_result other) {
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
}
public deleteSingle_result deepCopy() {
return new deleteSingle_result(this);
}
@Override
public void clear() {
this.io = null;
}
public TIOError getIo() {
return this.io;
}
public deleteSingle_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case IO:
return getIo();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case IO:
return isSetIo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteSingle_result)
return this.equals((deleteSingle_result)that);
return false;
}
public boolean equals(deleteSingle_result that) {
if (that == null)
return false;
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
return list.hashCode();
}
@Override
public int compareTo(deleteSingle_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("deleteSingle_result(");
boolean first = true;
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class deleteSingle_resultStandardSchemeFactory implements SchemeFactory {
public deleteSingle_resultStandardScheme getScheme() {
return new deleteSingle_resultStandardScheme();
}
}
private static class deleteSingle_resultStandardScheme extends StandardScheme<deleteSingle_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteSingle_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, deleteSingle_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteSingle_resultTupleSchemeFactory implements SchemeFactory {
public deleteSingle_resultTupleScheme getScheme() {
return new deleteSingle_resultTupleScheme();
}
}
private static class deleteSingle_resultTupleScheme extends TupleScheme<deleteSingle_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteSingle_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetIo()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteSingle_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class deleteMultiple_args implements org.apache.thrift.TBase<deleteMultiple_args, deleteMultiple_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteMultiple_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteMultiple_args");
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TDELETES_FIELD_DESC = new org.apache.thrift.protocol.TField("tdeletes", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteMultiple_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteMultiple_argsTupleSchemeFactory());
}
/**
* the table to delete from
*/
public ByteBuffer table; // required
/**
* list of TDeletes to delete
*/
public List<TDelete> tdeletes; // 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 {
/**
* the table to delete from
*/
TABLE((short)1, "table"),
/**
* list of TDeletes to delete
*/
TDELETES((short)2, "tdeletes");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
return TABLE;
case 2: // TDELETES
return TDELETES;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.TDELETES, new org.apache.thrift.meta_data.FieldMetaData("tdeletes", org.apache.thrift.TFieldRequirementType.REQUIRED,
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, TDelete.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteMultiple_args.class, metaDataMap);
}
public deleteMultiple_args() {
}
public deleteMultiple_args(
ByteBuffer table,
List<TDelete> tdeletes)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
this.tdeletes = tdeletes;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteMultiple_args(deleteMultiple_args other) {
if (other.isSetTable()) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
if (other.isSetTdeletes()) {
List<TDelete> __this__tdeletes = new ArrayList<TDelete>(other.tdeletes.size());
for (TDelete other_element : other.tdeletes) {
__this__tdeletes.add(new TDelete(other_element));
}
this.tdeletes = __this__tdeletes;
}
}
public deleteMultiple_args deepCopy() {
return new deleteMultiple_args(this);
}
@Override
public void clear() {
this.table = null;
this.tdeletes = null;
}
/**
* the table to delete from
*/
public byte[] getTable() {
setTable(org.apache.thrift.TBaseHelper.rightSize(table));
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
/**
* the table to delete from
*/
public deleteMultiple_args setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
return this;
}
public deleteMultiple_args setTable(ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
public int getTdeletesSize() {
return (this.tdeletes == null) ? 0 : this.tdeletes.size();
}
public java.util.Iterator<TDelete> getTdeletesIterator() {
return (this.tdeletes == null) ? null : this.tdeletes.iterator();
}
public void addToTdeletes(TDelete elem) {
if (this.tdeletes == null) {
this.tdeletes = new ArrayList<TDelete>();
}
this.tdeletes.add(elem);
}
/**
* list of TDeletes to delete
*/
public List<TDelete> getTdeletes() {
return this.tdeletes;
}
/**
* list of TDeletes to delete
*/
public deleteMultiple_args setTdeletes(List<TDelete> tdeletes) {
this.tdeletes = tdeletes;
return this;
}
public void unsetTdeletes() {
this.tdeletes = null;
}
/** Returns true if field tdeletes is set (has been assigned a value) and false otherwise */
public boolean isSetTdeletes() {
return this.tdeletes != null;
}
public void setTdeletesIsSet(boolean value) {
if (!value) {
this.tdeletes = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
}
break;
case TDELETES:
if (value == null) {
unsetTdeletes();
} else {
setTdeletes((List<TDelete>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
case TDELETES:
return getTdeletes();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
case TDELETES:
return isSetTdeletes();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteMultiple_args)
return this.equals((deleteMultiple_args)that);
return false;
}
public boolean equals(deleteMultiple_args that) {
if (that == null)
return false;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_tdeletes = true && this.isSetTdeletes();
boolean that_present_tdeletes = true && that.isSetTdeletes();
if (this_present_tdeletes || that_present_tdeletes) {
if (!(this_present_tdeletes && that_present_tdeletes))
return false;
if (!this.tdeletes.equals(that.tdeletes))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
boolean present_tdeletes = true && (isSetTdeletes());
list.add(present_tdeletes);
if (present_tdeletes)
list.add(tdeletes);
return list.hashCode();
}
@Override
public int compareTo(deleteMultiple_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTdeletes()).compareTo(other.isSetTdeletes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTdeletes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tdeletes, other.tdeletes);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("deleteMultiple_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.table, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("tdeletes:");
if (this.tdeletes == null) {
sb.append("null");
} else {
sb.append(this.tdeletes);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (tdeletes == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tdeletes' 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, 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 deleteMultiple_argsStandardSchemeFactory implements SchemeFactory {
public deleteMultiple_argsStandardScheme getScheme() {
return new deleteMultiple_argsStandardScheme();
}
}
private static class deleteMultiple_argsStandardScheme extends StandardScheme<deleteMultiple_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteMultiple_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: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TDELETES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list156 = iprot.readListBegin();
struct.tdeletes = new ArrayList<TDelete>(_list156.size);
TDelete _elem157;
for (int _i158 = 0; _i158 < _list156.size; ++_i158)
{
_elem157 = new TDelete();
_elem157.read(iprot);
struct.tdeletes.add(_elem157);
}
iprot.readListEnd();
}
struct.setTdeletesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, deleteMultiple_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeBinary(struct.table);
oprot.writeFieldEnd();
}
if (struct.tdeletes != null) {
oprot.writeFieldBegin(TDELETES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tdeletes.size()));
for (TDelete _iter159 : struct.tdeletes)
{
_iter159.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteMultiple_argsTupleSchemeFactory implements SchemeFactory {
public deleteMultiple_argsTupleScheme getScheme() {
return new deleteMultiple_argsTupleScheme();
}
}
private static class deleteMultiple_argsTupleScheme extends TupleScheme<deleteMultiple_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteMultiple_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
{
oprot.writeI32(struct.tdeletes.size());
for (TDelete _iter160 : struct.tdeletes)
{
_iter160.write(oprot);
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteMultiple_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
{
org.apache.thrift.protocol.TList _list161 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.tdeletes = new ArrayList<TDelete>(_list161.size);
TDelete _elem162;
for (int _i163 = 0; _i163 < _list161.size; ++_i163)
{
_elem162 = new TDelete();
_elem162.read(iprot);
struct.tdeletes.add(_elem162);
}
}
struct.setTdeletesIsSet(true);
}
}
}
public static class deleteMultiple_result implements org.apache.thrift.TBase<deleteMultiple_result, deleteMultiple_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteMultiple_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteMultiple_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.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteMultiple_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteMultiple_resultTupleSchemeFactory());
}
public List<TDelete> success; // required
public TIOError io; // 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"),
IO((short)1, "io");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IO
return IO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDelete.class))));
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteMultiple_result.class, metaDataMap);
}
public deleteMultiple_result() {
}
public deleteMultiple_result(
List<TDelete> success,
TIOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteMultiple_result(deleteMultiple_result other) {
if (other.isSetSuccess()) {
List<TDelete> __this__success = new ArrayList<TDelete>(other.success.size());
for (TDelete other_element : other.success) {
__this__success.add(new TDelete(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
}
public deleteMultiple_result deepCopy() {
return new deleteMultiple_result(this);
}
@Override
public void clear() {
this.success = null;
this.io = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<TDelete> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TDelete elem) {
if (this.success == null) {
this.success = new ArrayList<TDelete>();
}
this.success.add(elem);
}
public List<TDelete> getSuccess() {
return this.success;
}
public deleteMultiple_result setSuccess(List<TDelete> success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public TIOError getIo() {
return this.io;
}
public deleteMultiple_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((List<TDelete>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case IO:
return getIo();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IO:
return isSetIo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteMultiple_result)
return this.equals((deleteMultiple_result)that);
return false;
}
public boolean equals(deleteMultiple_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
return list.hashCode();
}
@Override
public int compareTo(deleteMultiple_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("deleteMultiple_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class deleteMultiple_resultStandardSchemeFactory implements SchemeFactory {
public deleteMultiple_resultStandardScheme getScheme() {
return new deleteMultiple_resultStandardScheme();
}
}
private static class deleteMultiple_resultStandardScheme extends StandardScheme<deleteMultiple_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteMultiple_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 _list164 = iprot.readListBegin();
struct.success = new ArrayList<TDelete>(_list164.size);
TDelete _elem165;
for (int _i166 = 0; _i166 < _list164.size; ++_i166)
{
_elem165 = new TDelete();
_elem165.read(iprot);
struct.success.add(_elem165);
}
iprot.readListEnd();
}
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, deleteMultiple_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 (TDelete _iter167 : struct.success)
{
_iter167.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteMultiple_resultTupleSchemeFactory implements SchemeFactory {
public deleteMultiple_resultTupleScheme getScheme() {
return new deleteMultiple_resultTupleScheme();
}
}
private static class deleteMultiple_resultTupleScheme extends TupleScheme<deleteMultiple_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteMultiple_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIo()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (TDelete _iter168 : struct.success)
{
_iter168.write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteMultiple_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list169 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TDelete>(_list169.size);
TDelete _elem170;
for (int _i171 = 0; _i171 < _list169.size; ++_i171)
{
_elem170 = new TDelete();
_elem170.read(iprot);
struct.success.add(_elem170);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class checkAndDelete_args implements org.apache.thrift.TBase<checkAndDelete_args, checkAndDelete_args._Fields>, java.io.Serializable, Cloneable, Comparable<checkAndDelete_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkAndDelete_args");
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField FAMILY_FIELD_DESC = new org.apache.thrift.protocol.TField("family", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("qualifier", org.apache.thrift.protocol.TType.STRING, (short)4);
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)5);
private static final org.apache.thrift.protocol.TField TDELETE_FIELD_DESC = new org.apache.thrift.protocol.TField("tdelete", org.apache.thrift.protocol.TType.STRUCT, (short)6);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new checkAndDelete_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new checkAndDelete_argsTupleSchemeFactory());
}
/**
* to check in and delete from
*/
public ByteBuffer table; // required
/**
* row to check
*/
public ByteBuffer row; // required
/**
* column family to check
*/
public ByteBuffer family; // required
/**
* column qualifier to check
*/
public ByteBuffer qualifier; // required
/**
* the expected value, if not provided the
* check is for the non-existence of the
* column in question
*/
public ByteBuffer value; // required
/**
* the TDelete to execute if the check succeeds
*/
public TDelete tdelete; // 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 {
/**
* to check in and delete from
*/
TABLE((short)1, "table"),
/**
* row to check
*/
ROW((short)2, "row"),
/**
* column family to check
*/
FAMILY((short)3, "family"),
/**
* column qualifier to check
*/
QUALIFIER((short)4, "qualifier"),
/**
* the expected value, if not provided the
* check is for the non-existence of the
* column in question
*/
VALUE((short)5, "value"),
/**
* the TDelete to execute if the check succeeds
*/
TDELETE((short)6, "tdelete");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
return TABLE;
case 2: // ROW
return ROW;
case 3: // FAMILY
return FAMILY;
case 4: // QUALIFIER
return QUALIFIER;
case 5: // VALUE
return VALUE;
case 6: // TDELETE
return TDELETE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.FAMILY, new org.apache.thrift.meta_data.FieldMetaData("family", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("qualifier", org.apache.thrift.TFieldRequirementType.REQUIRED,
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.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.TDELETE, new org.apache.thrift.meta_data.FieldMetaData("tdelete", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDelete.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkAndDelete_args.class, metaDataMap);
}
public checkAndDelete_args() {
}
public checkAndDelete_args(
ByteBuffer table,
ByteBuffer row,
ByteBuffer family,
ByteBuffer qualifier,
ByteBuffer value,
TDelete tdelete)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
this.family = org.apache.thrift.TBaseHelper.copyBinary(family);
this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier);
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
this.tdelete = tdelete;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public checkAndDelete_args(checkAndDelete_args other) {
if (other.isSetTable()) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
if (other.isSetRow()) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
}
if (other.isSetFamily()) {
this.family = org.apache.thrift.TBaseHelper.copyBinary(other.family);
}
if (other.isSetQualifier()) {
this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(other.qualifier);
}
if (other.isSetValue()) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value);
}
if (other.isSetTdelete()) {
this.tdelete = new TDelete(other.tdelete);
}
}
public checkAndDelete_args deepCopy() {
return new checkAndDelete_args(this);
}
@Override
public void clear() {
this.table = null;
this.row = null;
this.family = null;
this.qualifier = null;
this.value = null;
this.tdelete = null;
}
/**
* to check in and delete from
*/
public byte[] getTable() {
setTable(org.apache.thrift.TBaseHelper.rightSize(table));
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
/**
* to check in and delete from
*/
public checkAndDelete_args setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
return this;
}
public checkAndDelete_args setTable(ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
/**
* row to check
*/
public byte[] getRow() {
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
return org.apache.thrift.TBaseHelper.copyBinary(row);
}
/**
* row to check
*/
public checkAndDelete_args setRow(byte[] row) {
this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
return this;
}
public checkAndDelete_args setRow(ByteBuffer row) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
public void unsetRow() {
this.row = null;
}
/** Returns true if field row is set (has been assigned a value) and false otherwise */
public boolean isSetRow() {
return this.row != null;
}
public void setRowIsSet(boolean value) {
if (!value) {
this.row = null;
}
}
/**
* column family to check
*/
public byte[] getFamily() {
setFamily(org.apache.thrift.TBaseHelper.rightSize(family));
return family == null ? null : family.array();
}
public ByteBuffer bufferForFamily() {
return org.apache.thrift.TBaseHelper.copyBinary(family);
}
/**
* column family to check
*/
public checkAndDelete_args setFamily(byte[] family) {
this.family = family == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(family, family.length));
return this;
}
public checkAndDelete_args setFamily(ByteBuffer family) {
this.family = org.apache.thrift.TBaseHelper.copyBinary(family);
return this;
}
public void unsetFamily() {
this.family = null;
}
/** Returns true if field family is set (has been assigned a value) and false otherwise */
public boolean isSetFamily() {
return this.family != null;
}
public void setFamilyIsSet(boolean value) {
if (!value) {
this.family = null;
}
}
/**
* column qualifier to check
*/
public byte[] getQualifier() {
setQualifier(org.apache.thrift.TBaseHelper.rightSize(qualifier));
return qualifier == null ? null : qualifier.array();
}
public ByteBuffer bufferForQualifier() {
return org.apache.thrift.TBaseHelper.copyBinary(qualifier);
}
/**
* column qualifier to check
*/
public checkAndDelete_args setQualifier(byte[] qualifier) {
this.qualifier = qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(qualifier, qualifier.length));
return this;
}
public checkAndDelete_args setQualifier(ByteBuffer qualifier) {
this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier);
return this;
}
public void unsetQualifier() {
this.qualifier = null;
}
/** Returns true if field qualifier is set (has been assigned a value) and false otherwise */
public boolean isSetQualifier() {
return this.qualifier != null;
}
public void setQualifierIsSet(boolean value) {
if (!value) {
this.qualifier = null;
}
}
/**
* the expected value, if not provided the
* check is for the non-existence of the
* column in question
*/
public byte[] getValue() {
setValue(org.apache.thrift.TBaseHelper.rightSize(value));
return value == null ? null : value.array();
}
public ByteBuffer bufferForValue() {
return org.apache.thrift.TBaseHelper.copyBinary(value);
}
/**
* the expected value, if not provided the
* check is for the non-existence of the
* column in question
*/
public checkAndDelete_args setValue(byte[] value) {
this.value = value == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(value, value.length));
return this;
}
public checkAndDelete_args setValue(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;
}
}
/**
* the TDelete to execute if the check succeeds
*/
public TDelete getTdelete() {
return this.tdelete;
}
/**
* the TDelete to execute if the check succeeds
*/
public checkAndDelete_args setTdelete(TDelete tdelete) {
this.tdelete = tdelete;
return this;
}
public void unsetTdelete() {
this.tdelete = null;
}
/** Returns true if field tdelete is set (has been assigned a value) and false otherwise */
public boolean isSetTdelete() {
return this.tdelete != null;
}
public void setTdeleteIsSet(boolean value) {
if (!value) {
this.tdelete = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
}
break;
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
}
break;
case FAMILY:
if (value == null) {
unsetFamily();
} else {
setFamily((ByteBuffer)value);
}
break;
case QUALIFIER:
if (value == null) {
unsetQualifier();
} else {
setQualifier((ByteBuffer)value);
}
break;
case VALUE:
if (value == null) {
unsetValue();
} else {
setValue((ByteBuffer)value);
}
break;
case TDELETE:
if (value == null) {
unsetTdelete();
} else {
setTdelete((TDelete)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
case ROW:
return getRow();
case FAMILY:
return getFamily();
case QUALIFIER:
return getQualifier();
case VALUE:
return getValue();
case TDELETE:
return getTdelete();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
case ROW:
return isSetRow();
case FAMILY:
return isSetFamily();
case QUALIFIER:
return isSetQualifier();
case VALUE:
return isSetValue();
case TDELETE:
return isSetTdelete();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof checkAndDelete_args)
return this.equals((checkAndDelete_args)that);
return false;
}
public boolean equals(checkAndDelete_args that) {
if (that == null)
return false;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_row = true && this.isSetRow();
boolean that_present_row = true && that.isSetRow();
if (this_present_row || that_present_row) {
if (!(this_present_row && that_present_row))
return false;
if (!this.row.equals(that.row))
return false;
}
boolean this_present_family = true && this.isSetFamily();
boolean that_present_family = true && that.isSetFamily();
if (this_present_family || that_present_family) {
if (!(this_present_family && that_present_family))
return false;
if (!this.family.equals(that.family))
return false;
}
boolean this_present_qualifier = true && this.isSetQualifier();
boolean that_present_qualifier = true && that.isSetQualifier();
if (this_present_qualifier || that_present_qualifier) {
if (!(this_present_qualifier && that_present_qualifier))
return false;
if (!this.qualifier.equals(that.qualifier))
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;
}
boolean this_present_tdelete = true && this.isSetTdelete();
boolean that_present_tdelete = true && that.isSetTdelete();
if (this_present_tdelete || that_present_tdelete) {
if (!(this_present_tdelete && that_present_tdelete))
return false;
if (!this.tdelete.equals(that.tdelete))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
boolean present_row = true && (isSetRow());
list.add(present_row);
if (present_row)
list.add(row);
boolean present_family = true && (isSetFamily());
list.add(present_family);
if (present_family)
list.add(family);
boolean present_qualifier = true && (isSetQualifier());
list.add(present_qualifier);
if (present_qualifier)
list.add(qualifier);
boolean present_value = true && (isSetValue());
list.add(present_value);
if (present_value)
list.add(value);
boolean present_tdelete = true && (isSetTdelete());
list.add(present_tdelete);
if (present_tdelete)
list.add(tdelete);
return list.hashCode();
}
@Override
public int compareTo(checkAndDelete_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, other.row);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetFamily()).compareTo(other.isSetFamily());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFamily()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.family, other.family);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQualifier()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifier, other.qualifier);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetValue()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTdelete()).compareTo(other.isSetTdelete());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTdelete()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tdelete, other.tdelete);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("checkAndDelete_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.table, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("row:");
if (this.row == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.row, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("family:");
if (this.family == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.family, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("qualifier:");
if (this.qualifier == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.qualifier, 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;
if (!first) sb.append(", ");
sb.append("tdelete:");
if (this.tdelete == null) {
sb.append("null");
} else {
sb.append(this.tdelete);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (row == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'row' was not present! Struct: " + toString());
}
if (family == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'family' was not present! Struct: " + toString());
}
if (qualifier == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'qualifier' was not present! Struct: " + toString());
}
if (tdelete == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tdelete' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (tdelete != null) {
tdelete.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class checkAndDelete_argsStandardSchemeFactory implements SchemeFactory {
public checkAndDelete_argsStandardScheme getScheme() {
return new checkAndDelete_argsStandardScheme();
}
}
private static class checkAndDelete_argsStandardScheme extends StandardScheme<checkAndDelete_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, checkAndDelete_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: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // ROW
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // FAMILY
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.family = iprot.readBinary();
struct.setFamilyIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // QUALIFIER
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.qualifier = iprot.readBinary();
struct.setQualifierIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // 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;
case 6: // TDELETE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.tdelete = new TDelete();
struct.tdelete.read(iprot);
struct.setTdeleteIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, checkAndDelete_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeBinary(struct.table);
oprot.writeFieldEnd();
}
if (struct.row != null) {
oprot.writeFieldBegin(ROW_FIELD_DESC);
oprot.writeBinary(struct.row);
oprot.writeFieldEnd();
}
if (struct.family != null) {
oprot.writeFieldBegin(FAMILY_FIELD_DESC);
oprot.writeBinary(struct.family);
oprot.writeFieldEnd();
}
if (struct.qualifier != null) {
oprot.writeFieldBegin(QUALIFIER_FIELD_DESC);
oprot.writeBinary(struct.qualifier);
oprot.writeFieldEnd();
}
if (struct.value != null) {
oprot.writeFieldBegin(VALUE_FIELD_DESC);
oprot.writeBinary(struct.value);
oprot.writeFieldEnd();
}
if (struct.tdelete != null) {
oprot.writeFieldBegin(TDELETE_FIELD_DESC);
struct.tdelete.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class checkAndDelete_argsTupleSchemeFactory implements SchemeFactory {
public checkAndDelete_argsTupleScheme getScheme() {
return new checkAndDelete_argsTupleScheme();
}
}
private static class checkAndDelete_argsTupleScheme extends TupleScheme<checkAndDelete_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, checkAndDelete_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
oprot.writeBinary(struct.row);
oprot.writeBinary(struct.family);
oprot.writeBinary(struct.qualifier);
struct.tdelete.write(oprot);
BitSet optionals = new BitSet();
if (struct.isSetValue()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetValue()) {
oprot.writeBinary(struct.value);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, checkAndDelete_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
struct.family = iprot.readBinary();
struct.setFamilyIsSet(true);
struct.qualifier = iprot.readBinary();
struct.setQualifierIsSet(true);
struct.tdelete = new TDelete();
struct.tdelete.read(iprot);
struct.setTdeleteIsSet(true);
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.value = iprot.readBinary();
struct.setValueIsSet(true);
}
}
}
}
public static class checkAndDelete_result implements org.apache.thrift.TBase<checkAndDelete_result, checkAndDelete_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkAndDelete_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkAndDelete_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.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new checkAndDelete_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new checkAndDelete_resultTupleSchemeFactory());
}
public boolean success; // required
public TIOError io; // 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"),
IO((short)1, "io");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IO
return IO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkAndDelete_result.class, metaDataMap);
}
public checkAndDelete_result() {
}
public checkAndDelete_result(
boolean success,
TIOError io)
{
this();
this.success = success;
setSuccessIsSet(true);
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public checkAndDelete_result(checkAndDelete_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
}
public checkAndDelete_result deepCopy() {
return new checkAndDelete_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.io = null;
}
public boolean isSuccess() {
return this.success;
}
public checkAndDelete_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public TIOError getIo() {
return this.io;
}
public checkAndDelete_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case IO:
return getIo();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IO:
return isSetIo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof checkAndDelete_result)
return this.equals((checkAndDelete_result)that);
return false;
}
public boolean equals(checkAndDelete_result that) {
if (that == null)
return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true;
list.add(present_success);
if (present_success)
list.add(success);
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
return list.hashCode();
}
@Override
public int compareTo(checkAndDelete_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("checkAndDelete_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class checkAndDelete_resultStandardSchemeFactory implements SchemeFactory {
public checkAndDelete_resultStandardScheme getScheme() {
return new checkAndDelete_resultStandardScheme();
}
}
private static class checkAndDelete_resultStandardScheme extends StandardScheme<checkAndDelete_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, checkAndDelete_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;
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, checkAndDelete_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();
}
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class checkAndDelete_resultTupleSchemeFactory implements SchemeFactory {
public checkAndDelete_resultTupleScheme getScheme() {
return new checkAndDelete_resultTupleScheme();
}
}
private static class checkAndDelete_resultTupleScheme extends TupleScheme<checkAndDelete_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, checkAndDelete_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIo()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, checkAndDelete_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class increment_args implements org.apache.thrift.TBase<increment_args, increment_args._Fields>, java.io.Serializable, Cloneable, Comparable<increment_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("increment_args");
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TINCREMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("tincrement", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new increment_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new increment_argsTupleSchemeFactory());
}
/**
* the table to increment the value on
*/
public ByteBuffer table; // required
/**
* the TIncrement to increment
*/
public TIncrement tincrement; // 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 {
/**
* the table to increment the value on
*/
TABLE((short)1, "table"),
/**
* the TIncrement to increment
*/
TINCREMENT((short)2, "tincrement");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
return TABLE;
case 2: // TINCREMENT
return TINCREMENT;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.TINCREMENT, new org.apache.thrift.meta_data.FieldMetaData("tincrement", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TIncrement.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(increment_args.class, metaDataMap);
}
public increment_args() {
}
public increment_args(
ByteBuffer table,
TIncrement tincrement)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
this.tincrement = tincrement;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public increment_args(increment_args other) {
if (other.isSetTable()) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
if (other.isSetTincrement()) {
this.tincrement = new TIncrement(other.tincrement);
}
}
public increment_args deepCopy() {
return new increment_args(this);
}
@Override
public void clear() {
this.table = null;
this.tincrement = null;
}
/**
* the table to increment the value on
*/
public byte[] getTable() {
setTable(org.apache.thrift.TBaseHelper.rightSize(table));
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
/**
* the table to increment the value on
*/
public increment_args setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
return this;
}
public increment_args setTable(ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
/**
* the TIncrement to increment
*/
public TIncrement getTincrement() {
return this.tincrement;
}
/**
* the TIncrement to increment
*/
public increment_args setTincrement(TIncrement tincrement) {
this.tincrement = tincrement;
return this;
}
public void unsetTincrement() {
this.tincrement = null;
}
/** Returns true if field tincrement is set (has been assigned a value) and false otherwise */
public boolean isSetTincrement() {
return this.tincrement != null;
}
public void setTincrementIsSet(boolean value) {
if (!value) {
this.tincrement = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
}
break;
case TINCREMENT:
if (value == null) {
unsetTincrement();
} else {
setTincrement((TIncrement)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
case TINCREMENT:
return getTincrement();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
case TINCREMENT:
return isSetTincrement();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof increment_args)
return this.equals((increment_args)that);
return false;
}
public boolean equals(increment_args that) {
if (that == null)
return false;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_tincrement = true && this.isSetTincrement();
boolean that_present_tincrement = true && that.isSetTincrement();
if (this_present_tincrement || that_present_tincrement) {
if (!(this_present_tincrement && that_present_tincrement))
return false;
if (!this.tincrement.equals(that.tincrement))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
boolean present_tincrement = true && (isSetTincrement());
list.add(present_tincrement);
if (present_tincrement)
list.add(tincrement);
return list.hashCode();
}
@Override
public int compareTo(increment_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTincrement()).compareTo(other.isSetTincrement());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTincrement()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tincrement, other.tincrement);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("increment_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.table, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("tincrement:");
if (this.tincrement == null) {
sb.append("null");
} else {
sb.append(this.tincrement);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (tincrement == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tincrement' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (tincrement != null) {
tincrement.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class increment_argsStandardSchemeFactory implements SchemeFactory {
public increment_argsStandardScheme getScheme() {
return new increment_argsStandardScheme();
}
}
private static class increment_argsStandardScheme extends StandardScheme<increment_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, increment_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: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TINCREMENT
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.tincrement = new TIncrement();
struct.tincrement.read(iprot);
struct.setTincrementIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, increment_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeBinary(struct.table);
oprot.writeFieldEnd();
}
if (struct.tincrement != null) {
oprot.writeFieldBegin(TINCREMENT_FIELD_DESC);
struct.tincrement.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class increment_argsTupleSchemeFactory implements SchemeFactory {
public increment_argsTupleScheme getScheme() {
return new increment_argsTupleScheme();
}
}
private static class increment_argsTupleScheme extends TupleScheme<increment_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, increment_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
struct.tincrement.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, increment_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
struct.tincrement = new TIncrement();
struct.tincrement.read(iprot);
struct.setTincrementIsSet(true);
}
}
}
public static class increment_result implements org.apache.thrift.TBase<increment_result, increment_result._Fields>, java.io.Serializable, Cloneable, Comparable<increment_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("increment_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.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new increment_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new increment_resultTupleSchemeFactory());
}
public TResult success; // required
public TIOError io; // 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"),
IO((short)1, "io");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IO
return IO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResult.class)));
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(increment_result.class, metaDataMap);
}
public increment_result() {
}
public increment_result(
TResult success,
TIOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public increment_result(increment_result other) {
if (other.isSetSuccess()) {
this.success = new TResult(other.success);
}
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
}
public increment_result deepCopy() {
return new increment_result(this);
}
@Override
public void clear() {
this.success = null;
this.io = null;
}
public TResult getSuccess() {
return this.success;
}
public increment_result setSuccess(TResult success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public TIOError getIo() {
return this.io;
}
public increment_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((TResult)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case IO:
return getIo();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IO:
return isSetIo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof increment_result)
return this.equals((increment_result)that);
return false;
}
public boolean equals(increment_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
return list.hashCode();
}
@Override
public int compareTo(increment_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("increment_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class increment_resultStandardSchemeFactory implements SchemeFactory {
public increment_resultStandardScheme getScheme() {
return new increment_resultStandardScheme();
}
}
private static class increment_resultStandardScheme extends StandardScheme<increment_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, increment_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 TResult();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, increment_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();
}
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class increment_resultTupleSchemeFactory implements SchemeFactory {
public increment_resultTupleScheme getScheme() {
return new increment_resultTupleScheme();
}
}
private static class increment_resultTupleScheme extends TupleScheme<increment_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, increment_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIo()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, increment_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new TResult();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class append_args implements org.apache.thrift.TBase<append_args, append_args._Fields>, java.io.Serializable, Cloneable, Comparable<append_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_args");
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TAPPEND_FIELD_DESC = new org.apache.thrift.protocol.TField("tappend", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new append_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new append_argsTupleSchemeFactory());
}
/**
* the table to append the value on
*/
public ByteBuffer table; // required
/**
* the TAppend to append
*/
public TAppend tappend; // 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 {
/**
* the table to append the value on
*/
TABLE((short)1, "table"),
/**
* the TAppend to append
*/
TAPPEND((short)2, "tappend");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
return TABLE;
case 2: // TAPPEND
return TAPPEND;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.TAPPEND, new org.apache.thrift.meta_data.FieldMetaData("tappend", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAppend.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_args.class, metaDataMap);
}
public append_args() {
}
public append_args(
ByteBuffer table,
TAppend tappend)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
this.tappend = tappend;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public append_args(append_args other) {
if (other.isSetTable()) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
if (other.isSetTappend()) {
this.tappend = new TAppend(other.tappend);
}
}
public append_args deepCopy() {
return new append_args(this);
}
@Override
public void clear() {
this.table = null;
this.tappend = null;
}
/**
* the table to append the value on
*/
public byte[] getTable() {
setTable(org.apache.thrift.TBaseHelper.rightSize(table));
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
/**
* the table to append the value on
*/
public append_args setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
return this;
}
public append_args setTable(ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
/**
* the TAppend to append
*/
public TAppend getTappend() {
return this.tappend;
}
/**
* the TAppend to append
*/
public append_args setTappend(TAppend tappend) {
this.tappend = tappend;
return this;
}
public void unsetTappend() {
this.tappend = null;
}
/** Returns true if field tappend is set (has been assigned a value) and false otherwise */
public boolean isSetTappend() {
return this.tappend != null;
}
public void setTappendIsSet(boolean value) {
if (!value) {
this.tappend = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
}
break;
case TAPPEND:
if (value == null) {
unsetTappend();
} else {
setTappend((TAppend)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
case TAPPEND:
return getTappend();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
case TAPPEND:
return isSetTappend();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof append_args)
return this.equals((append_args)that);
return false;
}
public boolean equals(append_args that) {
if (that == null)
return false;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_tappend = true && this.isSetTappend();
boolean that_present_tappend = true && that.isSetTappend();
if (this_present_tappend || that_present_tappend) {
if (!(this_present_tappend && that_present_tappend))
return false;
if (!this.tappend.equals(that.tappend))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
boolean present_tappend = true && (isSetTappend());
list.add(present_tappend);
if (present_tappend)
list.add(tappend);
return list.hashCode();
}
@Override
public int compareTo(append_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTappend()).compareTo(other.isSetTappend());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTappend()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tappend, other.tappend);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("append_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.table, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("tappend:");
if (this.tappend == null) {
sb.append("null");
} else {
sb.append(this.tappend);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (tappend == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tappend' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (tappend != null) {
tappend.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class append_argsStandardSchemeFactory implements SchemeFactory {
public append_argsStandardScheme getScheme() {
return new append_argsStandardScheme();
}
}
private static class append_argsStandardScheme extends StandardScheme<append_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, append_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: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TAPPEND
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.tappend = new TAppend();
struct.tappend.read(iprot);
struct.setTappendIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, append_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeBinary(struct.table);
oprot.writeFieldEnd();
}
if (struct.tappend != null) {
oprot.writeFieldBegin(TAPPEND_FIELD_DESC);
struct.tappend.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class append_argsTupleSchemeFactory implements SchemeFactory {
public append_argsTupleScheme getScheme() {
return new append_argsTupleScheme();
}
}
private static class append_argsTupleScheme extends TupleScheme<append_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, append_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
struct.tappend.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, append_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
struct.tappend = new TAppend();
struct.tappend.read(iprot);
struct.setTappendIsSet(true);
}
}
}
public static class append_result implements org.apache.thrift.TBase<append_result, append_result._Fields>, java.io.Serializable, Cloneable, Comparable<append_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_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.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new append_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new append_resultTupleSchemeFactory());
}
public TResult success; // required
public TIOError io; // 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"),
IO((short)1, "io");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IO
return IO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResult.class)));
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_result.class, metaDataMap);
}
public append_result() {
}
public append_result(
TResult success,
TIOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public append_result(append_result other) {
if (other.isSetSuccess()) {
this.success = new TResult(other.success);
}
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
}
public append_result deepCopy() {
return new append_result(this);
}
@Override
public void clear() {
this.success = null;
this.io = null;
}
public TResult getSuccess() {
return this.success;
}
public append_result setSuccess(TResult success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public TIOError getIo() {
return this.io;
}
public append_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((TResult)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case IO:
return getIo();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IO:
return isSetIo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof append_result)
return this.equals((append_result)that);
return false;
}
public boolean equals(append_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
return list.hashCode();
}
@Override
public int compareTo(append_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("append_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class append_resultStandardSchemeFactory implements SchemeFactory {
public append_resultStandardScheme getScheme() {
return new append_resultStandardScheme();
}
}
private static class append_resultStandardScheme extends StandardScheme<append_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, append_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 TResult();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, append_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();
}
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class append_resultTupleSchemeFactory implements SchemeFactory {
public append_resultTupleScheme getScheme() {
return new append_resultTupleScheme();
}
}
private static class append_resultTupleScheme extends TupleScheme<append_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, append_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIo()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, append_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new TResult();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class openScanner_args implements org.apache.thrift.TBase<openScanner_args, openScanner_args._Fields>, java.io.Serializable, Cloneable, Comparable<openScanner_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("openScanner_args");
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TSCAN_FIELD_DESC = new org.apache.thrift.protocol.TField("tscan", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new openScanner_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new openScanner_argsTupleSchemeFactory());
}
/**
* the table to get the Scanner for
*/
public ByteBuffer table; // required
/**
* the scan object to get a Scanner for
*/
public TScan tscan; // 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 {
/**
* the table to get the Scanner for
*/
TABLE((short)1, "table"),
/**
* the scan object to get a Scanner for
*/
TSCAN((short)2, "tscan");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
return TABLE;
case 2: // TSCAN
return TSCAN;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.TSCAN, new org.apache.thrift.meta_data.FieldMetaData("tscan", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TScan.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(openScanner_args.class, metaDataMap);
}
public openScanner_args() {
}
public openScanner_args(
ByteBuffer table,
TScan tscan)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
this.tscan = tscan;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public openScanner_args(openScanner_args other) {
if (other.isSetTable()) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
if (other.isSetTscan()) {
this.tscan = new TScan(other.tscan);
}
}
public openScanner_args deepCopy() {
return new openScanner_args(this);
}
@Override
public void clear() {
this.table = null;
this.tscan = null;
}
/**
* the table to get the Scanner for
*/
public byte[] getTable() {
setTable(org.apache.thrift.TBaseHelper.rightSize(table));
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
/**
* the table to get the Scanner for
*/
public openScanner_args setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
return this;
}
public openScanner_args setTable(ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
/**
* the scan object to get a Scanner for
*/
public TScan getTscan() {
return this.tscan;
}
/**
* the scan object to get a Scanner for
*/
public openScanner_args setTscan(TScan tscan) {
this.tscan = tscan;
return this;
}
public void unsetTscan() {
this.tscan = null;
}
/** Returns true if field tscan is set (has been assigned a value) and false otherwise */
public boolean isSetTscan() {
return this.tscan != null;
}
public void setTscanIsSet(boolean value) {
if (!value) {
this.tscan = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
}
break;
case TSCAN:
if (value == null) {
unsetTscan();
} else {
setTscan((TScan)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
case TSCAN:
return getTscan();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
case TSCAN:
return isSetTscan();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof openScanner_args)
return this.equals((openScanner_args)that);
return false;
}
public boolean equals(openScanner_args that) {
if (that == null)
return false;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_tscan = true && this.isSetTscan();
boolean that_present_tscan = true && that.isSetTscan();
if (this_present_tscan || that_present_tscan) {
if (!(this_present_tscan && that_present_tscan))
return false;
if (!this.tscan.equals(that.tscan))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
boolean present_tscan = true && (isSetTscan());
list.add(present_tscan);
if (present_tscan)
list.add(tscan);
return list.hashCode();
}
@Override
public int compareTo(openScanner_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTscan()).compareTo(other.isSetTscan());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTscan()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tscan, other.tscan);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("openScanner_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.table, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("tscan:");
if (this.tscan == null) {
sb.append("null");
} else {
sb.append(this.tscan);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (tscan == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tscan' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (tscan != null) {
tscan.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class openScanner_argsStandardSchemeFactory implements SchemeFactory {
public openScanner_argsStandardScheme getScheme() {
return new openScanner_argsStandardScheme();
}
}
private static class openScanner_argsStandardScheme extends StandardScheme<openScanner_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, openScanner_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: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TSCAN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.tscan = new TScan();
struct.tscan.read(iprot);
struct.setTscanIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, openScanner_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeBinary(struct.table);
oprot.writeFieldEnd();
}
if (struct.tscan != null) {
oprot.writeFieldBegin(TSCAN_FIELD_DESC);
struct.tscan.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class openScanner_argsTupleSchemeFactory implements SchemeFactory {
public openScanner_argsTupleScheme getScheme() {
return new openScanner_argsTupleScheme();
}
}
private static class openScanner_argsTupleScheme extends TupleScheme<openScanner_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, openScanner_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
struct.tscan.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, openScanner_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
struct.tscan = new TScan();
struct.tscan.read(iprot);
struct.setTscanIsSet(true);
}
}
}
public static class openScanner_result implements org.apache.thrift.TBase<openScanner_result, openScanner_result._Fields>, java.io.Serializable, Cloneable, Comparable<openScanner_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("openScanner_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new openScanner_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new openScanner_resultTupleSchemeFactory());
}
public int success; // required
public TIOError io; // 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"),
IO((short)1, "io");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IO
return IO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(openScanner_result.class, metaDataMap);
}
public openScanner_result() {
}
public openScanner_result(
int success,
TIOError io)
{
this();
this.success = success;
setSuccessIsSet(true);
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public openScanner_result(openScanner_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
}
public openScanner_result deepCopy() {
return new openScanner_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = 0;
this.io = null;
}
public int getSuccess() {
return this.success;
}
public openScanner_result setSuccess(int success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public TIOError getIo() {
return this.io;
}
public openScanner_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Integer)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case IO:
return getIo();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IO:
return isSetIo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof openScanner_result)
return this.equals((openScanner_result)that);
return false;
}
public boolean equals(openScanner_result that) {
if (that == null)
return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true;
list.add(present_success);
if (present_success)
list.add(success);
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
return list.hashCode();
}
@Override
public int compareTo(openScanner_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("openScanner_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class openScanner_resultStandardSchemeFactory implements SchemeFactory {
public openScanner_resultStandardScheme getScheme() {
return new openScanner_resultStandardScheme();
}
}
private static class openScanner_resultStandardScheme extends StandardScheme<openScanner_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, openScanner_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.success = iprot.readI32();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, openScanner_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeI32(struct.success);
oprot.writeFieldEnd();
}
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class openScanner_resultTupleSchemeFactory implements SchemeFactory {
public openScanner_resultTupleScheme getScheme() {
return new openScanner_resultTupleScheme();
}
}
private static class openScanner_resultTupleScheme extends TupleScheme<openScanner_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, openScanner_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIo()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeI32(struct.success);
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, openScanner_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readI32();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class getScannerRows_args implements org.apache.thrift.TBase<getScannerRows_args, getScannerRows_args._Fields>, java.io.Serializable, Cloneable, Comparable<getScannerRows_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScannerRows_args");
private static final org.apache.thrift.protocol.TField SCANNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("scannerId", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField NUM_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("numRows", org.apache.thrift.protocol.TType.I32, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getScannerRows_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getScannerRows_argsTupleSchemeFactory());
}
/**
* the Id of the Scanner to return rows from. This is an Id returned from the openScanner function.
*/
public int scannerId; // required
/**
* number of rows to return
*/
public int numRows; // 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 {
/**
* the Id of the Scanner to return rows from. This is an Id returned from the openScanner function.
*/
SCANNER_ID((short)1, "scannerId"),
/**
* number of rows to return
*/
NUM_ROWS((short)2, "numRows");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // SCANNER_ID
return SCANNER_ID;
case 2: // NUM_ROWS
return NUM_ROWS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SCANNERID_ISSET_ID = 0;
private static final int __NUMROWS_ISSET_ID = 1;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SCANNER_ID, new org.apache.thrift.meta_data.FieldMetaData("scannerId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.NUM_ROWS, new org.apache.thrift.meta_data.FieldMetaData("numRows", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScannerRows_args.class, metaDataMap);
}
public getScannerRows_args() {
this.numRows = 1;
}
public getScannerRows_args(
int scannerId,
int numRows)
{
this();
this.scannerId = scannerId;
setScannerIdIsSet(true);
this.numRows = numRows;
setNumRowsIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getScannerRows_args(getScannerRows_args other) {
__isset_bitfield = other.__isset_bitfield;
this.scannerId = other.scannerId;
this.numRows = other.numRows;
}
public getScannerRows_args deepCopy() {
return new getScannerRows_args(this);
}
@Override
public void clear() {
setScannerIdIsSet(false);
this.scannerId = 0;
this.numRows = 1;
}
/**
* the Id of the Scanner to return rows from. This is an Id returned from the openScanner function.
*/
public int getScannerId() {
return this.scannerId;
}
/**
* the Id of the Scanner to return rows from. This is an Id returned from the openScanner function.
*/
public getScannerRows_args setScannerId(int scannerId) {
this.scannerId = scannerId;
setScannerIdIsSet(true);
return this;
}
public void unsetScannerId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCANNERID_ISSET_ID);
}
/** Returns true if field scannerId is set (has been assigned a value) and false otherwise */
public boolean isSetScannerId() {
return EncodingUtils.testBit(__isset_bitfield, __SCANNERID_ISSET_ID);
}
public void setScannerIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCANNERID_ISSET_ID, value);
}
/**
* number of rows to return
*/
public int getNumRows() {
return this.numRows;
}
/**
* number of rows to return
*/
public getScannerRows_args setNumRows(int numRows) {
this.numRows = numRows;
setNumRowsIsSet(true);
return this;
}
public void unsetNumRows() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMROWS_ISSET_ID);
}
/** Returns true if field numRows is set (has been assigned a value) and false otherwise */
public boolean isSetNumRows() {
return EncodingUtils.testBit(__isset_bitfield, __NUMROWS_ISSET_ID);
}
public void setNumRowsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMROWS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SCANNER_ID:
if (value == null) {
unsetScannerId();
} else {
setScannerId((Integer)value);
}
break;
case NUM_ROWS:
if (value == null) {
unsetNumRows();
} else {
setNumRows((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SCANNER_ID:
return getScannerId();
case NUM_ROWS:
return getNumRows();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SCANNER_ID:
return isSetScannerId();
case NUM_ROWS:
return isSetNumRows();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getScannerRows_args)
return this.equals((getScannerRows_args)that);
return false;
}
public boolean equals(getScannerRows_args that) {
if (that == null)
return false;
boolean this_present_scannerId = true;
boolean that_present_scannerId = true;
if (this_present_scannerId || that_present_scannerId) {
if (!(this_present_scannerId && that_present_scannerId))
return false;
if (this.scannerId != that.scannerId)
return false;
}
boolean this_present_numRows = true;
boolean that_present_numRows = true;
if (this_present_numRows || that_present_numRows) {
if (!(this_present_numRows && that_present_numRows))
return false;
if (this.numRows != that.numRows)
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_scannerId = true;
list.add(present_scannerId);
if (present_scannerId)
list.add(scannerId);
boolean present_numRows = true;
list.add(present_numRows);
if (present_numRows)
list.add(numRows);
return list.hashCode();
}
@Override
public int compareTo(getScannerRows_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetScannerId()).compareTo(other.isSetScannerId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetScannerId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scannerId, other.scannerId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetNumRows()).compareTo(other.isSetNumRows());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNumRows()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numRows, other.numRows);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getScannerRows_args(");
boolean first = true;
sb.append("scannerId:");
sb.append(this.scannerId);
first = false;
if (!first) sb.append(", ");
sb.append("numRows:");
sb.append(this.numRows);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'scannerId' 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, 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 getScannerRows_argsStandardSchemeFactory implements SchemeFactory {
public getScannerRows_argsStandardScheme getScheme() {
return new getScannerRows_argsStandardScheme();
}
}
private static class getScannerRows_argsStandardScheme extends StandardScheme<getScannerRows_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getScannerRows_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: // SCANNER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.scannerId = iprot.readI32();
struct.setScannerIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // NUM_ROWS
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.numRows = iprot.readI32();
struct.setNumRowsIsSet(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.isSetScannerId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'scannerId' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getScannerRows_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(SCANNER_ID_FIELD_DESC);
oprot.writeI32(struct.scannerId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(NUM_ROWS_FIELD_DESC);
oprot.writeI32(struct.numRows);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getScannerRows_argsTupleSchemeFactory implements SchemeFactory {
public getScannerRows_argsTupleScheme getScheme() {
return new getScannerRows_argsTupleScheme();
}
}
private static class getScannerRows_argsTupleScheme extends TupleScheme<getScannerRows_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getScannerRows_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeI32(struct.scannerId);
BitSet optionals = new BitSet();
if (struct.isSetNumRows()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetNumRows()) {
oprot.writeI32(struct.numRows);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getScannerRows_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.scannerId = iprot.readI32();
struct.setScannerIdIsSet(true);
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.numRows = iprot.readI32();
struct.setNumRowsIsSet(true);
}
}
}
}
public static class getScannerRows_result implements org.apache.thrift.TBase<getScannerRows_result, getScannerRows_result._Fields>, java.io.Serializable, Cloneable, Comparable<getScannerRows_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScannerRows_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.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField IA_FIELD_DESC = new org.apache.thrift.protocol.TField("ia", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getScannerRows_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getScannerRows_resultTupleSchemeFactory());
}
public List<TResult> success; // required
public TIOError io; // required
/**
* if the scannerId is invalid
*/
public TIllegalArgument ia; // 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"),
IO((short)1, "io"),
/**
* if the scannerId is invalid
*/
IA((short)2, "ia");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IO
return IO;
case 2: // IA
return IA;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResult.class))));
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.IA, new org.apache.thrift.meta_data.FieldMetaData("ia", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScannerRows_result.class, metaDataMap);
}
public getScannerRows_result() {
}
public getScannerRows_result(
List<TResult> success,
TIOError io,
TIllegalArgument ia)
{
this();
this.success = success;
this.io = io;
this.ia = ia;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getScannerRows_result(getScannerRows_result other) {
if (other.isSetSuccess()) {
List<TResult> __this__success = new ArrayList<TResult>(other.success.size());
for (TResult other_element : other.success) {
__this__success.add(new TResult(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
if (other.isSetIa()) {
this.ia = new TIllegalArgument(other.ia);
}
}
public getScannerRows_result deepCopy() {
return new getScannerRows_result(this);
}
@Override
public void clear() {
this.success = null;
this.io = null;
this.ia = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<TResult> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TResult elem) {
if (this.success == null) {
this.success = new ArrayList<TResult>();
}
this.success.add(elem);
}
public List<TResult> getSuccess() {
return this.success;
}
public getScannerRows_result setSuccess(List<TResult> success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public TIOError getIo() {
return this.io;
}
public getScannerRows_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
/**
* if the scannerId is invalid
*/
public TIllegalArgument getIa() {
return this.ia;
}
/**
* if the scannerId is invalid
*/
public getScannerRows_result setIa(TIllegalArgument ia) {
this.ia = ia;
return this;
}
public void unsetIa() {
this.ia = null;
}
/** Returns true if field ia is set (has been assigned a value) and false otherwise */
public boolean isSetIa() {
return this.ia != null;
}
public void setIaIsSet(boolean value) {
if (!value) {
this.ia = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((List<TResult>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
case IA:
if (value == null) {
unsetIa();
} else {
setIa((TIllegalArgument)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case IO:
return getIo();
case IA:
return getIa();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IO:
return isSetIo();
case IA:
return isSetIa();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getScannerRows_result)
return this.equals((getScannerRows_result)that);
return false;
}
public boolean equals(getScannerRows_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
boolean this_present_ia = true && this.isSetIa();
boolean that_present_ia = true && that.isSetIa();
if (this_present_ia || that_present_ia) {
if (!(this_present_ia && that_present_ia))
return false;
if (!this.ia.equals(that.ia))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
boolean present_ia = true && (isSetIa());
list.add(present_ia);
if (present_ia)
list.add(ia);
return list.hashCode();
}
@Override
public int compareTo(getScannerRows_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIa()).compareTo(other.isSetIa());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIa()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, other.ia);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getScannerRows_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
if (!first) sb.append(", ");
sb.append("ia:");
if (this.ia == null) {
sb.append("null");
} else {
sb.append(this.ia);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getScannerRows_resultStandardSchemeFactory implements SchemeFactory {
public getScannerRows_resultStandardScheme getScheme() {
return new getScannerRows_resultStandardScheme();
}
}
private static class getScannerRows_resultStandardScheme extends StandardScheme<getScannerRows_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getScannerRows_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 _list172 = iprot.readListBegin();
struct.success = new ArrayList<TResult>(_list172.size);
TResult _elem173;
for (int _i174 = 0; _i174 < _list172.size; ++_i174)
{
_elem173 = new TResult();
_elem173.read(iprot);
struct.success.add(_elem173);
}
iprot.readListEnd();
}
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // IA
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ia = new TIllegalArgument();
struct.ia.read(iprot);
struct.setIaIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getScannerRows_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 (TResult _iter175 : struct.success)
{
_iter175.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ia != null) {
oprot.writeFieldBegin(IA_FIELD_DESC);
struct.ia.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getScannerRows_resultTupleSchemeFactory implements SchemeFactory {
public getScannerRows_resultTupleScheme getScheme() {
return new getScannerRows_resultTupleScheme();
}
}
private static class getScannerRows_resultTupleScheme extends TupleScheme<getScannerRows_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getScannerRows_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIo()) {
optionals.set(1);
}
if (struct.isSetIa()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (TResult _iter176 : struct.success)
{
_iter176.write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
if (struct.isSetIa()) {
struct.ia.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getScannerRows_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list177 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TResult>(_list177.size);
TResult _elem178;
for (int _i179 = 0; _i179 < _list177.size; ++_i179)
{
_elem178 = new TResult();
_elem178.read(iprot);
struct.success.add(_elem178);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
if (incoming.get(2)) {
struct.ia = new TIllegalArgument();
struct.ia.read(iprot);
struct.setIaIsSet(true);
}
}
}
}
public static class closeScanner_args implements org.apache.thrift.TBase<closeScanner_args, closeScanner_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeScanner_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeScanner_args");
private static final org.apache.thrift.protocol.TField SCANNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("scannerId", org.apache.thrift.protocol.TType.I32, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new closeScanner_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new closeScanner_argsTupleSchemeFactory());
}
/**
* the Id of the Scanner to close *
*/
public int scannerId; // 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 {
/**
* the Id of the Scanner to close *
*/
SCANNER_ID((short)1, "scannerId");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // SCANNER_ID
return SCANNER_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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SCANNERID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SCANNER_ID, new org.apache.thrift.meta_data.FieldMetaData("scannerId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeScanner_args.class, metaDataMap);
}
public closeScanner_args() {
}
public closeScanner_args(
int scannerId)
{
this();
this.scannerId = scannerId;
setScannerIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public closeScanner_args(closeScanner_args other) {
__isset_bitfield = other.__isset_bitfield;
this.scannerId = other.scannerId;
}
public closeScanner_args deepCopy() {
return new closeScanner_args(this);
}
@Override
public void clear() {
setScannerIdIsSet(false);
this.scannerId = 0;
}
/**
* the Id of the Scanner to close *
*/
public int getScannerId() {
return this.scannerId;
}
/**
* the Id of the Scanner to close *
*/
public closeScanner_args setScannerId(int scannerId) {
this.scannerId = scannerId;
setScannerIdIsSet(true);
return this;
}
public void unsetScannerId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCANNERID_ISSET_ID);
}
/** Returns true if field scannerId is set (has been assigned a value) and false otherwise */
public boolean isSetScannerId() {
return EncodingUtils.testBit(__isset_bitfield, __SCANNERID_ISSET_ID);
}
public void setScannerIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCANNERID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SCANNER_ID:
if (value == null) {
unsetScannerId();
} else {
setScannerId((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SCANNER_ID:
return getScannerId();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SCANNER_ID:
return isSetScannerId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof closeScanner_args)
return this.equals((closeScanner_args)that);
return false;
}
public boolean equals(closeScanner_args that) {
if (that == null)
return false;
boolean this_present_scannerId = true;
boolean that_present_scannerId = true;
if (this_present_scannerId || that_present_scannerId) {
if (!(this_present_scannerId && that_present_scannerId))
return false;
if (this.scannerId != that.scannerId)
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_scannerId = true;
list.add(present_scannerId);
if (present_scannerId)
list.add(scannerId);
return list.hashCode();
}
@Override
public int compareTo(closeScanner_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetScannerId()).compareTo(other.isSetScannerId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetScannerId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scannerId, other.scannerId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("closeScanner_args(");
boolean first = true;
sb.append("scannerId:");
sb.append(this.scannerId);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'scannerId' 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, 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 closeScanner_argsStandardSchemeFactory implements SchemeFactory {
public closeScanner_argsStandardScheme getScheme() {
return new closeScanner_argsStandardScheme();
}
}
private static class closeScanner_argsStandardScheme extends StandardScheme<closeScanner_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, closeScanner_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: // SCANNER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.scannerId = iprot.readI32();
struct.setScannerIdIsSet(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.isSetScannerId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'scannerId' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, closeScanner_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(SCANNER_ID_FIELD_DESC);
oprot.writeI32(struct.scannerId);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class closeScanner_argsTupleSchemeFactory implements SchemeFactory {
public closeScanner_argsTupleScheme getScheme() {
return new closeScanner_argsTupleScheme();
}
}
private static class closeScanner_argsTupleScheme extends TupleScheme<closeScanner_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, closeScanner_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeI32(struct.scannerId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, closeScanner_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.scannerId = iprot.readI32();
struct.setScannerIdIsSet(true);
}
}
}
public static class closeScanner_result implements org.apache.thrift.TBase<closeScanner_result, closeScanner_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeScanner_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeScanner_result");
private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField IA_FIELD_DESC = new org.apache.thrift.protocol.TField("ia", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new closeScanner_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new closeScanner_resultTupleSchemeFactory());
}
public TIOError io; // required
/**
* if the scannerId is invalid
*/
public TIllegalArgument ia; // 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 {
IO((short)1, "io"),
/**
* if the scannerId is invalid
*/
IA((short)2, "ia");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // IO
return IO;
case 2: // IA
return IA;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.IA, new org.apache.thrift.meta_data.FieldMetaData("ia", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeScanner_result.class, metaDataMap);
}
public closeScanner_result() {
}
public closeScanner_result(
TIOError io,
TIllegalArgument ia)
{
this();
this.io = io;
this.ia = ia;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public closeScanner_result(closeScanner_result other) {
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
if (other.isSetIa()) {
this.ia = new TIllegalArgument(other.ia);
}
}
public closeScanner_result deepCopy() {
return new closeScanner_result(this);
}
@Override
public void clear() {
this.io = null;
this.ia = null;
}
public TIOError getIo() {
return this.io;
}
public closeScanner_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
/**
* if the scannerId is invalid
*/
public TIllegalArgument getIa() {
return this.ia;
}
/**
* if the scannerId is invalid
*/
public closeScanner_result setIa(TIllegalArgument ia) {
this.ia = ia;
return this;
}
public void unsetIa() {
this.ia = null;
}
/** Returns true if field ia is set (has been assigned a value) and false otherwise */
public boolean isSetIa() {
return this.ia != null;
}
public void setIaIsSet(boolean value) {
if (!value) {
this.ia = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
case IA:
if (value == null) {
unsetIa();
} else {
setIa((TIllegalArgument)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case IO:
return getIo();
case IA:
return getIa();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case IO:
return isSetIo();
case IA:
return isSetIa();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof closeScanner_result)
return this.equals((closeScanner_result)that);
return false;
}
public boolean equals(closeScanner_result that) {
if (that == null)
return false;
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
boolean this_present_ia = true && this.isSetIa();
boolean that_present_ia = true && that.isSetIa();
if (this_present_ia || that_present_ia) {
if (!(this_present_ia && that_present_ia))
return false;
if (!this.ia.equals(that.ia))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
boolean present_ia = true && (isSetIa());
list.add(present_ia);
if (present_ia)
list.add(ia);
return list.hashCode();
}
@Override
public int compareTo(closeScanner_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIa()).compareTo(other.isSetIa());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIa()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, other.ia);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("closeScanner_result(");
boolean first = true;
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
if (!first) sb.append(", ");
sb.append("ia:");
if (this.ia == null) {
sb.append("null");
} else {
sb.append(this.ia);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class closeScanner_resultStandardSchemeFactory implements SchemeFactory {
public closeScanner_resultStandardScheme getScheme() {
return new closeScanner_resultStandardScheme();
}
}
private static class closeScanner_resultStandardScheme extends StandardScheme<closeScanner_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, closeScanner_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // IA
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ia = new TIllegalArgument();
struct.ia.read(iprot);
struct.setIaIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, closeScanner_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ia != null) {
oprot.writeFieldBegin(IA_FIELD_DESC);
struct.ia.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class closeScanner_resultTupleSchemeFactory implements SchemeFactory {
public closeScanner_resultTupleScheme getScheme() {
return new closeScanner_resultTupleScheme();
}
}
private static class closeScanner_resultTupleScheme extends TupleScheme<closeScanner_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, closeScanner_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetIo()) {
optionals.set(0);
}
if (struct.isSetIa()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetIo()) {
struct.io.write(oprot);
}
if (struct.isSetIa()) {
struct.ia.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, closeScanner_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
if (incoming.get(1)) {
struct.ia = new TIllegalArgument();
struct.ia.read(iprot);
struct.setIaIsSet(true);
}
}
}
}
public static class mutateRow_args implements org.apache.thrift.TBase<mutateRow_args, mutateRow_args._Fields>, java.io.Serializable, Cloneable, Comparable<mutateRow_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRow_args");
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TROW_MUTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("trowMutations", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new mutateRow_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new mutateRow_argsTupleSchemeFactory());
}
/**
* table to apply the mutations
*/
public ByteBuffer table; // required
/**
* mutations to apply
*/
public TRowMutations trowMutations; // 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 {
/**
* table to apply the mutations
*/
TABLE((short)1, "table"),
/**
* mutations to apply
*/
TROW_MUTATIONS((short)2, "trowMutations");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
return TABLE;
case 2: // TROW_MUTATIONS
return TROW_MUTATIONS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.TROW_MUTATIONS, new org.apache.thrift.meta_data.FieldMetaData("trowMutations", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRowMutations.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mutateRow_args.class, metaDataMap);
}
public mutateRow_args() {
}
public mutateRow_args(
ByteBuffer table,
TRowMutations trowMutations)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
this.trowMutations = trowMutations;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public mutateRow_args(mutateRow_args other) {
if (other.isSetTable()) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
if (other.isSetTrowMutations()) {
this.trowMutations = new TRowMutations(other.trowMutations);
}
}
public mutateRow_args deepCopy() {
return new mutateRow_args(this);
}
@Override
public void clear() {
this.table = null;
this.trowMutations = null;
}
/**
* table to apply the mutations
*/
public byte[] getTable() {
setTable(org.apache.thrift.TBaseHelper.rightSize(table));
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
/**
* table to apply the mutations
*/
public mutateRow_args setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
return this;
}
public mutateRow_args setTable(ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
/**
* mutations to apply
*/
public TRowMutations getTrowMutations() {
return this.trowMutations;
}
/**
* mutations to apply
*/
public mutateRow_args setTrowMutations(TRowMutations trowMutations) {
this.trowMutations = trowMutations;
return this;
}
public void unsetTrowMutations() {
this.trowMutations = null;
}
/** Returns true if field trowMutations is set (has been assigned a value) and false otherwise */
public boolean isSetTrowMutations() {
return this.trowMutations != null;
}
public void setTrowMutationsIsSet(boolean value) {
if (!value) {
this.trowMutations = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
}
break;
case TROW_MUTATIONS:
if (value == null) {
unsetTrowMutations();
} else {
setTrowMutations((TRowMutations)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
case TROW_MUTATIONS:
return getTrowMutations();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
case TROW_MUTATIONS:
return isSetTrowMutations();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof mutateRow_args)
return this.equals((mutateRow_args)that);
return false;
}
public boolean equals(mutateRow_args that) {
if (that == null)
return false;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_trowMutations = true && this.isSetTrowMutations();
boolean that_present_trowMutations = true && that.isSetTrowMutations();
if (this_present_trowMutations || that_present_trowMutations) {
if (!(this_present_trowMutations && that_present_trowMutations))
return false;
if (!this.trowMutations.equals(that.trowMutations))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
boolean present_trowMutations = true && (isSetTrowMutations());
list.add(present_trowMutations);
if (present_trowMutations)
list.add(trowMutations);
return list.hashCode();
}
@Override
public int compareTo(mutateRow_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTrowMutations()).compareTo(other.isSetTrowMutations());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTrowMutations()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.trowMutations, other.trowMutations);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("mutateRow_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.table, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("trowMutations:");
if (this.trowMutations == null) {
sb.append("null");
} else {
sb.append(this.trowMutations);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (trowMutations == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'trowMutations' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (trowMutations != null) {
trowMutations.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class mutateRow_argsStandardSchemeFactory implements SchemeFactory {
public mutateRow_argsStandardScheme getScheme() {
return new mutateRow_argsStandardScheme();
}
}
private static class mutateRow_argsStandardScheme extends StandardScheme<mutateRow_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRow_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: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TROW_MUTATIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.trowMutations = new TRowMutations();
struct.trowMutations.read(iprot);
struct.setTrowMutationsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, mutateRow_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeBinary(struct.table);
oprot.writeFieldEnd();
}
if (struct.trowMutations != null) {
oprot.writeFieldBegin(TROW_MUTATIONS_FIELD_DESC);
struct.trowMutations.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class mutateRow_argsTupleSchemeFactory implements SchemeFactory {
public mutateRow_argsTupleScheme getScheme() {
return new mutateRow_argsTupleScheme();
}
}
private static class mutateRow_argsTupleScheme extends TupleScheme<mutateRow_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, mutateRow_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
struct.trowMutations.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, mutateRow_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
struct.trowMutations = new TRowMutations();
struct.trowMutations.read(iprot);
struct.setTrowMutationsIsSet(true);
}
}
}
public static class mutateRow_result implements org.apache.thrift.TBase<mutateRow_result, mutateRow_result._Fields>, java.io.Serializable, Cloneable, Comparable<mutateRow_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRow_result");
private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new mutateRow_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new mutateRow_resultTupleSchemeFactory());
}
public TIOError io; // 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 {
IO((short)1, "io");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // IO
return IO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mutateRow_result.class, metaDataMap);
}
public mutateRow_result() {
}
public mutateRow_result(
TIOError io)
{
this();
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public mutateRow_result(mutateRow_result other) {
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
}
public mutateRow_result deepCopy() {
return new mutateRow_result(this);
}
@Override
public void clear() {
this.io = null;
}
public TIOError getIo() {
return this.io;
}
public mutateRow_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case IO:
return getIo();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case IO:
return isSetIo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof mutateRow_result)
return this.equals((mutateRow_result)that);
return false;
}
public boolean equals(mutateRow_result that) {
if (that == null)
return false;
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
return list.hashCode();
}
@Override
public int compareTo(mutateRow_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("mutateRow_result(");
boolean first = true;
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class mutateRow_resultStandardSchemeFactory implements SchemeFactory {
public mutateRow_resultStandardScheme getScheme() {
return new mutateRow_resultStandardScheme();
}
}
private static class mutateRow_resultStandardScheme extends StandardScheme<mutateRow_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRow_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, mutateRow_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class mutateRow_resultTupleSchemeFactory implements SchemeFactory {
public mutateRow_resultTupleScheme getScheme() {
return new mutateRow_resultTupleScheme();
}
}
private static class mutateRow_resultTupleScheme extends TupleScheme<mutateRow_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, mutateRow_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetIo()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, mutateRow_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class getScannerResults_args implements org.apache.thrift.TBase<getScannerResults_args, getScannerResults_args._Fields>, java.io.Serializable, Cloneable, Comparable<getScannerResults_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScannerResults_args");
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TSCAN_FIELD_DESC = new org.apache.thrift.protocol.TField("tscan", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField NUM_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("numRows", org.apache.thrift.protocol.TType.I32, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getScannerResults_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getScannerResults_argsTupleSchemeFactory());
}
/**
* the table to get the Scanner for
*/
public ByteBuffer table; // required
/**
* the scan object to get a Scanner for
*/
public TScan tscan; // required
/**
* number of rows to return
*/
public int numRows; // 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 {
/**
* the table to get the Scanner for
*/
TABLE((short)1, "table"),
/**
* the scan object to get a Scanner for
*/
TSCAN((short)2, "tscan"),
/**
* number of rows to return
*/
NUM_ROWS((short)3, "numRows");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
return TABLE;
case 2: // TSCAN
return TSCAN;
case 3: // NUM_ROWS
return NUM_ROWS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __NUMROWS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.TSCAN, new org.apache.thrift.meta_data.FieldMetaData("tscan", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TScan.class)));
tmpMap.put(_Fields.NUM_ROWS, new org.apache.thrift.meta_data.FieldMetaData("numRows", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScannerResults_args.class, metaDataMap);
}
public getScannerResults_args() {
this.numRows = 1;
}
public getScannerResults_args(
ByteBuffer table,
TScan tscan,
int numRows)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
this.tscan = tscan;
this.numRows = numRows;
setNumRowsIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getScannerResults_args(getScannerResults_args other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetTable()) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
if (other.isSetTscan()) {
this.tscan = new TScan(other.tscan);
}
this.numRows = other.numRows;
}
public getScannerResults_args deepCopy() {
return new getScannerResults_args(this);
}
@Override
public void clear() {
this.table = null;
this.tscan = null;
this.numRows = 1;
}
/**
* the table to get the Scanner for
*/
public byte[] getTable() {
setTable(org.apache.thrift.TBaseHelper.rightSize(table));
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
/**
* the table to get the Scanner for
*/
public getScannerResults_args setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
return this;
}
public getScannerResults_args setTable(ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
/**
* the scan object to get a Scanner for
*/
public TScan getTscan() {
return this.tscan;
}
/**
* the scan object to get a Scanner for
*/
public getScannerResults_args setTscan(TScan tscan) {
this.tscan = tscan;
return this;
}
public void unsetTscan() {
this.tscan = null;
}
/** Returns true if field tscan is set (has been assigned a value) and false otherwise */
public boolean isSetTscan() {
return this.tscan != null;
}
public void setTscanIsSet(boolean value) {
if (!value) {
this.tscan = null;
}
}
/**
* number of rows to return
*/
public int getNumRows() {
return this.numRows;
}
/**
* number of rows to return
*/
public getScannerResults_args setNumRows(int numRows) {
this.numRows = numRows;
setNumRowsIsSet(true);
return this;
}
public void unsetNumRows() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMROWS_ISSET_ID);
}
/** Returns true if field numRows is set (has been assigned a value) and false otherwise */
public boolean isSetNumRows() {
return EncodingUtils.testBit(__isset_bitfield, __NUMROWS_ISSET_ID);
}
public void setNumRowsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMROWS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
}
break;
case TSCAN:
if (value == null) {
unsetTscan();
} else {
setTscan((TScan)value);
}
break;
case NUM_ROWS:
if (value == null) {
unsetNumRows();
} else {
setNumRows((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
case TSCAN:
return getTscan();
case NUM_ROWS:
return getNumRows();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
case TSCAN:
return isSetTscan();
case NUM_ROWS:
return isSetNumRows();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getScannerResults_args)
return this.equals((getScannerResults_args)that);
return false;
}
public boolean equals(getScannerResults_args that) {
if (that == null)
return false;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_tscan = true && this.isSetTscan();
boolean that_present_tscan = true && that.isSetTscan();
if (this_present_tscan || that_present_tscan) {
if (!(this_present_tscan && that_present_tscan))
return false;
if (!this.tscan.equals(that.tscan))
return false;
}
boolean this_present_numRows = true;
boolean that_present_numRows = true;
if (this_present_numRows || that_present_numRows) {
if (!(this_present_numRows && that_present_numRows))
return false;
if (this.numRows != that.numRows)
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
boolean present_tscan = true && (isSetTscan());
list.add(present_tscan);
if (present_tscan)
list.add(tscan);
boolean present_numRows = true;
list.add(present_numRows);
if (present_numRows)
list.add(numRows);
return list.hashCode();
}
@Override
public int compareTo(getScannerResults_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTscan()).compareTo(other.isSetTscan());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTscan()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tscan, other.tscan);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetNumRows()).compareTo(other.isSetNumRows());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNumRows()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numRows, other.numRows);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getScannerResults_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.table, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("tscan:");
if (this.tscan == null) {
sb.append("null");
} else {
sb.append(this.tscan);
}
first = false;
if (!first) sb.append(", ");
sb.append("numRows:");
sb.append(this.numRows);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (tscan == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tscan' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (tscan != null) {
tscan.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// 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 getScannerResults_argsStandardSchemeFactory implements SchemeFactory {
public getScannerResults_argsStandardScheme getScheme() {
return new getScannerResults_argsStandardScheme();
}
}
private static class getScannerResults_argsStandardScheme extends StandardScheme<getScannerResults_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getScannerResults_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: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TSCAN
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.tscan = new TScan();
struct.tscan.read(iprot);
struct.setTscanIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // NUM_ROWS
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.numRows = iprot.readI32();
struct.setNumRowsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getScannerResults_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeBinary(struct.table);
oprot.writeFieldEnd();
}
if (struct.tscan != null) {
oprot.writeFieldBegin(TSCAN_FIELD_DESC);
struct.tscan.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(NUM_ROWS_FIELD_DESC);
oprot.writeI32(struct.numRows);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getScannerResults_argsTupleSchemeFactory implements SchemeFactory {
public getScannerResults_argsTupleScheme getScheme() {
return new getScannerResults_argsTupleScheme();
}
}
private static class getScannerResults_argsTupleScheme extends TupleScheme<getScannerResults_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getScannerResults_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
struct.tscan.write(oprot);
BitSet optionals = new BitSet();
if (struct.isSetNumRows()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetNumRows()) {
oprot.writeI32(struct.numRows);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getScannerResults_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
struct.tscan = new TScan();
struct.tscan.read(iprot);
struct.setTscanIsSet(true);
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.numRows = iprot.readI32();
struct.setNumRowsIsSet(true);
}
}
}
}
public static class getScannerResults_result implements org.apache.thrift.TBase<getScannerResults_result, getScannerResults_result._Fields>, java.io.Serializable, Cloneable, Comparable<getScannerResults_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScannerResults_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.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getScannerResults_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getScannerResults_resultTupleSchemeFactory());
}
public List<TResult> success; // required
public TIOError io; // 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"),
IO((short)1, "io");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IO
return IO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResult.class))));
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScannerResults_result.class, metaDataMap);
}
public getScannerResults_result() {
}
public getScannerResults_result(
List<TResult> success,
TIOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getScannerResults_result(getScannerResults_result other) {
if (other.isSetSuccess()) {
List<TResult> __this__success = new ArrayList<TResult>(other.success.size());
for (TResult other_element : other.success) {
__this__success.add(new TResult(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
}
public getScannerResults_result deepCopy() {
return new getScannerResults_result(this);
}
@Override
public void clear() {
this.success = null;
this.io = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<TResult> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TResult elem) {
if (this.success == null) {
this.success = new ArrayList<TResult>();
}
this.success.add(elem);
}
public List<TResult> getSuccess() {
return this.success;
}
public getScannerResults_result setSuccess(List<TResult> success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public TIOError getIo() {
return this.io;
}
public getScannerResults_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((List<TResult>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case IO:
return getIo();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IO:
return isSetIo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getScannerResults_result)
return this.equals((getScannerResults_result)that);
return false;
}
public boolean equals(getScannerResults_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
return list.hashCode();
}
@Override
public int compareTo(getScannerResults_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getScannerResults_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getScannerResults_resultStandardSchemeFactory implements SchemeFactory {
public getScannerResults_resultStandardScheme getScheme() {
return new getScannerResults_resultStandardScheme();
}
}
private static class getScannerResults_resultStandardScheme extends StandardScheme<getScannerResults_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getScannerResults_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 _list180 = iprot.readListBegin();
struct.success = new ArrayList<TResult>(_list180.size);
TResult _elem181;
for (int _i182 = 0; _i182 < _list180.size; ++_i182)
{
_elem181 = new TResult();
_elem181.read(iprot);
struct.success.add(_elem181);
}
iprot.readListEnd();
}
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getScannerResults_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 (TResult _iter183 : struct.success)
{
_iter183.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getScannerResults_resultTupleSchemeFactory implements SchemeFactory {
public getScannerResults_resultTupleScheme getScheme() {
return new getScannerResults_resultTupleScheme();
}
}
private static class getScannerResults_resultTupleScheme extends TupleScheme<getScannerResults_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getScannerResults_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIo()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (TResult _iter184 : struct.success)
{
_iter184.write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getScannerResults_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list185 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TResult>(_list185.size);
TResult _elem186;
for (int _i187 = 0; _i187 < _list185.size; ++_i187)
{
_elem186 = new TResult();
_elem186.read(iprot);
struct.success.add(_elem186);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class getRegionLocation_args implements org.apache.thrift.TBase<getRegionLocation_args, getRegionLocation_args._Fields>, java.io.Serializable, Cloneable, Comparable<getRegionLocation_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRegionLocation_args");
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField RELOAD_FIELD_DESC = new org.apache.thrift.protocol.TField("reload", org.apache.thrift.protocol.TType.BOOL, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getRegionLocation_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRegionLocation_argsTupleSchemeFactory());
}
public ByteBuffer table; // required
public ByteBuffer row; // required
public boolean reload; // 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 {
TABLE((short)1, "table"),
ROW((short)2, "row"),
RELOAD((short)3, "reload");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
return TABLE;
case 2: // ROW
return ROW;
case 3: // RELOAD
return RELOAD;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __RELOAD_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.RELOAD, new org.apache.thrift.meta_data.FieldMetaData("reload", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRegionLocation_args.class, metaDataMap);
}
public getRegionLocation_args() {
}
public getRegionLocation_args(
ByteBuffer table,
ByteBuffer row,
boolean reload)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
this.reload = reload;
setReloadIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getRegionLocation_args(getRegionLocation_args other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetTable()) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
if (other.isSetRow()) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
}
this.reload = other.reload;
}
public getRegionLocation_args deepCopy() {
return new getRegionLocation_args(this);
}
@Override
public void clear() {
this.table = null;
this.row = null;
setReloadIsSet(false);
this.reload = false;
}
public byte[] getTable() {
setTable(org.apache.thrift.TBaseHelper.rightSize(table));
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
public getRegionLocation_args setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
return this;
}
public getRegionLocation_args setTable(ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
public byte[] getRow() {
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
return org.apache.thrift.TBaseHelper.copyBinary(row);
}
public getRegionLocation_args setRow(byte[] row) {
this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
return this;
}
public getRegionLocation_args setRow(ByteBuffer row) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
public void unsetRow() {
this.row = null;
}
/** Returns true if field row is set (has been assigned a value) and false otherwise */
public boolean isSetRow() {
return this.row != null;
}
public void setRowIsSet(boolean value) {
if (!value) {
this.row = null;
}
}
public boolean isReload() {
return this.reload;
}
public getRegionLocation_args setReload(boolean reload) {
this.reload = reload;
setReloadIsSet(true);
return this;
}
public void unsetReload() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RELOAD_ISSET_ID);
}
/** Returns true if field reload is set (has been assigned a value) and false otherwise */
public boolean isSetReload() {
return EncodingUtils.testBit(__isset_bitfield, __RELOAD_ISSET_ID);
}
public void setReloadIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RELOAD_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
}
break;
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
}
break;
case RELOAD:
if (value == null) {
unsetReload();
} else {
setReload((Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
case ROW:
return getRow();
case RELOAD:
return isReload();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
case ROW:
return isSetRow();
case RELOAD:
return isSetReload();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getRegionLocation_args)
return this.equals((getRegionLocation_args)that);
return false;
}
public boolean equals(getRegionLocation_args that) {
if (that == null)
return false;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_row = true && this.isSetRow();
boolean that_present_row = true && that.isSetRow();
if (this_present_row || that_present_row) {
if (!(this_present_row && that_present_row))
return false;
if (!this.row.equals(that.row))
return false;
}
boolean this_present_reload = true;
boolean that_present_reload = true;
if (this_present_reload || that_present_reload) {
if (!(this_present_reload && that_present_reload))
return false;
if (this.reload != that.reload)
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
boolean present_row = true && (isSetRow());
list.add(present_row);
if (present_row)
list.add(row);
boolean present_reload = true;
list.add(present_reload);
if (present_reload)
list.add(reload);
return list.hashCode();
}
@Override
public int compareTo(getRegionLocation_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, other.row);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetReload()).compareTo(other.isSetReload());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReload()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reload, other.reload);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getRegionLocation_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.table, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("row:");
if (this.row == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.row, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("reload:");
sb.append(this.reload);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (row == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'row' 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, 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 getRegionLocation_argsStandardSchemeFactory implements SchemeFactory {
public getRegionLocation_argsStandardScheme getScheme() {
return new getRegionLocation_argsStandardScheme();
}
}
private static class getRegionLocation_argsStandardScheme extends StandardScheme<getRegionLocation_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getRegionLocation_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: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // ROW
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // RELOAD
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.reload = iprot.readBool();
struct.setReloadIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getRegionLocation_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeBinary(struct.table);
oprot.writeFieldEnd();
}
if (struct.row != null) {
oprot.writeFieldBegin(ROW_FIELD_DESC);
oprot.writeBinary(struct.row);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(RELOAD_FIELD_DESC);
oprot.writeBool(struct.reload);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getRegionLocation_argsTupleSchemeFactory implements SchemeFactory {
public getRegionLocation_argsTupleScheme getScheme() {
return new getRegionLocation_argsTupleScheme();
}
}
private static class getRegionLocation_argsTupleScheme extends TupleScheme<getRegionLocation_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRegionLocation_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
oprot.writeBinary(struct.row);
BitSet optionals = new BitSet();
if (struct.isSetReload()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetReload()) {
oprot.writeBool(struct.reload);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRegionLocation_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.reload = iprot.readBool();
struct.setReloadIsSet(true);
}
}
}
}
public static class getRegionLocation_result implements org.apache.thrift.TBase<getRegionLocation_result, getRegionLocation_result._Fields>, java.io.Serializable, Cloneable, Comparable<getRegionLocation_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRegionLocation_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.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getRegionLocation_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRegionLocation_resultTupleSchemeFactory());
}
public THRegionLocation success; // required
public TIOError io; // 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"),
IO((short)1, "io");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IO
return IO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THRegionLocation.class)));
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRegionLocation_result.class, metaDataMap);
}
public getRegionLocation_result() {
}
public getRegionLocation_result(
THRegionLocation success,
TIOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getRegionLocation_result(getRegionLocation_result other) {
if (other.isSetSuccess()) {
this.success = new THRegionLocation(other.success);
}
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
}
public getRegionLocation_result deepCopy() {
return new getRegionLocation_result(this);
}
@Override
public void clear() {
this.success = null;
this.io = null;
}
public THRegionLocation getSuccess() {
return this.success;
}
public getRegionLocation_result setSuccess(THRegionLocation success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public TIOError getIo() {
return this.io;
}
public getRegionLocation_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((THRegionLocation)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case IO:
return getIo();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IO:
return isSetIo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getRegionLocation_result)
return this.equals((getRegionLocation_result)that);
return false;
}
public boolean equals(getRegionLocation_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
return list.hashCode();
}
@Override
public int compareTo(getRegionLocation_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getRegionLocation_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getRegionLocation_resultStandardSchemeFactory implements SchemeFactory {
public getRegionLocation_resultStandardScheme getScheme() {
return new getRegionLocation_resultStandardScheme();
}
}
private static class getRegionLocation_resultStandardScheme extends StandardScheme<getRegionLocation_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getRegionLocation_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 THRegionLocation();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getRegionLocation_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();
}
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getRegionLocation_resultTupleSchemeFactory implements SchemeFactory {
public getRegionLocation_resultTupleScheme getScheme() {
return new getRegionLocation_resultTupleScheme();
}
}
private static class getRegionLocation_resultTupleScheme extends TupleScheme<getRegionLocation_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRegionLocation_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIo()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRegionLocation_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new THRegionLocation();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class getAllRegionLocations_args implements org.apache.thrift.TBase<getAllRegionLocations_args, getAllRegionLocations_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllRegionLocations_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllRegionLocations_args");
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getAllRegionLocations_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getAllRegionLocations_argsTupleSchemeFactory());
}
public ByteBuffer table; // 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 {
TABLE((short)1, "table");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
return TABLE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllRegionLocations_args.class, metaDataMap);
}
public getAllRegionLocations_args() {
}
public getAllRegionLocations_args(
ByteBuffer table)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getAllRegionLocations_args(getAllRegionLocations_args other) {
if (other.isSetTable()) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
}
public getAllRegionLocations_args deepCopy() {
return new getAllRegionLocations_args(this);
}
@Override
public void clear() {
this.table = null;
}
public byte[] getTable() {
setTable(org.apache.thrift.TBaseHelper.rightSize(table));
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
public getAllRegionLocations_args setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
return this;
}
public getAllRegionLocations_args setTable(ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getAllRegionLocations_args)
return this.equals((getAllRegionLocations_args)that);
return false;
}
public boolean equals(getAllRegionLocations_args that) {
if (that == null)
return false;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
return list.hashCode();
}
@Override
public int compareTo(getAllRegionLocations_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getAllRegionLocations_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.table, sb);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' 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, 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 getAllRegionLocations_argsStandardSchemeFactory implements SchemeFactory {
public getAllRegionLocations_argsStandardScheme getScheme() {
return new getAllRegionLocations_argsStandardScheme();
}
}
private static class getAllRegionLocations_argsStandardScheme extends StandardScheme<getAllRegionLocations_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getAllRegionLocations_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: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getAllRegionLocations_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeBinary(struct.table);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getAllRegionLocations_argsTupleSchemeFactory implements SchemeFactory {
public getAllRegionLocations_argsTupleScheme getScheme() {
return new getAllRegionLocations_argsTupleScheme();
}
}
private static class getAllRegionLocations_argsTupleScheme extends TupleScheme<getAllRegionLocations_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAllRegionLocations_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAllRegionLocations_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
}
}
}
public static class getAllRegionLocations_result implements org.apache.thrift.TBase<getAllRegionLocations_result, getAllRegionLocations_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllRegionLocations_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllRegionLocations_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.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getAllRegionLocations_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getAllRegionLocations_resultTupleSchemeFactory());
}
public List<THRegionLocation> success; // required
public TIOError io; // 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"),
IO((short)1, "io");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IO
return IO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THRegionLocation.class))));
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllRegionLocations_result.class, metaDataMap);
}
public getAllRegionLocations_result() {
}
public getAllRegionLocations_result(
List<THRegionLocation> success,
TIOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getAllRegionLocations_result(getAllRegionLocations_result other) {
if (other.isSetSuccess()) {
List<THRegionLocation> __this__success = new ArrayList<THRegionLocation>(other.success.size());
for (THRegionLocation other_element : other.success) {
__this__success.add(new THRegionLocation(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
}
public getAllRegionLocations_result deepCopy() {
return new getAllRegionLocations_result(this);
}
@Override
public void clear() {
this.success = null;
this.io = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<THRegionLocation> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(THRegionLocation elem) {
if (this.success == null) {
this.success = new ArrayList<THRegionLocation>();
}
this.success.add(elem);
}
public List<THRegionLocation> getSuccess() {
return this.success;
}
public getAllRegionLocations_result setSuccess(List<THRegionLocation> success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public TIOError getIo() {
return this.io;
}
public getAllRegionLocations_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((List<THRegionLocation>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case IO:
return getIo();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IO:
return isSetIo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getAllRegionLocations_result)
return this.equals((getAllRegionLocations_result)that);
return false;
}
public boolean equals(getAllRegionLocations_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
return list.hashCode();
}
@Override
public int compareTo(getAllRegionLocations_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getAllRegionLocations_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getAllRegionLocations_resultStandardSchemeFactory implements SchemeFactory {
public getAllRegionLocations_resultStandardScheme getScheme() {
return new getAllRegionLocations_resultStandardScheme();
}
}
private static class getAllRegionLocations_resultStandardScheme extends StandardScheme<getAllRegionLocations_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getAllRegionLocations_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 _list188 = iprot.readListBegin();
struct.success = new ArrayList<THRegionLocation>(_list188.size);
THRegionLocation _elem189;
for (int _i190 = 0; _i190 < _list188.size; ++_i190)
{
_elem189 = new THRegionLocation();
_elem189.read(iprot);
struct.success.add(_elem189);
}
iprot.readListEnd();
}
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getAllRegionLocations_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 (THRegionLocation _iter191 : struct.success)
{
_iter191.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getAllRegionLocations_resultTupleSchemeFactory implements SchemeFactory {
public getAllRegionLocations_resultTupleScheme getScheme() {
return new getAllRegionLocations_resultTupleScheme();
}
}
private static class getAllRegionLocations_resultTupleScheme extends TupleScheme<getAllRegionLocations_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAllRegionLocations_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIo()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (THRegionLocation _iter192 : struct.success)
{
_iter192.write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAllRegionLocations_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list193 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<THRegionLocation>(_list193.size);
THRegionLocation _elem194;
for (int _i195 = 0; _i195 < _list193.size; ++_i195)
{
_elem194 = new THRegionLocation();
_elem194.read(iprot);
struct.success.add(_elem194);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class checkAndMutate_args implements org.apache.thrift.TBase<checkAndMutate_args, checkAndMutate_args._Fields>, java.io.Serializable, Cloneable, Comparable<checkAndMutate_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkAndMutate_args");
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField FAMILY_FIELD_DESC = new org.apache.thrift.protocol.TField("family", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("qualifier", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField COMPARE_OP_FIELD_DESC = new org.apache.thrift.protocol.TField("compareOp", org.apache.thrift.protocol.TType.I32, (short)5);
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)6);
private static final org.apache.thrift.protocol.TField ROW_MUTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("rowMutations", org.apache.thrift.protocol.TType.STRUCT, (short)7);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new checkAndMutate_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new checkAndMutate_argsTupleSchemeFactory());
}
/**
* to check in and delete from
*/
public ByteBuffer table; // required
/**
* row to check
*/
public ByteBuffer row; // required
/**
* column family to check
*/
public ByteBuffer family; // required
/**
* column qualifier to check
*/
public ByteBuffer qualifier; // required
/**
* comparison to make on the value
*
* @see TCompareOp
*/
public TCompareOp compareOp; // required
/**
* the expected value to be compared against, if not provided the
* check is for the non-existence of the column in question
*/
public ByteBuffer value; // required
/**
* row mutations to execute if the value matches
*/
public TRowMutations rowMutations; // 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 {
/**
* to check in and delete from
*/
TABLE((short)1, "table"),
/**
* row to check
*/
ROW((short)2, "row"),
/**
* column family to check
*/
FAMILY((short)3, "family"),
/**
* column qualifier to check
*/
QUALIFIER((short)4, "qualifier"),
/**
* comparison to make on the value
*
* @see TCompareOp
*/
COMPARE_OP((short)5, "compareOp"),
/**
* the expected value to be compared against, if not provided the
* check is for the non-existence of the column in question
*/
VALUE((short)6, "value"),
/**
* row mutations to execute if the value matches
*/
ROW_MUTATIONS((short)7, "rowMutations");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
return TABLE;
case 2: // ROW
return ROW;
case 3: // FAMILY
return FAMILY;
case 4: // QUALIFIER
return QUALIFIER;
case 5: // COMPARE_OP
return COMPARE_OP;
case 6: // VALUE
return VALUE;
case 7: // ROW_MUTATIONS
return ROW_MUTATIONS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.FAMILY, new org.apache.thrift.meta_data.FieldMetaData("family", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("qualifier", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.COMPARE_OP, new org.apache.thrift.meta_data.FieldMetaData("compareOp", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TCompareOp.class)));
tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.ROW_MUTATIONS, new org.apache.thrift.meta_data.FieldMetaData("rowMutations", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRowMutations.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkAndMutate_args.class, metaDataMap);
}
public checkAndMutate_args() {
}
public checkAndMutate_args(
ByteBuffer table,
ByteBuffer row,
ByteBuffer family,
ByteBuffer qualifier,
TCompareOp compareOp,
ByteBuffer value,
TRowMutations rowMutations)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
this.family = org.apache.thrift.TBaseHelper.copyBinary(family);
this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier);
this.compareOp = compareOp;
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
this.rowMutations = rowMutations;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public checkAndMutate_args(checkAndMutate_args other) {
if (other.isSetTable()) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
if (other.isSetRow()) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
}
if (other.isSetFamily()) {
this.family = org.apache.thrift.TBaseHelper.copyBinary(other.family);
}
if (other.isSetQualifier()) {
this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(other.qualifier);
}
if (other.isSetCompareOp()) {
this.compareOp = other.compareOp;
}
if (other.isSetValue()) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value);
}
if (other.isSetRowMutations()) {
this.rowMutations = new TRowMutations(other.rowMutations);
}
}
public checkAndMutate_args deepCopy() {
return new checkAndMutate_args(this);
}
@Override
public void clear() {
this.table = null;
this.row = null;
this.family = null;
this.qualifier = null;
this.compareOp = null;
this.value = null;
this.rowMutations = null;
}
/**
* to check in and delete from
*/
public byte[] getTable() {
setTable(org.apache.thrift.TBaseHelper.rightSize(table));
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
/**
* to check in and delete from
*/
public checkAndMutate_args setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
return this;
}
public checkAndMutate_args setTable(ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
/**
* row to check
*/
public byte[] getRow() {
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
return org.apache.thrift.TBaseHelper.copyBinary(row);
}
/**
* row to check
*/
public checkAndMutate_args setRow(byte[] row) {
this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
return this;
}
public checkAndMutate_args setRow(ByteBuffer row) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
public void unsetRow() {
this.row = null;
}
/** Returns true if field row is set (has been assigned a value) and false otherwise */
public boolean isSetRow() {
return this.row != null;
}
public void setRowIsSet(boolean value) {
if (!value) {
this.row = null;
}
}
/**
* column family to check
*/
public byte[] getFamily() {
setFamily(org.apache.thrift.TBaseHelper.rightSize(family));
return family == null ? null : family.array();
}
public ByteBuffer bufferForFamily() {
return org.apache.thrift.TBaseHelper.copyBinary(family);
}
/**
* column family to check
*/
public checkAndMutate_args setFamily(byte[] family) {
this.family = family == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(family, family.length));
return this;
}
public checkAndMutate_args setFamily(ByteBuffer family) {
this.family = org.apache.thrift.TBaseHelper.copyBinary(family);
return this;
}
public void unsetFamily() {
this.family = null;
}
/** Returns true if field family is set (has been assigned a value) and false otherwise */
public boolean isSetFamily() {
return this.family != null;
}
public void setFamilyIsSet(boolean value) {
if (!value) {
this.family = null;
}
}
/**
* column qualifier to check
*/
public byte[] getQualifier() {
setQualifier(org.apache.thrift.TBaseHelper.rightSize(qualifier));
return qualifier == null ? null : qualifier.array();
}
public ByteBuffer bufferForQualifier() {
return org.apache.thrift.TBaseHelper.copyBinary(qualifier);
}
/**
* column qualifier to check
*/
public checkAndMutate_args setQualifier(byte[] qualifier) {
this.qualifier = qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(qualifier, qualifier.length));
return this;
}
public checkAndMutate_args setQualifier(ByteBuffer qualifier) {
this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier);
return this;
}
public void unsetQualifier() {
this.qualifier = null;
}
/** Returns true if field qualifier is set (has been assigned a value) and false otherwise */
public boolean isSetQualifier() {
return this.qualifier != null;
}
public void setQualifierIsSet(boolean value) {
if (!value) {
this.qualifier = null;
}
}
/**
* comparison to make on the value
*
* @see TCompareOp
*/
public TCompareOp getCompareOp() {
return this.compareOp;
}
/**
* comparison to make on the value
*
* @see TCompareOp
*/
public checkAndMutate_args setCompareOp(TCompareOp compareOp) {
this.compareOp = compareOp;
return this;
}
public void unsetCompareOp() {
this.compareOp = null;
}
/** Returns true if field compareOp is set (has been assigned a value) and false otherwise */
public boolean isSetCompareOp() {
return this.compareOp != null;
}
public void setCompareOpIsSet(boolean value) {
if (!value) {
this.compareOp = null;
}
}
/**
* the expected value to be compared against, if not provided the
* check is for the non-existence of the column in question
*/
public byte[] getValue() {
setValue(org.apache.thrift.TBaseHelper.rightSize(value));
return value == null ? null : value.array();
}
public ByteBuffer bufferForValue() {
return org.apache.thrift.TBaseHelper.copyBinary(value);
}
/**
* the expected value to be compared against, if not provided the
* check is for the non-existence of the column in question
*/
public checkAndMutate_args setValue(byte[] value) {
this.value = value == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(value, value.length));
return this;
}
public checkAndMutate_args setValue(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;
}
}
/**
* row mutations to execute if the value matches
*/
public TRowMutations getRowMutations() {
return this.rowMutations;
}
/**
* row mutations to execute if the value matches
*/
public checkAndMutate_args setRowMutations(TRowMutations rowMutations) {
this.rowMutations = rowMutations;
return this;
}
public void unsetRowMutations() {
this.rowMutations = null;
}
/** Returns true if field rowMutations is set (has been assigned a value) and false otherwise */
public boolean isSetRowMutations() {
return this.rowMutations != null;
}
public void setRowMutationsIsSet(boolean value) {
if (!value) {
this.rowMutations = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
}
break;
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
}
break;
case FAMILY:
if (value == null) {
unsetFamily();
} else {
setFamily((ByteBuffer)value);
}
break;
case QUALIFIER:
if (value == null) {
unsetQualifier();
} else {
setQualifier((ByteBuffer)value);
}
break;
case COMPARE_OP:
if (value == null) {
unsetCompareOp();
} else {
setCompareOp((TCompareOp)value);
}
break;
case VALUE:
if (value == null) {
unsetValue();
} else {
setValue((ByteBuffer)value);
}
break;
case ROW_MUTATIONS:
if (value == null) {
unsetRowMutations();
} else {
setRowMutations((TRowMutations)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
case ROW:
return getRow();
case FAMILY:
return getFamily();
case QUALIFIER:
return getQualifier();
case COMPARE_OP:
return getCompareOp();
case VALUE:
return getValue();
case ROW_MUTATIONS:
return getRowMutations();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
case ROW:
return isSetRow();
case FAMILY:
return isSetFamily();
case QUALIFIER:
return isSetQualifier();
case COMPARE_OP:
return isSetCompareOp();
case VALUE:
return isSetValue();
case ROW_MUTATIONS:
return isSetRowMutations();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof checkAndMutate_args)
return this.equals((checkAndMutate_args)that);
return false;
}
public boolean equals(checkAndMutate_args that) {
if (that == null)
return false;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_row = true && this.isSetRow();
boolean that_present_row = true && that.isSetRow();
if (this_present_row || that_present_row) {
if (!(this_present_row && that_present_row))
return false;
if (!this.row.equals(that.row))
return false;
}
boolean this_present_family = true && this.isSetFamily();
boolean that_present_family = true && that.isSetFamily();
if (this_present_family || that_present_family) {
if (!(this_present_family && that_present_family))
return false;
if (!this.family.equals(that.family))
return false;
}
boolean this_present_qualifier = true && this.isSetQualifier();
boolean that_present_qualifier = true && that.isSetQualifier();
if (this_present_qualifier || that_present_qualifier) {
if (!(this_present_qualifier && that_present_qualifier))
return false;
if (!this.qualifier.equals(that.qualifier))
return false;
}
boolean this_present_compareOp = true && this.isSetCompareOp();
boolean that_present_compareOp = true && that.isSetCompareOp();
if (this_present_compareOp || that_present_compareOp) {
if (!(this_present_compareOp && that_present_compareOp))
return false;
if (!this.compareOp.equals(that.compareOp))
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;
}
boolean this_present_rowMutations = true && this.isSetRowMutations();
boolean that_present_rowMutations = true && that.isSetRowMutations();
if (this_present_rowMutations || that_present_rowMutations) {
if (!(this_present_rowMutations && that_present_rowMutations))
return false;
if (!this.rowMutations.equals(that.rowMutations))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
boolean present_row = true && (isSetRow());
list.add(present_row);
if (present_row)
list.add(row);
boolean present_family = true && (isSetFamily());
list.add(present_family);
if (present_family)
list.add(family);
boolean present_qualifier = true && (isSetQualifier());
list.add(present_qualifier);
if (present_qualifier)
list.add(qualifier);
boolean present_compareOp = true && (isSetCompareOp());
list.add(present_compareOp);
if (present_compareOp)
list.add(compareOp.getValue());
boolean present_value = true && (isSetValue());
list.add(present_value);
if (present_value)
list.add(value);
boolean present_rowMutations = true && (isSetRowMutations());
list.add(present_rowMutations);
if (present_rowMutations)
list.add(rowMutations);
return list.hashCode();
}
@Override
public int compareTo(checkAndMutate_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, other.row);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetFamily()).compareTo(other.isSetFamily());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFamily()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.family, other.family);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQualifier()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifier, other.qualifier);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCompareOp()).compareTo(other.isSetCompareOp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCompareOp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compareOp, other.compareOp);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetValue()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRowMutations()).compareTo(other.isSetRowMutations());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRowMutations()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rowMutations, other.rowMutations);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("checkAndMutate_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.table, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("row:");
if (this.row == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.row, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("family:");
if (this.family == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.family, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("qualifier:");
if (this.qualifier == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.qualifier, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("compareOp:");
if (this.compareOp == null) {
sb.append("null");
} else {
sb.append(this.compareOp);
}
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;
if (!first) sb.append(", ");
sb.append("rowMutations:");
if (this.rowMutations == null) {
sb.append("null");
} else {
sb.append(this.rowMutations);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (row == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'row' was not present! Struct: " + toString());
}
if (family == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'family' was not present! Struct: " + toString());
}
if (qualifier == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'qualifier' was not present! Struct: " + toString());
}
if (compareOp == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'compareOp' was not present! Struct: " + toString());
}
if (rowMutations == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'rowMutations' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (rowMutations != null) {
rowMutations.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class checkAndMutate_argsStandardSchemeFactory implements SchemeFactory {
public checkAndMutate_argsStandardScheme getScheme() {
return new checkAndMutate_argsStandardScheme();
}
}
private static class checkAndMutate_argsStandardScheme extends StandardScheme<checkAndMutate_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, checkAndMutate_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: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // ROW
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // FAMILY
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.family = iprot.readBinary();
struct.setFamilyIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // QUALIFIER
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.qualifier = iprot.readBinary();
struct.setQualifierIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // COMPARE_OP
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.compareOp = org.apache.hadoop.hbase.thrift2.generated.TCompareOp.findByValue(iprot.readI32());
struct.setCompareOpIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // 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;
case 7: // ROW_MUTATIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.rowMutations = new TRowMutations();
struct.rowMutations.read(iprot);
struct.setRowMutationsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, checkAndMutate_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeBinary(struct.table);
oprot.writeFieldEnd();
}
if (struct.row != null) {
oprot.writeFieldBegin(ROW_FIELD_DESC);
oprot.writeBinary(struct.row);
oprot.writeFieldEnd();
}
if (struct.family != null) {
oprot.writeFieldBegin(FAMILY_FIELD_DESC);
oprot.writeBinary(struct.family);
oprot.writeFieldEnd();
}
if (struct.qualifier != null) {
oprot.writeFieldBegin(QUALIFIER_FIELD_DESC);
oprot.writeBinary(struct.qualifier);
oprot.writeFieldEnd();
}
if (struct.compareOp != null) {
oprot.writeFieldBegin(COMPARE_OP_FIELD_DESC);
oprot.writeI32(struct.compareOp.getValue());
oprot.writeFieldEnd();
}
if (struct.value != null) {
oprot.writeFieldBegin(VALUE_FIELD_DESC);
oprot.writeBinary(struct.value);
oprot.writeFieldEnd();
}
if (struct.rowMutations != null) {
oprot.writeFieldBegin(ROW_MUTATIONS_FIELD_DESC);
struct.rowMutations.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class checkAndMutate_argsTupleSchemeFactory implements SchemeFactory {
public checkAndMutate_argsTupleScheme getScheme() {
return new checkAndMutate_argsTupleScheme();
}
}
private static class checkAndMutate_argsTupleScheme extends TupleScheme<checkAndMutate_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, checkAndMutate_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBinary(struct.table);
oprot.writeBinary(struct.row);
oprot.writeBinary(struct.family);
oprot.writeBinary(struct.qualifier);
oprot.writeI32(struct.compareOp.getValue());
struct.rowMutations.write(oprot);
BitSet optionals = new BitSet();
if (struct.isSetValue()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetValue()) {
oprot.writeBinary(struct.value);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, checkAndMutate_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
struct.family = iprot.readBinary();
struct.setFamilyIsSet(true);
struct.qualifier = iprot.readBinary();
struct.setQualifierIsSet(true);
struct.compareOp = org.apache.hadoop.hbase.thrift2.generated.TCompareOp.findByValue(iprot.readI32());
struct.setCompareOpIsSet(true);
struct.rowMutations = new TRowMutations();
struct.rowMutations.read(iprot);
struct.setRowMutationsIsSet(true);
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.value = iprot.readBinary();
struct.setValueIsSet(true);
}
}
}
}
public static class checkAndMutate_result implements org.apache.thrift.TBase<checkAndMutate_result, checkAndMutate_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkAndMutate_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkAndMutate_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.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new checkAndMutate_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new checkAndMutate_resultTupleSchemeFactory());
}
public boolean success; // required
public TIOError io; // 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"),
IO((short)1, "io");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // IO
return IO;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkAndMutate_result.class, metaDataMap);
}
public checkAndMutate_result() {
}
public checkAndMutate_result(
boolean success,
TIOError io)
{
this();
this.success = success;
setSuccessIsSet(true);
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public checkAndMutate_result(checkAndMutate_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetIo()) {
this.io = new TIOError(other.io);
}
}
public checkAndMutate_result deepCopy() {
return new checkAndMutate_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.io = null;
}
public boolean isSuccess() {
return this.success;
}
public checkAndMutate_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public TIOError getIo() {
return this.io;
}
public checkAndMutate_result setIo(TIOError io) {
this.io = io;
return this;
}
public void unsetIo() {
this.io = null;
}
/** Returns true if field io is set (has been assigned a value) and false otherwise */
public boolean isSetIo() {
return this.io != null;
}
public void setIoIsSet(boolean value) {
if (!value) {
this.io = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((TIOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case IO:
return getIo();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case IO:
return isSetIo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof checkAndMutate_result)
return this.equals((checkAndMutate_result)that);
return false;
}
public boolean equals(checkAndMutate_result that) {
if (that == null)
return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_io = true && this.isSetIo();
boolean that_present_io = true && that.isSetIo();
if (this_present_io || that_present_io) {
if (!(this_present_io && that_present_io))
return false;
if (!this.io.equals(that.io))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true;
list.add(present_success);
if (present_success)
list.add(success);
boolean present_io = true && (isSetIo());
list.add(present_io);
if (present_io)
list.add(io);
return list.hashCode();
}
@Override
public int compareTo(checkAndMutate_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("checkAndMutate_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("io:");
if (this.io == null) {
sb.append("null");
} else {
sb.append(this.io);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class checkAndMutate_resultStandardSchemeFactory implements SchemeFactory {
public checkAndMutate_resultStandardScheme getScheme() {
return new checkAndMutate_resultStandardScheme();
}
}
private static class checkAndMutate_resultStandardScheme extends StandardScheme<checkAndMutate_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, checkAndMutate_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;
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, checkAndMutate_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();
}
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class checkAndMutate_resultTupleSchemeFactory implements SchemeFactory {
public checkAndMutate_resultTupleScheme getScheme() {
return new checkAndMutate_resultTupleScheme();
}
}
private static class checkAndMutate_resultTupleScheme extends TupleScheme<checkAndMutate_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, checkAndMutate_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetIo()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, checkAndMutate_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new TIOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
}