Files
pinpoint/generated/Hbase.java
T
2012-06-26 08:04:46 +00:00

43587 lines
1.4 MiB
Plaintext

/**
* Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.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 java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class Hbase {
public interface Iface {
/**
* Brings a table on-line (enables it)
*
* @param tableName name of the table
*/
public void enableTable(ByteBuffer tableName) throws IOError, org.apache.thrift.TException;
/**
* Disables a table (takes it off-line) If it is being served, the master
* will tell the servers to stop serving it.
*
* @param tableName name of the table
*/
public void disableTable(ByteBuffer tableName) throws IOError, org.apache.thrift.TException;
/**
* @return true if table is on-line
*
* @param tableName name of the table to check
*/
public boolean isTableEnabled(ByteBuffer tableName) throws IOError, org.apache.thrift.TException;
public void compact(ByteBuffer tableNameOrRegionName) throws IOError, org.apache.thrift.TException;
public void majorCompact(ByteBuffer tableNameOrRegionName) throws IOError, org.apache.thrift.TException;
/**
* List all the userspace tables.
*
* @return returns a list of names
*/
public List<ByteBuffer> getTableNames() throws IOError, org.apache.thrift.TException;
/**
* List all the column families assoicated with a table.
*
* @return list of column family descriptors
*
* @param tableName table name
*/
public Map<ByteBuffer,ColumnDescriptor> getColumnDescriptors(ByteBuffer tableName) throws IOError, org.apache.thrift.TException;
/**
* List the regions associated with a table.
*
* @return list of region descriptors
*
* @param tableName table name
*/
public List<TRegionInfo> getTableRegions(ByteBuffer tableName) throws IOError, org.apache.thrift.TException;
/**
* Create a table with the specified column families. The name
* field for each ColumnDescriptor must be set and must end in a
* colon (:). All other fields are optional and will get default
* values if not explicitly specified.
*
* @throws IllegalArgument if an input parameter is invalid
*
* @throws AlreadyExists if the table name already exists
*
* @param tableName name of table to create
*
* @param columnFamilies list of column family descriptors
*/
public void createTable(ByteBuffer tableName, List<ColumnDescriptor> columnFamilies) throws IOError, IllegalArgument, AlreadyExists, org.apache.thrift.TException;
/**
* Deletes a table
*
* @throws IOError if table doesn't exist on server or there was some other
* problem
*
* @param tableName name of table to delete
*/
public void deleteTable(ByteBuffer tableName) throws IOError, org.apache.thrift.TException;
/**
* Get a single TCell for the specified table, row, and column at the
* latest timestamp. Returns an empty list if no such value exists.
*
* @return value for specified row/column
*
* @param tableName name of table
*
* @param row row key
*
* @param column column name
*/
public List<TCell> get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column) throws IOError, org.apache.thrift.TException;
/**
* Get the specified number of versions for the specified table,
* row, and column.
*
* @return list of cells for specified row/column
*
* @param tableName name of table
*
* @param row row key
*
* @param column column name
*
* @param numVersions number of versions to retrieve
*/
public List<TCell> getVer(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions) throws IOError, org.apache.thrift.TException;
/**
* Get the specified number of versions for the specified table,
* row, and column. Only versions less than or equal to the specified
* timestamp will be returned.
*
* @return list of cells for specified row/column
*
* @param tableName name of table
*
* @param row row key
*
* @param column column name
*
* @param timestamp timestamp
*
* @param numVersions number of versions to retrieve
*/
public List<TCell> getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions) throws IOError, org.apache.thrift.TException;
/**
* Get all the data for the specified table and row at the latest
* timestamp. Returns an empty list if the row does not exist.
*
* @return TRowResult containing the row and map of columns to TCells
*
* @param tableName name of table
*
* @param row row key
*/
public List<TRowResult> getRow(ByteBuffer tableName, ByteBuffer row) throws IOError, org.apache.thrift.TException;
/**
* Get the specified columns for the specified table and row at the latest
* timestamp. Returns an empty list if the row does not exist.
*
* @return TRowResult containing the row and map of columns to TCells
*
* @param tableName name of table
*
* @param row row key
*
* @param columns List of columns to return, null for all columns
*/
public List<TRowResult> getRowWithColumns(ByteBuffer tableName, ByteBuffer row, List<ByteBuffer> columns) throws IOError, org.apache.thrift.TException;
/**
* Get all the data for the specified table and row at the specified
* timestamp. Returns an empty list if the row does not exist.
*
* @return TRowResult containing the row and map of columns to TCells
*
* @param tableName name of the table
*
* @param row row key
*
* @param timestamp timestamp
*/
public List<TRowResult> getRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp) throws IOError, org.apache.thrift.TException;
/**
* Get the specified columns for the specified table and row at the specified
* timestamp. Returns an empty list if the row does not exist.
*
* @return TRowResult containing the row and map of columns to TCells
*
* @param tableName name of table
*
* @param row row key
*
* @param columns List of columns to return, null for all columns
*
* @param timestamp
*/
public List<TRowResult> getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, List<ByteBuffer> columns, long timestamp) throws IOError, org.apache.thrift.TException;
/**
* Get all the data for the specified table and rows at the latest
* timestamp. Returns an empty list if no rows exist.
*
* @return TRowResult containing the rows and map of columns to TCells
*
* @param tableName name of table
*
* @param rows row keys
*/
public List<TRowResult> getRows(ByteBuffer tableName, List<ByteBuffer> rows) throws IOError, org.apache.thrift.TException;
/**
* Get the specified columns for the specified table and rows at the latest
* timestamp. Returns an empty list if no rows exist.
*
* @return TRowResult containing the rows and map of columns to TCells
*
* @param tableName name of table
*
* @param rows row keys
*
* @param columns List of columns to return, null for all columns
*/
public List<TRowResult> getRowsWithColumns(ByteBuffer tableName, List<ByteBuffer> rows, List<ByteBuffer> columns) throws IOError, org.apache.thrift.TException;
/**
* Get all the data for the specified table and rows at the specified
* timestamp. Returns an empty list if no rows exist.
*
* @return TRowResult containing the rows and map of columns to TCells
*
* @param tableName name of the table
*
* @param rows row keys
*
* @param timestamp timestamp
*/
public List<TRowResult> getRowsTs(ByteBuffer tableName, List<ByteBuffer> rows, long timestamp) throws IOError, org.apache.thrift.TException;
/**
* Get the specified columns for the specified table and rows at the specified
* timestamp. Returns an empty list if no rows exist.
*
* @return TRowResult containing the rows and map of columns to TCells
*
* @param tableName name of table
*
* @param rows row keys
*
* @param columns List of columns to return, null for all columns
*
* @param timestamp
*/
public List<TRowResult> getRowsWithColumnsTs(ByteBuffer tableName, List<ByteBuffer> rows, List<ByteBuffer> columns, long timestamp) throws IOError, org.apache.thrift.TException;
/**
* Apply a series of mutations (updates/deletes) to a row in a
* single transaction. If an exception is thrown, then the
* transaction is aborted. Default current timestamp is used, and
* all entries will have an identical timestamp.
*
* @param tableName name of table
*
* @param row row key
*
* @param mutations list of mutation commands
*/
public void mutateRow(ByteBuffer tableName, ByteBuffer row, List<Mutation> mutations) throws IOError, IllegalArgument, org.apache.thrift.TException;
/**
* Apply a series of mutations (updates/deletes) to a row in a
* single transaction. If an exception is thrown, then the
* transaction is aborted. The specified timestamp is used, and
* all entries will have an identical timestamp.
*
* @param tableName name of table
*
* @param row row key
*
* @param mutations list of mutation commands
*
* @param timestamp timestamp
*/
public void mutateRowTs(ByteBuffer tableName, ByteBuffer row, List<Mutation> mutations, long timestamp) throws IOError, IllegalArgument, org.apache.thrift.TException;
/**
* Apply a series of batches (each a series of mutations on a single row)
* in a single transaction. If an exception is thrown, then the
* transaction is aborted. Default current timestamp is used, and
* all entries will have an identical timestamp.
*
* @param tableName name of table
*
* @param rowBatches list of row batches
*/
public void mutateRows(ByteBuffer tableName, List<BatchMutation> rowBatches) throws IOError, IllegalArgument, org.apache.thrift.TException;
/**
* Apply a series of batches (each a series of mutations on a single row)
* in a single transaction. If an exception is thrown, then the
* transaction is aborted. The specified timestamp is used, and
* all entries will have an identical timestamp.
*
* @param tableName name of table
*
* @param rowBatches list of row batches
*
* @param timestamp timestamp
*/
public void mutateRowsTs(ByteBuffer tableName, List<BatchMutation> rowBatches, long timestamp) throws IOError, IllegalArgument, org.apache.thrift.TException;
/**
* Atomically increment the column value specified. Returns the next value post increment.
*
* @param tableName name of table
*
* @param row row to increment
*
* @param column name of column
*
* @param value amount to increment by
*/
public long atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value) throws IOError, IllegalArgument, org.apache.thrift.TException;
/**
* Delete all cells that match the passed row and column.
*
* @param tableName name of table
*
* @param row Row to update
*
* @param column name of column whose value is to be deleted
*/
public void deleteAll(ByteBuffer tableName, ByteBuffer row, ByteBuffer column) throws IOError, org.apache.thrift.TException;
/**
* Delete all cells that match the passed row and column and whose
* timestamp is equal-to or older than the passed timestamp.
*
* @param tableName name of table
*
* @param row Row to update
*
* @param column name of column whose value is to be deleted
*
* @param timestamp timestamp
*/
public void deleteAllTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp) throws IOError, org.apache.thrift.TException;
/**
* Completely delete the row's cells.
*
* @param tableName name of table
*
* @param row key of the row to be completely deleted.
*/
public void deleteAllRow(ByteBuffer tableName, ByteBuffer row) throws IOError, org.apache.thrift.TException;
/**
* Completely delete the row's cells marked with a timestamp
* equal-to or older than the passed timestamp.
*
* @param tableName name of table
*
* @param row key of the row to be completely deleted.
*
* @param timestamp timestamp
*/
public void deleteAllRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp) throws IOError, org.apache.thrift.TException;
/**
* Get a scanner on the current table starting at the specified row and
* ending at the last row in the table. Return the specified columns.
*
* @return scanner id to be used with other scanner procedures
*
* @param tableName name of table
*
* @param startRow Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*
* @param columns columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*/
public int scannerOpen(ByteBuffer tableName, ByteBuffer startRow, List<ByteBuffer> columns) throws IOError, org.apache.thrift.TException;
/**
* Get a scanner on the current table starting and stopping at the
* specified rows. ending at the last row in the table. Return the
* specified columns.
*
* @return scanner id to be used with other scanner procedures
*
* @param tableName name of table
*
* @param startRow Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*
* @param stopRow row to stop scanning on. This row is *not* included in the
* scanner's results
*
* @param columns columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*/
public int scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List<ByteBuffer> columns) throws IOError, org.apache.thrift.TException;
/**
* Open a scanner for a given prefix. That is all rows will have the specified
* prefix. No other rows will be returned.
*
* @return scanner id to use with other scanner calls
*
* @param tableName name of table
*
* @param startAndPrefix the prefix (and thus start row) of the keys you want
*
* @param columns the columns you want returned
*/
public int scannerOpenWithPrefix(ByteBuffer tableName, ByteBuffer startAndPrefix, List<ByteBuffer> columns) throws IOError, org.apache.thrift.TException;
/**
* Get a scanner on the current table starting at the specified row and
* ending at the last row in the table. Return the specified columns.
* Only values with the specified timestamp are returned.
*
* @return scanner id to be used with other scanner procedures
*
* @param tableName name of table
*
* @param startRow Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*
* @param columns columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*
* @param timestamp timestamp
*/
public int scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, List<ByteBuffer> columns, long timestamp) throws IOError, org.apache.thrift.TException;
/**
* Get a scanner on the current table starting and stopping at the
* specified rows. ending at the last row in the table. Return the
* specified columns. Only values with the specified timestamp are
* returned.
*
* @return scanner id to be used with other scanner procedures
*
* @param tableName name of table
*
* @param startRow Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*
* @param stopRow row to stop scanning on. This row is *not* included in the
* scanner's results
*
* @param columns columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*
* @param timestamp timestamp
*/
public int scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List<ByteBuffer> columns, long timestamp) throws IOError, org.apache.thrift.TException;
/**
* Returns the scanner's current row value and advances to the next
* row in the table. When there are no more rows in the table, or a key
* greater-than-or-equal-to the scanner's specified stopRow is reached,
* an empty list is returned.
*
* @return a TRowResult containing the current row and a map of the columns to TCells.
*
* @throws IllegalArgument if ScannerID is invalid
*
* @throws NotFound when the scanner reaches the end
*
* @param id id of a scanner returned by scannerOpen
*/
public List<TRowResult> scannerGet(int id) throws IOError, IllegalArgument, org.apache.thrift.TException;
/**
* Returns, starting at the scanner's current row value nbRows worth of
* rows and advances to the next row in the table. When there are no more
* rows in the table, or a key greater-than-or-equal-to the scanner's
* specified stopRow is reached, an empty list is returned.
*
* @return a TRowResult containing the current row and a map of the columns to TCells.
*
* @throws IllegalArgument if ScannerID is invalid
*
* @throws NotFound when the scanner reaches the end
*
* @param id id of a scanner returned by scannerOpen
*
* @param nbRows number of results to return
*/
public List<TRowResult> scannerGetList(int id, int nbRows) throws IOError, IllegalArgument, org.apache.thrift.TException;
/**
* Closes the server-state associated with an open scanner.
*
* @throws IllegalArgument if ScannerID is invalid
*
* @param id id of a scanner returned by scannerOpen
*/
public void scannerClose(int id) throws IOError, IllegalArgument, org.apache.thrift.TException;
}
public interface AsyncIface {
public void enableTable(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.enableTable_call> resultHandler) throws org.apache.thrift.TException;
public void disableTable(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.disableTable_call> resultHandler) throws org.apache.thrift.TException;
public void isTableEnabled(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isTableEnabled_call> resultHandler) throws org.apache.thrift.TException;
public void compact(ByteBuffer tableNameOrRegionName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.compact_call> resultHandler) throws org.apache.thrift.TException;
public void majorCompact(ByteBuffer tableNameOrRegionName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.majorCompact_call> resultHandler) throws org.apache.thrift.TException;
public void getTableNames(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getTableNames_call> resultHandler) throws org.apache.thrift.TException;
public void getColumnDescriptors(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getColumnDescriptors_call> resultHandler) throws org.apache.thrift.TException;
public void getTableRegions(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getTableRegions_call> resultHandler) throws org.apache.thrift.TException;
public void createTable(ByteBuffer tableName, List<ColumnDescriptor> columnFamilies, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createTable_call> resultHandler) throws org.apache.thrift.TException;
public void deleteTable(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteTable_call> resultHandler) throws org.apache.thrift.TException;
public void get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_call> resultHandler) throws org.apache.thrift.TException;
public void getVer(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getVer_call> resultHandler) throws org.apache.thrift.TException;
public void getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getVerTs_call> resultHandler) throws org.apache.thrift.TException;
public void getRow(ByteBuffer tableName, ByteBuffer row, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRow_call> resultHandler) throws org.apache.thrift.TException;
public void getRowWithColumns(ByteBuffer tableName, ByteBuffer row, List<ByteBuffer> columns, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRowWithColumns_call> resultHandler) throws org.apache.thrift.TException;
public void getRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRowTs_call> resultHandler) throws org.apache.thrift.TException;
public void getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, List<ByteBuffer> columns, long timestamp, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRowWithColumnsTs_call> resultHandler) throws org.apache.thrift.TException;
public void getRows(ByteBuffer tableName, List<ByteBuffer> rows, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRows_call> resultHandler) throws org.apache.thrift.TException;
public void getRowsWithColumns(ByteBuffer tableName, List<ByteBuffer> rows, List<ByteBuffer> columns, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRowsWithColumns_call> resultHandler) throws org.apache.thrift.TException;
public void getRowsTs(ByteBuffer tableName, List<ByteBuffer> rows, long timestamp, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRowsTs_call> resultHandler) throws org.apache.thrift.TException;
public void getRowsWithColumnsTs(ByteBuffer tableName, List<ByteBuffer> rows, List<ByteBuffer> columns, long timestamp, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRowsWithColumnsTs_call> resultHandler) throws org.apache.thrift.TException;
public void mutateRow(ByteBuffer tableName, ByteBuffer row, List<Mutation> mutations, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.mutateRow_call> resultHandler) throws org.apache.thrift.TException;
public void mutateRowTs(ByteBuffer tableName, ByteBuffer row, List<Mutation> mutations, long timestamp, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.mutateRowTs_call> resultHandler) throws org.apache.thrift.TException;
public void mutateRows(ByteBuffer tableName, List<BatchMutation> rowBatches, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.mutateRows_call> resultHandler) throws org.apache.thrift.TException;
public void mutateRowsTs(ByteBuffer tableName, List<BatchMutation> rowBatches, long timestamp, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.mutateRowsTs_call> resultHandler) throws org.apache.thrift.TException;
public void atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.atomicIncrement_call> resultHandler) throws org.apache.thrift.TException;
public void deleteAll(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteAll_call> resultHandler) throws org.apache.thrift.TException;
public void deleteAllTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteAllTs_call> resultHandler) throws org.apache.thrift.TException;
public void deleteAllRow(ByteBuffer tableName, ByteBuffer row, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteAllRow_call> resultHandler) throws org.apache.thrift.TException;
public void deleteAllRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteAllRowTs_call> resultHandler) throws org.apache.thrift.TException;
public void scannerOpen(ByteBuffer tableName, ByteBuffer startRow, List<ByteBuffer> columns, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scannerOpen_call> resultHandler) throws org.apache.thrift.TException;
public void scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List<ByteBuffer> columns, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scannerOpenWithStop_call> resultHandler) throws org.apache.thrift.TException;
public void scannerOpenWithPrefix(ByteBuffer tableName, ByteBuffer startAndPrefix, List<ByteBuffer> columns, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scannerOpenWithPrefix_call> resultHandler) throws org.apache.thrift.TException;
public void scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, List<ByteBuffer> columns, long timestamp, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scannerOpenTs_call> resultHandler) throws org.apache.thrift.TException;
public void scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List<ByteBuffer> columns, long timestamp, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scannerOpenWithStopTs_call> resultHandler) throws org.apache.thrift.TException;
public void scannerGet(int id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scannerGet_call> resultHandler) throws org.apache.thrift.TException;
public void scannerGetList(int id, int nbRows, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scannerGetList_call> resultHandler) throws org.apache.thrift.TException;
public void scannerClose(int id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scannerClose_call> resultHandler) throws org.apache.thrift.TException;
}
public static class Client extends org.apache.thrift.TServiceClient implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
return new Client(prot);
}
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(org.apache.thrift.protocol.TProtocol prot)
{
super(prot, prot);
}
public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
super(iprot, oprot);
}
public void enableTable(ByteBuffer tableName) throws IOError, org.apache.thrift.TException
{
send_enableTable(tableName);
recv_enableTable();
}
public void send_enableTable(ByteBuffer tableName) throws org.apache.thrift.TException
{
enableTable_args args = new enableTable_args();
args.setTableName(tableName);
sendBase("enableTable", args);
}
public void recv_enableTable() throws IOError, org.apache.thrift.TException
{
enableTable_result result = new enableTable_result();
receiveBase(result, "enableTable");
if (result.io != null) {
throw result.io;
}
return;
}
public void disableTable(ByteBuffer tableName) throws IOError, org.apache.thrift.TException
{
send_disableTable(tableName);
recv_disableTable();
}
public void send_disableTable(ByteBuffer tableName) throws org.apache.thrift.TException
{
disableTable_args args = new disableTable_args();
args.setTableName(tableName);
sendBase("disableTable", args);
}
public void recv_disableTable() throws IOError, org.apache.thrift.TException
{
disableTable_result result = new disableTable_result();
receiveBase(result, "disableTable");
if (result.io != null) {
throw result.io;
}
return;
}
public boolean isTableEnabled(ByteBuffer tableName) throws IOError, org.apache.thrift.TException
{
send_isTableEnabled(tableName);
return recv_isTableEnabled();
}
public void send_isTableEnabled(ByteBuffer tableName) throws org.apache.thrift.TException
{
isTableEnabled_args args = new isTableEnabled_args();
args.setTableName(tableName);
sendBase("isTableEnabled", args);
}
public boolean recv_isTableEnabled() throws IOError, org.apache.thrift.TException
{
isTableEnabled_result result = new isTableEnabled_result();
receiveBase(result, "isTableEnabled");
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, "isTableEnabled failed: unknown result");
}
public void compact(ByteBuffer tableNameOrRegionName) throws IOError, org.apache.thrift.TException
{
send_compact(tableNameOrRegionName);
recv_compact();
}
public void send_compact(ByteBuffer tableNameOrRegionName) throws org.apache.thrift.TException
{
compact_args args = new compact_args();
args.setTableNameOrRegionName(tableNameOrRegionName);
sendBase("compact", args);
}
public void recv_compact() throws IOError, org.apache.thrift.TException
{
compact_result result = new compact_result();
receiveBase(result, "compact");
if (result.io != null) {
throw result.io;
}
return;
}
public void majorCompact(ByteBuffer tableNameOrRegionName) throws IOError, org.apache.thrift.TException
{
send_majorCompact(tableNameOrRegionName);
recv_majorCompact();
}
public void send_majorCompact(ByteBuffer tableNameOrRegionName) throws org.apache.thrift.TException
{
majorCompact_args args = new majorCompact_args();
args.setTableNameOrRegionName(tableNameOrRegionName);
sendBase("majorCompact", args);
}
public void recv_majorCompact() throws IOError, org.apache.thrift.TException
{
majorCompact_result result = new majorCompact_result();
receiveBase(result, "majorCompact");
if (result.io != null) {
throw result.io;
}
return;
}
public List<ByteBuffer> getTableNames() throws IOError, org.apache.thrift.TException
{
send_getTableNames();
return recv_getTableNames();
}
public void send_getTableNames() throws org.apache.thrift.TException
{
getTableNames_args args = new getTableNames_args();
sendBase("getTableNames", args);
}
public List<ByteBuffer> recv_getTableNames() throws IOError, org.apache.thrift.TException
{
getTableNames_result result = new getTableNames_result();
receiveBase(result, "getTableNames");
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, "getTableNames failed: unknown result");
}
public Map<ByteBuffer,ColumnDescriptor> getColumnDescriptors(ByteBuffer tableName) throws IOError, org.apache.thrift.TException
{
send_getColumnDescriptors(tableName);
return recv_getColumnDescriptors();
}
public void send_getColumnDescriptors(ByteBuffer tableName) throws org.apache.thrift.TException
{
getColumnDescriptors_args args = new getColumnDescriptors_args();
args.setTableName(tableName);
sendBase("getColumnDescriptors", args);
}
public Map<ByteBuffer,ColumnDescriptor> recv_getColumnDescriptors() throws IOError, org.apache.thrift.TException
{
getColumnDescriptors_result result = new getColumnDescriptors_result();
receiveBase(result, "getColumnDescriptors");
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, "getColumnDescriptors failed: unknown result");
}
public List<TRegionInfo> getTableRegions(ByteBuffer tableName) throws IOError, org.apache.thrift.TException
{
send_getTableRegions(tableName);
return recv_getTableRegions();
}
public void send_getTableRegions(ByteBuffer tableName) throws org.apache.thrift.TException
{
getTableRegions_args args = new getTableRegions_args();
args.setTableName(tableName);
sendBase("getTableRegions", args);
}
public List<TRegionInfo> recv_getTableRegions() throws IOError, org.apache.thrift.TException
{
getTableRegions_result result = new getTableRegions_result();
receiveBase(result, "getTableRegions");
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, "getTableRegions failed: unknown result");
}
public void createTable(ByteBuffer tableName, List<ColumnDescriptor> columnFamilies) throws IOError, IllegalArgument, AlreadyExists, org.apache.thrift.TException
{
send_createTable(tableName, columnFamilies);
recv_createTable();
}
public void send_createTable(ByteBuffer tableName, List<ColumnDescriptor> columnFamilies) throws org.apache.thrift.TException
{
createTable_args args = new createTable_args();
args.setTableName(tableName);
args.setColumnFamilies(columnFamilies);
sendBase("createTable", args);
}
public void recv_createTable() throws IOError, IllegalArgument, AlreadyExists, org.apache.thrift.TException
{
createTable_result result = new createTable_result();
receiveBase(result, "createTable");
if (result.io != null) {
throw result.io;
}
if (result.ia != null) {
throw result.ia;
}
if (result.exist != null) {
throw result.exist;
}
return;
}
public void deleteTable(ByteBuffer tableName) throws IOError, org.apache.thrift.TException
{
send_deleteTable(tableName);
recv_deleteTable();
}
public void send_deleteTable(ByteBuffer tableName) throws org.apache.thrift.TException
{
deleteTable_args args = new deleteTable_args();
args.setTableName(tableName);
sendBase("deleteTable", args);
}
public void recv_deleteTable() throws IOError, org.apache.thrift.TException
{
deleteTable_result result = new deleteTable_result();
receiveBase(result, "deleteTable");
if (result.io != null) {
throw result.io;
}
return;
}
public List<TCell> get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column) throws IOError, org.apache.thrift.TException
{
send_get(tableName, row, column);
return recv_get();
}
public void send_get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column) throws org.apache.thrift.TException
{
get_args args = new get_args();
args.setTableName(tableName);
args.setRow(row);
args.setColumn(column);
sendBase("get", args);
}
public List<TCell> recv_get() throws IOError, 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<TCell> getVer(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions) throws IOError, org.apache.thrift.TException
{
send_getVer(tableName, row, column, numVersions);
return recv_getVer();
}
public void send_getVer(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions) throws org.apache.thrift.TException
{
getVer_args args = new getVer_args();
args.setTableName(tableName);
args.setRow(row);
args.setColumn(column);
args.setNumVersions(numVersions);
sendBase("getVer", args);
}
public List<TCell> recv_getVer() throws IOError, org.apache.thrift.TException
{
getVer_result result = new getVer_result();
receiveBase(result, "getVer");
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, "getVer failed: unknown result");
}
public List<TCell> getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions) throws IOError, org.apache.thrift.TException
{
send_getVerTs(tableName, row, column, timestamp, numVersions);
return recv_getVerTs();
}
public void send_getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions) throws org.apache.thrift.TException
{
getVerTs_args args = new getVerTs_args();
args.setTableName(tableName);
args.setRow(row);
args.setColumn(column);
args.setTimestamp(timestamp);
args.setNumVersions(numVersions);
sendBase("getVerTs", args);
}
public List<TCell> recv_getVerTs() throws IOError, org.apache.thrift.TException
{
getVerTs_result result = new getVerTs_result();
receiveBase(result, "getVerTs");
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, "getVerTs failed: unknown result");
}
public List<TRowResult> getRow(ByteBuffer tableName, ByteBuffer row) throws IOError, org.apache.thrift.TException
{
send_getRow(tableName, row);
return recv_getRow();
}
public void send_getRow(ByteBuffer tableName, ByteBuffer row) throws org.apache.thrift.TException
{
getRow_args args = new getRow_args();
args.setTableName(tableName);
args.setRow(row);
sendBase("getRow", args);
}
public List<TRowResult> recv_getRow() throws IOError, org.apache.thrift.TException
{
getRow_result result = new getRow_result();
receiveBase(result, "getRow");
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, "getRow failed: unknown result");
}
public List<TRowResult> getRowWithColumns(ByteBuffer tableName, ByteBuffer row, List<ByteBuffer> columns) throws IOError, org.apache.thrift.TException
{
send_getRowWithColumns(tableName, row, columns);
return recv_getRowWithColumns();
}
public void send_getRowWithColumns(ByteBuffer tableName, ByteBuffer row, List<ByteBuffer> columns) throws org.apache.thrift.TException
{
getRowWithColumns_args args = new getRowWithColumns_args();
args.setTableName(tableName);
args.setRow(row);
args.setColumns(columns);
sendBase("getRowWithColumns", args);
}
public List<TRowResult> recv_getRowWithColumns() throws IOError, org.apache.thrift.TException
{
getRowWithColumns_result result = new getRowWithColumns_result();
receiveBase(result, "getRowWithColumns");
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, "getRowWithColumns failed: unknown result");
}
public List<TRowResult> getRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp) throws IOError, org.apache.thrift.TException
{
send_getRowTs(tableName, row, timestamp);
return recv_getRowTs();
}
public void send_getRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp) throws org.apache.thrift.TException
{
getRowTs_args args = new getRowTs_args();
args.setTableName(tableName);
args.setRow(row);
args.setTimestamp(timestamp);
sendBase("getRowTs", args);
}
public List<TRowResult> recv_getRowTs() throws IOError, org.apache.thrift.TException
{
getRowTs_result result = new getRowTs_result();
receiveBase(result, "getRowTs");
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, "getRowTs failed: unknown result");
}
public List<TRowResult> getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, List<ByteBuffer> columns, long timestamp) throws IOError, org.apache.thrift.TException
{
send_getRowWithColumnsTs(tableName, row, columns, timestamp);
return recv_getRowWithColumnsTs();
}
public void send_getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, List<ByteBuffer> columns, long timestamp) throws org.apache.thrift.TException
{
getRowWithColumnsTs_args args = new getRowWithColumnsTs_args();
args.setTableName(tableName);
args.setRow(row);
args.setColumns(columns);
args.setTimestamp(timestamp);
sendBase("getRowWithColumnsTs", args);
}
public List<TRowResult> recv_getRowWithColumnsTs() throws IOError, org.apache.thrift.TException
{
getRowWithColumnsTs_result result = new getRowWithColumnsTs_result();
receiveBase(result, "getRowWithColumnsTs");
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, "getRowWithColumnsTs failed: unknown result");
}
public List<TRowResult> getRows(ByteBuffer tableName, List<ByteBuffer> rows) throws IOError, org.apache.thrift.TException
{
send_getRows(tableName, rows);
return recv_getRows();
}
public void send_getRows(ByteBuffer tableName, List<ByteBuffer> rows) throws org.apache.thrift.TException
{
getRows_args args = new getRows_args();
args.setTableName(tableName);
args.setRows(rows);
sendBase("getRows", args);
}
public List<TRowResult> recv_getRows() throws IOError, org.apache.thrift.TException
{
getRows_result result = new getRows_result();
receiveBase(result, "getRows");
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, "getRows failed: unknown result");
}
public List<TRowResult> getRowsWithColumns(ByteBuffer tableName, List<ByteBuffer> rows, List<ByteBuffer> columns) throws IOError, org.apache.thrift.TException
{
send_getRowsWithColumns(tableName, rows, columns);
return recv_getRowsWithColumns();
}
public void send_getRowsWithColumns(ByteBuffer tableName, List<ByteBuffer> rows, List<ByteBuffer> columns) throws org.apache.thrift.TException
{
getRowsWithColumns_args args = new getRowsWithColumns_args();
args.setTableName(tableName);
args.setRows(rows);
args.setColumns(columns);
sendBase("getRowsWithColumns", args);
}
public List<TRowResult> recv_getRowsWithColumns() throws IOError, org.apache.thrift.TException
{
getRowsWithColumns_result result = new getRowsWithColumns_result();
receiveBase(result, "getRowsWithColumns");
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, "getRowsWithColumns failed: unknown result");
}
public List<TRowResult> getRowsTs(ByteBuffer tableName, List<ByteBuffer> rows, long timestamp) throws IOError, org.apache.thrift.TException
{
send_getRowsTs(tableName, rows, timestamp);
return recv_getRowsTs();
}
public void send_getRowsTs(ByteBuffer tableName, List<ByteBuffer> rows, long timestamp) throws org.apache.thrift.TException
{
getRowsTs_args args = new getRowsTs_args();
args.setTableName(tableName);
args.setRows(rows);
args.setTimestamp(timestamp);
sendBase("getRowsTs", args);
}
public List<TRowResult> recv_getRowsTs() throws IOError, org.apache.thrift.TException
{
getRowsTs_result result = new getRowsTs_result();
receiveBase(result, "getRowsTs");
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, "getRowsTs failed: unknown result");
}
public List<TRowResult> getRowsWithColumnsTs(ByteBuffer tableName, List<ByteBuffer> rows, List<ByteBuffer> columns, long timestamp) throws IOError, org.apache.thrift.TException
{
send_getRowsWithColumnsTs(tableName, rows, columns, timestamp);
return recv_getRowsWithColumnsTs();
}
public void send_getRowsWithColumnsTs(ByteBuffer tableName, List<ByteBuffer> rows, List<ByteBuffer> columns, long timestamp) throws org.apache.thrift.TException
{
getRowsWithColumnsTs_args args = new getRowsWithColumnsTs_args();
args.setTableName(tableName);
args.setRows(rows);
args.setColumns(columns);
args.setTimestamp(timestamp);
sendBase("getRowsWithColumnsTs", args);
}
public List<TRowResult> recv_getRowsWithColumnsTs() throws IOError, org.apache.thrift.TException
{
getRowsWithColumnsTs_result result = new getRowsWithColumnsTs_result();
receiveBase(result, "getRowsWithColumnsTs");
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, "getRowsWithColumnsTs failed: unknown result");
}
public void mutateRow(ByteBuffer tableName, ByteBuffer row, List<Mutation> mutations) throws IOError, IllegalArgument, org.apache.thrift.TException
{
send_mutateRow(tableName, row, mutations);
recv_mutateRow();
}
public void send_mutateRow(ByteBuffer tableName, ByteBuffer row, List<Mutation> mutations) throws org.apache.thrift.TException
{
mutateRow_args args = new mutateRow_args();
args.setTableName(tableName);
args.setRow(row);
args.setMutations(mutations);
sendBase("mutateRow", args);
}
public void recv_mutateRow() throws IOError, IllegalArgument, org.apache.thrift.TException
{
mutateRow_result result = new mutateRow_result();
receiveBase(result, "mutateRow");
if (result.io != null) {
throw result.io;
}
if (result.ia != null) {
throw result.ia;
}
return;
}
public void mutateRowTs(ByteBuffer tableName, ByteBuffer row, List<Mutation> mutations, long timestamp) throws IOError, IllegalArgument, org.apache.thrift.TException
{
send_mutateRowTs(tableName, row, mutations, timestamp);
recv_mutateRowTs();
}
public void send_mutateRowTs(ByteBuffer tableName, ByteBuffer row, List<Mutation> mutations, long timestamp) throws org.apache.thrift.TException
{
mutateRowTs_args args = new mutateRowTs_args();
args.setTableName(tableName);
args.setRow(row);
args.setMutations(mutations);
args.setTimestamp(timestamp);
sendBase("mutateRowTs", args);
}
public void recv_mutateRowTs() throws IOError, IllegalArgument, org.apache.thrift.TException
{
mutateRowTs_result result = new mutateRowTs_result();
receiveBase(result, "mutateRowTs");
if (result.io != null) {
throw result.io;
}
if (result.ia != null) {
throw result.ia;
}
return;
}
public void mutateRows(ByteBuffer tableName, List<BatchMutation> rowBatches) throws IOError, IllegalArgument, org.apache.thrift.TException
{
send_mutateRows(tableName, rowBatches);
recv_mutateRows();
}
public void send_mutateRows(ByteBuffer tableName, List<BatchMutation> rowBatches) throws org.apache.thrift.TException
{
mutateRows_args args = new mutateRows_args();
args.setTableName(tableName);
args.setRowBatches(rowBatches);
sendBase("mutateRows", args);
}
public void recv_mutateRows() throws IOError, IllegalArgument, org.apache.thrift.TException
{
mutateRows_result result = new mutateRows_result();
receiveBase(result, "mutateRows");
if (result.io != null) {
throw result.io;
}
if (result.ia != null) {
throw result.ia;
}
return;
}
public void mutateRowsTs(ByteBuffer tableName, List<BatchMutation> rowBatches, long timestamp) throws IOError, IllegalArgument, org.apache.thrift.TException
{
send_mutateRowsTs(tableName, rowBatches, timestamp);
recv_mutateRowsTs();
}
public void send_mutateRowsTs(ByteBuffer tableName, List<BatchMutation> rowBatches, long timestamp) throws org.apache.thrift.TException
{
mutateRowsTs_args args = new mutateRowsTs_args();
args.setTableName(tableName);
args.setRowBatches(rowBatches);
args.setTimestamp(timestamp);
sendBase("mutateRowsTs", args);
}
public void recv_mutateRowsTs() throws IOError, IllegalArgument, org.apache.thrift.TException
{
mutateRowsTs_result result = new mutateRowsTs_result();
receiveBase(result, "mutateRowsTs");
if (result.io != null) {
throw result.io;
}
if (result.ia != null) {
throw result.ia;
}
return;
}
public long atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value) throws IOError, IllegalArgument, org.apache.thrift.TException
{
send_atomicIncrement(tableName, row, column, value);
return recv_atomicIncrement();
}
public void send_atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value) throws org.apache.thrift.TException
{
atomicIncrement_args args = new atomicIncrement_args();
args.setTableName(tableName);
args.setRow(row);
args.setColumn(column);
args.setValue(value);
sendBase("atomicIncrement", args);
}
public long recv_atomicIncrement() throws IOError, IllegalArgument, org.apache.thrift.TException
{
atomicIncrement_result result = new atomicIncrement_result();
receiveBase(result, "atomicIncrement");
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, "atomicIncrement failed: unknown result");
}
public void deleteAll(ByteBuffer tableName, ByteBuffer row, ByteBuffer column) throws IOError, org.apache.thrift.TException
{
send_deleteAll(tableName, row, column);
recv_deleteAll();
}
public void send_deleteAll(ByteBuffer tableName, ByteBuffer row, ByteBuffer column) throws org.apache.thrift.TException
{
deleteAll_args args = new deleteAll_args();
args.setTableName(tableName);
args.setRow(row);
args.setColumn(column);
sendBase("deleteAll", args);
}
public void recv_deleteAll() throws IOError, org.apache.thrift.TException
{
deleteAll_result result = new deleteAll_result();
receiveBase(result, "deleteAll");
if (result.io != null) {
throw result.io;
}
return;
}
public void deleteAllTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp) throws IOError, org.apache.thrift.TException
{
send_deleteAllTs(tableName, row, column, timestamp);
recv_deleteAllTs();
}
public void send_deleteAllTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp) throws org.apache.thrift.TException
{
deleteAllTs_args args = new deleteAllTs_args();
args.setTableName(tableName);
args.setRow(row);
args.setColumn(column);
args.setTimestamp(timestamp);
sendBase("deleteAllTs", args);
}
public void recv_deleteAllTs() throws IOError, org.apache.thrift.TException
{
deleteAllTs_result result = new deleteAllTs_result();
receiveBase(result, "deleteAllTs");
if (result.io != null) {
throw result.io;
}
return;
}
public void deleteAllRow(ByteBuffer tableName, ByteBuffer row) throws IOError, org.apache.thrift.TException
{
send_deleteAllRow(tableName, row);
recv_deleteAllRow();
}
public void send_deleteAllRow(ByteBuffer tableName, ByteBuffer row) throws org.apache.thrift.TException
{
deleteAllRow_args args = new deleteAllRow_args();
args.setTableName(tableName);
args.setRow(row);
sendBase("deleteAllRow", args);
}
public void recv_deleteAllRow() throws IOError, org.apache.thrift.TException
{
deleteAllRow_result result = new deleteAllRow_result();
receiveBase(result, "deleteAllRow");
if (result.io != null) {
throw result.io;
}
return;
}
public void deleteAllRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp) throws IOError, org.apache.thrift.TException
{
send_deleteAllRowTs(tableName, row, timestamp);
recv_deleteAllRowTs();
}
public void send_deleteAllRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp) throws org.apache.thrift.TException
{
deleteAllRowTs_args args = new deleteAllRowTs_args();
args.setTableName(tableName);
args.setRow(row);
args.setTimestamp(timestamp);
sendBase("deleteAllRowTs", args);
}
public void recv_deleteAllRowTs() throws IOError, org.apache.thrift.TException
{
deleteAllRowTs_result result = new deleteAllRowTs_result();
receiveBase(result, "deleteAllRowTs");
if (result.io != null) {
throw result.io;
}
return;
}
public int scannerOpen(ByteBuffer tableName, ByteBuffer startRow, List<ByteBuffer> columns) throws IOError, org.apache.thrift.TException
{
send_scannerOpen(tableName, startRow, columns);
return recv_scannerOpen();
}
public void send_scannerOpen(ByteBuffer tableName, ByteBuffer startRow, List<ByteBuffer> columns) throws org.apache.thrift.TException
{
scannerOpen_args args = new scannerOpen_args();
args.setTableName(tableName);
args.setStartRow(startRow);
args.setColumns(columns);
sendBase("scannerOpen", args);
}
public int recv_scannerOpen() throws IOError, org.apache.thrift.TException
{
scannerOpen_result result = new scannerOpen_result();
receiveBase(result, "scannerOpen");
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, "scannerOpen failed: unknown result");
}
public int scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List<ByteBuffer> columns) throws IOError, org.apache.thrift.TException
{
send_scannerOpenWithStop(tableName, startRow, stopRow, columns);
return recv_scannerOpenWithStop();
}
public void send_scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List<ByteBuffer> columns) throws org.apache.thrift.TException
{
scannerOpenWithStop_args args = new scannerOpenWithStop_args();
args.setTableName(tableName);
args.setStartRow(startRow);
args.setStopRow(stopRow);
args.setColumns(columns);
sendBase("scannerOpenWithStop", args);
}
public int recv_scannerOpenWithStop() throws IOError, org.apache.thrift.TException
{
scannerOpenWithStop_result result = new scannerOpenWithStop_result();
receiveBase(result, "scannerOpenWithStop");
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, "scannerOpenWithStop failed: unknown result");
}
public int scannerOpenWithPrefix(ByteBuffer tableName, ByteBuffer startAndPrefix, List<ByteBuffer> columns) throws IOError, org.apache.thrift.TException
{
send_scannerOpenWithPrefix(tableName, startAndPrefix, columns);
return recv_scannerOpenWithPrefix();
}
public void send_scannerOpenWithPrefix(ByteBuffer tableName, ByteBuffer startAndPrefix, List<ByteBuffer> columns) throws org.apache.thrift.TException
{
scannerOpenWithPrefix_args args = new scannerOpenWithPrefix_args();
args.setTableName(tableName);
args.setStartAndPrefix(startAndPrefix);
args.setColumns(columns);
sendBase("scannerOpenWithPrefix", args);
}
public int recv_scannerOpenWithPrefix() throws IOError, org.apache.thrift.TException
{
scannerOpenWithPrefix_result result = new scannerOpenWithPrefix_result();
receiveBase(result, "scannerOpenWithPrefix");
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, "scannerOpenWithPrefix failed: unknown result");
}
public int scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, List<ByteBuffer> columns, long timestamp) throws IOError, org.apache.thrift.TException
{
send_scannerOpenTs(tableName, startRow, columns, timestamp);
return recv_scannerOpenTs();
}
public void send_scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, List<ByteBuffer> columns, long timestamp) throws org.apache.thrift.TException
{
scannerOpenTs_args args = new scannerOpenTs_args();
args.setTableName(tableName);
args.setStartRow(startRow);
args.setColumns(columns);
args.setTimestamp(timestamp);
sendBase("scannerOpenTs", args);
}
public int recv_scannerOpenTs() throws IOError, org.apache.thrift.TException
{
scannerOpenTs_result result = new scannerOpenTs_result();
receiveBase(result, "scannerOpenTs");
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, "scannerOpenTs failed: unknown result");
}
public int scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List<ByteBuffer> columns, long timestamp) throws IOError, org.apache.thrift.TException
{
send_scannerOpenWithStopTs(tableName, startRow, stopRow, columns, timestamp);
return recv_scannerOpenWithStopTs();
}
public void send_scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List<ByteBuffer> columns, long timestamp) throws org.apache.thrift.TException
{
scannerOpenWithStopTs_args args = new scannerOpenWithStopTs_args();
args.setTableName(tableName);
args.setStartRow(startRow);
args.setStopRow(stopRow);
args.setColumns(columns);
args.setTimestamp(timestamp);
sendBase("scannerOpenWithStopTs", args);
}
public int recv_scannerOpenWithStopTs() throws IOError, org.apache.thrift.TException
{
scannerOpenWithStopTs_result result = new scannerOpenWithStopTs_result();
receiveBase(result, "scannerOpenWithStopTs");
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, "scannerOpenWithStopTs failed: unknown result");
}
public List<TRowResult> scannerGet(int id) throws IOError, IllegalArgument, org.apache.thrift.TException
{
send_scannerGet(id);
return recv_scannerGet();
}
public void send_scannerGet(int id) throws org.apache.thrift.TException
{
scannerGet_args args = new scannerGet_args();
args.setId(id);
sendBase("scannerGet", args);
}
public List<TRowResult> recv_scannerGet() throws IOError, IllegalArgument, org.apache.thrift.TException
{
scannerGet_result result = new scannerGet_result();
receiveBase(result, "scannerGet");
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, "scannerGet failed: unknown result");
}
public List<TRowResult> scannerGetList(int id, int nbRows) throws IOError, IllegalArgument, org.apache.thrift.TException
{
send_scannerGetList(id, nbRows);
return recv_scannerGetList();
}
public void send_scannerGetList(int id, int nbRows) throws org.apache.thrift.TException
{
scannerGetList_args args = new scannerGetList_args();
args.setId(id);
args.setNbRows(nbRows);
sendBase("scannerGetList", args);
}
public List<TRowResult> recv_scannerGetList() throws IOError, IllegalArgument, org.apache.thrift.TException
{
scannerGetList_result result = new scannerGetList_result();
receiveBase(result, "scannerGetList");
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, "scannerGetList failed: unknown result");
}
public void scannerClose(int id) throws IOError, IllegalArgument, org.apache.thrift.TException
{
send_scannerClose(id);
recv_scannerClose();
}
public void send_scannerClose(int id) throws org.apache.thrift.TException
{
scannerClose_args args = new scannerClose_args();
args.setId(id);
sendBase("scannerClose", args);
}
public void recv_scannerClose() throws IOError, IllegalArgument, org.apache.thrift.TException
{
scannerClose_result result = new scannerClose_result();
receiveBase(result, "scannerClose");
if (result.io != null) {
throw result.io;
}
if (result.ia != null) {
throw result.ia;
}
return;
}
}
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 enableTable(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<enableTable_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
enableTable_call method_call = new enableTable_call(tableName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class enableTable_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
public enableTable_call(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<enableTable_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.tableName = tableName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("enableTable", org.apache.thrift.protocol.TMessageType.CALL, 0));
enableTable_args args = new enableTable_args();
args.setTableName(tableName);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws IOError, 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_enableTable();
}
}
public void disableTable(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<disableTable_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
disableTable_call method_call = new disableTable_call(tableName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class disableTable_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
public disableTable_call(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<disableTable_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.tableName = tableName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("disableTable", org.apache.thrift.protocol.TMessageType.CALL, 0));
disableTable_args args = new disableTable_args();
args.setTableName(tableName);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws IOError, 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_disableTable();
}
}
public void isTableEnabled(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<isTableEnabled_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
isTableEnabled_call method_call = new isTableEnabled_call(tableName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class isTableEnabled_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
public isTableEnabled_call(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<isTableEnabled_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.tableName = tableName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isTableEnabled", org.apache.thrift.protocol.TMessageType.CALL, 0));
isTableEnabled_args args = new isTableEnabled_args();
args.setTableName(tableName);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws IOError, 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_isTableEnabled();
}
}
public void compact(ByteBuffer tableNameOrRegionName, org.apache.thrift.async.AsyncMethodCallback<compact_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
compact_call method_call = new compact_call(tableNameOrRegionName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class compact_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableNameOrRegionName;
public compact_call(ByteBuffer tableNameOrRegionName, org.apache.thrift.async.AsyncMethodCallback<compact_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.tableNameOrRegionName = tableNameOrRegionName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("compact", org.apache.thrift.protocol.TMessageType.CALL, 0));
compact_args args = new compact_args();
args.setTableNameOrRegionName(tableNameOrRegionName);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws IOError, 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_compact();
}
}
public void majorCompact(ByteBuffer tableNameOrRegionName, org.apache.thrift.async.AsyncMethodCallback<majorCompact_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
majorCompact_call method_call = new majorCompact_call(tableNameOrRegionName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class majorCompact_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableNameOrRegionName;
public majorCompact_call(ByteBuffer tableNameOrRegionName, org.apache.thrift.async.AsyncMethodCallback<majorCompact_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.tableNameOrRegionName = tableNameOrRegionName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("majorCompact", org.apache.thrift.protocol.TMessageType.CALL, 0));
majorCompact_args args = new majorCompact_args();
args.setTableNameOrRegionName(tableNameOrRegionName);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws IOError, 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_majorCompact();
}
}
public void getTableNames(org.apache.thrift.async.AsyncMethodCallback<getTableNames_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getTableNames_call method_call = new getTableNames_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getTableNames_call extends org.apache.thrift.async.TAsyncMethodCall {
public getTableNames_call(org.apache.thrift.async.AsyncMethodCallback<getTableNames_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTableNames", org.apache.thrift.protocol.TMessageType.CALL, 0));
getTableNames_args args = new getTableNames_args();
args.write(prot);
prot.writeMessageEnd();
}
public List<ByteBuffer> getResult() throws IOError, 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_getTableNames();
}
}
public void getColumnDescriptors(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<getColumnDescriptors_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getColumnDescriptors_call method_call = new getColumnDescriptors_call(tableName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getColumnDescriptors_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
public getColumnDescriptors_call(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<getColumnDescriptors_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.tableName = tableName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getColumnDescriptors", org.apache.thrift.protocol.TMessageType.CALL, 0));
getColumnDescriptors_args args = new getColumnDescriptors_args();
args.setTableName(tableName);
args.write(prot);
prot.writeMessageEnd();
}
public Map<ByteBuffer,ColumnDescriptor> getResult() throws IOError, 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_getColumnDescriptors();
}
}
public void getTableRegions(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<getTableRegions_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getTableRegions_call method_call = new getTableRegions_call(tableName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getTableRegions_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
public getTableRegions_call(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<getTableRegions_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.tableName = tableName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTableRegions", org.apache.thrift.protocol.TMessageType.CALL, 0));
getTableRegions_args args = new getTableRegions_args();
args.setTableName(tableName);
args.write(prot);
prot.writeMessageEnd();
}
public List<TRegionInfo> getResult() throws IOError, 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_getTableRegions();
}
}
public void createTable(ByteBuffer tableName, List<ColumnDescriptor> columnFamilies, org.apache.thrift.async.AsyncMethodCallback<createTable_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
createTable_call method_call = new createTable_call(tableName, columnFamilies, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createTable_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private List<ColumnDescriptor> columnFamilies;
public createTable_call(ByteBuffer tableName, List<ColumnDescriptor> columnFamilies, org.apache.thrift.async.AsyncMethodCallback<createTable_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.tableName = tableName;
this.columnFamilies = columnFamilies;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createTable", org.apache.thrift.protocol.TMessageType.CALL, 0));
createTable_args args = new createTable_args();
args.setTableName(tableName);
args.setColumnFamilies(columnFamilies);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws IOError, IllegalArgument, AlreadyExists, 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_createTable();
}
}
public void deleteTable(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<deleteTable_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
deleteTable_call method_call = new deleteTable_call(tableName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteTable_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
public deleteTable_call(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<deleteTable_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.tableName = tableName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteTable", org.apache.thrift.protocol.TMessageType.CALL, 0));
deleteTable_args args = new deleteTable_args();
args.setTableName(tableName);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws IOError, 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_deleteTable();
}
}
public void get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, org.apache.thrift.async.AsyncMethodCallback<get_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
get_call method_call = new get_call(tableName, row, column, 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 tableName;
private ByteBuffer row;
private ByteBuffer column;
public get_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, org.apache.thrift.async.AsyncMethodCallback<get_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.tableName = tableName;
this.row = row;
this.column = column;
}
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.setTableName(tableName);
args.setRow(row);
args.setColumn(column);
args.write(prot);
prot.writeMessageEnd();
}
public List<TCell> getResult() throws IOError, 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 getVer(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions, org.apache.thrift.async.AsyncMethodCallback<getVer_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getVer_call method_call = new getVer_call(tableName, row, column, numVersions, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getVer_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private ByteBuffer row;
private ByteBuffer column;
private int numVersions;
public getVer_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions, org.apache.thrift.async.AsyncMethodCallback<getVer_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.tableName = tableName;
this.row = row;
this.column = column;
this.numVersions = numVersions;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getVer", org.apache.thrift.protocol.TMessageType.CALL, 0));
getVer_args args = new getVer_args();
args.setTableName(tableName);
args.setRow(row);
args.setColumn(column);
args.setNumVersions(numVersions);
args.write(prot);
prot.writeMessageEnd();
}
public List<TCell> getResult() throws IOError, 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_getVer();
}
}
public void getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions, org.apache.thrift.async.AsyncMethodCallback<getVerTs_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getVerTs_call method_call = new getVerTs_call(tableName, row, column, timestamp, numVersions, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getVerTs_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private ByteBuffer row;
private ByteBuffer column;
private long timestamp;
private int numVersions;
public getVerTs_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions, org.apache.thrift.async.AsyncMethodCallback<getVerTs_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.tableName = tableName;
this.row = row;
this.column = column;
this.timestamp = timestamp;
this.numVersions = numVersions;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getVerTs", org.apache.thrift.protocol.TMessageType.CALL, 0));
getVerTs_args args = new getVerTs_args();
args.setTableName(tableName);
args.setRow(row);
args.setColumn(column);
args.setTimestamp(timestamp);
args.setNumVersions(numVersions);
args.write(prot);
prot.writeMessageEnd();
}
public List<TCell> getResult() throws IOError, 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_getVerTs();
}
}
public void getRow(ByteBuffer tableName, ByteBuffer row, org.apache.thrift.async.AsyncMethodCallback<getRow_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getRow_call method_call = new getRow_call(tableName, row, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getRow_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private ByteBuffer row;
public getRow_call(ByteBuffer tableName, ByteBuffer row, org.apache.thrift.async.AsyncMethodCallback<getRow_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.tableName = tableName;
this.row = row;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRow", org.apache.thrift.protocol.TMessageType.CALL, 0));
getRow_args args = new getRow_args();
args.setTableName(tableName);
args.setRow(row);
args.write(prot);
prot.writeMessageEnd();
}
public List<TRowResult> getResult() throws IOError, 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_getRow();
}
}
public void getRowWithColumns(ByteBuffer tableName, ByteBuffer row, List<ByteBuffer> columns, org.apache.thrift.async.AsyncMethodCallback<getRowWithColumns_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getRowWithColumns_call method_call = new getRowWithColumns_call(tableName, row, columns, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getRowWithColumns_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private ByteBuffer row;
private List<ByteBuffer> columns;
public getRowWithColumns_call(ByteBuffer tableName, ByteBuffer row, List<ByteBuffer> columns, org.apache.thrift.async.AsyncMethodCallback<getRowWithColumns_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.tableName = tableName;
this.row = row;
this.columns = columns;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRowWithColumns", org.apache.thrift.protocol.TMessageType.CALL, 0));
getRowWithColumns_args args = new getRowWithColumns_args();
args.setTableName(tableName);
args.setRow(row);
args.setColumns(columns);
args.write(prot);
prot.writeMessageEnd();
}
public List<TRowResult> getResult() throws IOError, 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_getRowWithColumns();
}
}
public void getRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, org.apache.thrift.async.AsyncMethodCallback<getRowTs_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getRowTs_call method_call = new getRowTs_call(tableName, row, timestamp, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getRowTs_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private ByteBuffer row;
private long timestamp;
public getRowTs_call(ByteBuffer tableName, ByteBuffer row, long timestamp, org.apache.thrift.async.AsyncMethodCallback<getRowTs_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.tableName = tableName;
this.row = row;
this.timestamp = timestamp;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRowTs", org.apache.thrift.protocol.TMessageType.CALL, 0));
getRowTs_args args = new getRowTs_args();
args.setTableName(tableName);
args.setRow(row);
args.setTimestamp(timestamp);
args.write(prot);
prot.writeMessageEnd();
}
public List<TRowResult> getResult() throws IOError, 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_getRowTs();
}
}
public void getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, List<ByteBuffer> columns, long timestamp, org.apache.thrift.async.AsyncMethodCallback<getRowWithColumnsTs_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getRowWithColumnsTs_call method_call = new getRowWithColumnsTs_call(tableName, row, columns, timestamp, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getRowWithColumnsTs_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private ByteBuffer row;
private List<ByteBuffer> columns;
private long timestamp;
public getRowWithColumnsTs_call(ByteBuffer tableName, ByteBuffer row, List<ByteBuffer> columns, long timestamp, org.apache.thrift.async.AsyncMethodCallback<getRowWithColumnsTs_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.tableName = tableName;
this.row = row;
this.columns = columns;
this.timestamp = timestamp;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRowWithColumnsTs", org.apache.thrift.protocol.TMessageType.CALL, 0));
getRowWithColumnsTs_args args = new getRowWithColumnsTs_args();
args.setTableName(tableName);
args.setRow(row);
args.setColumns(columns);
args.setTimestamp(timestamp);
args.write(prot);
prot.writeMessageEnd();
}
public List<TRowResult> getResult() throws IOError, 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_getRowWithColumnsTs();
}
}
public void getRows(ByteBuffer tableName, List<ByteBuffer> rows, org.apache.thrift.async.AsyncMethodCallback<getRows_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getRows_call method_call = new getRows_call(tableName, rows, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getRows_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private List<ByteBuffer> rows;
public getRows_call(ByteBuffer tableName, List<ByteBuffer> rows, org.apache.thrift.async.AsyncMethodCallback<getRows_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.tableName = tableName;
this.rows = rows;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRows", org.apache.thrift.protocol.TMessageType.CALL, 0));
getRows_args args = new getRows_args();
args.setTableName(tableName);
args.setRows(rows);
args.write(prot);
prot.writeMessageEnd();
}
public List<TRowResult> getResult() throws IOError, 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_getRows();
}
}
public void getRowsWithColumns(ByteBuffer tableName, List<ByteBuffer> rows, List<ByteBuffer> columns, org.apache.thrift.async.AsyncMethodCallback<getRowsWithColumns_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getRowsWithColumns_call method_call = new getRowsWithColumns_call(tableName, rows, columns, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getRowsWithColumns_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private List<ByteBuffer> rows;
private List<ByteBuffer> columns;
public getRowsWithColumns_call(ByteBuffer tableName, List<ByteBuffer> rows, List<ByteBuffer> columns, org.apache.thrift.async.AsyncMethodCallback<getRowsWithColumns_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.tableName = tableName;
this.rows = rows;
this.columns = columns;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRowsWithColumns", org.apache.thrift.protocol.TMessageType.CALL, 0));
getRowsWithColumns_args args = new getRowsWithColumns_args();
args.setTableName(tableName);
args.setRows(rows);
args.setColumns(columns);
args.write(prot);
prot.writeMessageEnd();
}
public List<TRowResult> getResult() throws IOError, 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_getRowsWithColumns();
}
}
public void getRowsTs(ByteBuffer tableName, List<ByteBuffer> rows, long timestamp, org.apache.thrift.async.AsyncMethodCallback<getRowsTs_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getRowsTs_call method_call = new getRowsTs_call(tableName, rows, timestamp, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getRowsTs_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private List<ByteBuffer> rows;
private long timestamp;
public getRowsTs_call(ByteBuffer tableName, List<ByteBuffer> rows, long timestamp, org.apache.thrift.async.AsyncMethodCallback<getRowsTs_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.tableName = tableName;
this.rows = rows;
this.timestamp = timestamp;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRowsTs", org.apache.thrift.protocol.TMessageType.CALL, 0));
getRowsTs_args args = new getRowsTs_args();
args.setTableName(tableName);
args.setRows(rows);
args.setTimestamp(timestamp);
args.write(prot);
prot.writeMessageEnd();
}
public List<TRowResult> getResult() throws IOError, 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_getRowsTs();
}
}
public void getRowsWithColumnsTs(ByteBuffer tableName, List<ByteBuffer> rows, List<ByteBuffer> columns, long timestamp, org.apache.thrift.async.AsyncMethodCallback<getRowsWithColumnsTs_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getRowsWithColumnsTs_call method_call = new getRowsWithColumnsTs_call(tableName, rows, columns, timestamp, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getRowsWithColumnsTs_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private List<ByteBuffer> rows;
private List<ByteBuffer> columns;
private long timestamp;
public getRowsWithColumnsTs_call(ByteBuffer tableName, List<ByteBuffer> rows, List<ByteBuffer> columns, long timestamp, org.apache.thrift.async.AsyncMethodCallback<getRowsWithColumnsTs_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.tableName = tableName;
this.rows = rows;
this.columns = columns;
this.timestamp = timestamp;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRowsWithColumnsTs", org.apache.thrift.protocol.TMessageType.CALL, 0));
getRowsWithColumnsTs_args args = new getRowsWithColumnsTs_args();
args.setTableName(tableName);
args.setRows(rows);
args.setColumns(columns);
args.setTimestamp(timestamp);
args.write(prot);
prot.writeMessageEnd();
}
public List<TRowResult> getResult() throws IOError, 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_getRowsWithColumnsTs();
}
}
public void mutateRow(ByteBuffer tableName, ByteBuffer row, List<Mutation> mutations, org.apache.thrift.async.AsyncMethodCallback<mutateRow_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
mutateRow_call method_call = new mutateRow_call(tableName, row, mutations, 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 tableName;
private ByteBuffer row;
private List<Mutation> mutations;
public mutateRow_call(ByteBuffer tableName, ByteBuffer row, List<Mutation> mutations, org.apache.thrift.async.AsyncMethodCallback<mutateRow_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.tableName = tableName;
this.row = row;
this.mutations = mutations;
}
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.setTableName(tableName);
args.setRow(row);
args.setMutations(mutations);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws IOError, IllegalArgument, 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 mutateRowTs(ByteBuffer tableName, ByteBuffer row, List<Mutation> mutations, long timestamp, org.apache.thrift.async.AsyncMethodCallback<mutateRowTs_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
mutateRowTs_call method_call = new mutateRowTs_call(tableName, row, mutations, timestamp, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class mutateRowTs_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private ByteBuffer row;
private List<Mutation> mutations;
private long timestamp;
public mutateRowTs_call(ByteBuffer tableName, ByteBuffer row, List<Mutation> mutations, long timestamp, org.apache.thrift.async.AsyncMethodCallback<mutateRowTs_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.tableName = tableName;
this.row = row;
this.mutations = mutations;
this.timestamp = timestamp;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mutateRowTs", org.apache.thrift.protocol.TMessageType.CALL, 0));
mutateRowTs_args args = new mutateRowTs_args();
args.setTableName(tableName);
args.setRow(row);
args.setMutations(mutations);
args.setTimestamp(timestamp);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws IOError, IllegalArgument, 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_mutateRowTs();
}
}
public void mutateRows(ByteBuffer tableName, List<BatchMutation> rowBatches, org.apache.thrift.async.AsyncMethodCallback<mutateRows_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
mutateRows_call method_call = new mutateRows_call(tableName, rowBatches, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class mutateRows_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private List<BatchMutation> rowBatches;
public mutateRows_call(ByteBuffer tableName, List<BatchMutation> rowBatches, org.apache.thrift.async.AsyncMethodCallback<mutateRows_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.tableName = tableName;
this.rowBatches = rowBatches;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mutateRows", org.apache.thrift.protocol.TMessageType.CALL, 0));
mutateRows_args args = new mutateRows_args();
args.setTableName(tableName);
args.setRowBatches(rowBatches);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws IOError, IllegalArgument, 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_mutateRows();
}
}
public void mutateRowsTs(ByteBuffer tableName, List<BatchMutation> rowBatches, long timestamp, org.apache.thrift.async.AsyncMethodCallback<mutateRowsTs_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
mutateRowsTs_call method_call = new mutateRowsTs_call(tableName, rowBatches, timestamp, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class mutateRowsTs_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private List<BatchMutation> rowBatches;
private long timestamp;
public mutateRowsTs_call(ByteBuffer tableName, List<BatchMutation> rowBatches, long timestamp, org.apache.thrift.async.AsyncMethodCallback<mutateRowsTs_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.tableName = tableName;
this.rowBatches = rowBatches;
this.timestamp = timestamp;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mutateRowsTs", org.apache.thrift.protocol.TMessageType.CALL, 0));
mutateRowsTs_args args = new mutateRowsTs_args();
args.setTableName(tableName);
args.setRowBatches(rowBatches);
args.setTimestamp(timestamp);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws IOError, IllegalArgument, 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_mutateRowsTs();
}
}
public void atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value, org.apache.thrift.async.AsyncMethodCallback<atomicIncrement_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
atomicIncrement_call method_call = new atomicIncrement_call(tableName, row, column, value, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class atomicIncrement_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private ByteBuffer row;
private ByteBuffer column;
private long value;
public atomicIncrement_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value, org.apache.thrift.async.AsyncMethodCallback<atomicIncrement_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.tableName = tableName;
this.row = row;
this.column = column;
this.value = value;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("atomicIncrement", org.apache.thrift.protocol.TMessageType.CALL, 0));
atomicIncrement_args args = new atomicIncrement_args();
args.setTableName(tableName);
args.setRow(row);
args.setColumn(column);
args.setValue(value);
args.write(prot);
prot.writeMessageEnd();
}
public long getResult() throws IOError, IllegalArgument, 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_atomicIncrement();
}
}
public void deleteAll(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, org.apache.thrift.async.AsyncMethodCallback<deleteAll_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
deleteAll_call method_call = new deleteAll_call(tableName, row, column, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteAll_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private ByteBuffer row;
private ByteBuffer column;
public deleteAll_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, org.apache.thrift.async.AsyncMethodCallback<deleteAll_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.tableName = tableName;
this.row = row;
this.column = column;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteAll", org.apache.thrift.protocol.TMessageType.CALL, 0));
deleteAll_args args = new deleteAll_args();
args.setTableName(tableName);
args.setRow(row);
args.setColumn(column);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws IOError, 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_deleteAll();
}
}
public void deleteAllTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, org.apache.thrift.async.AsyncMethodCallback<deleteAllTs_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
deleteAllTs_call method_call = new deleteAllTs_call(tableName, row, column, timestamp, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteAllTs_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private ByteBuffer row;
private ByteBuffer column;
private long timestamp;
public deleteAllTs_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, org.apache.thrift.async.AsyncMethodCallback<deleteAllTs_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.tableName = tableName;
this.row = row;
this.column = column;
this.timestamp = timestamp;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteAllTs", org.apache.thrift.protocol.TMessageType.CALL, 0));
deleteAllTs_args args = new deleteAllTs_args();
args.setTableName(tableName);
args.setRow(row);
args.setColumn(column);
args.setTimestamp(timestamp);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws IOError, 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_deleteAllTs();
}
}
public void deleteAllRow(ByteBuffer tableName, ByteBuffer row, org.apache.thrift.async.AsyncMethodCallback<deleteAllRow_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
deleteAllRow_call method_call = new deleteAllRow_call(tableName, row, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteAllRow_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private ByteBuffer row;
public deleteAllRow_call(ByteBuffer tableName, ByteBuffer row, org.apache.thrift.async.AsyncMethodCallback<deleteAllRow_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.tableName = tableName;
this.row = row;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteAllRow", org.apache.thrift.protocol.TMessageType.CALL, 0));
deleteAllRow_args args = new deleteAllRow_args();
args.setTableName(tableName);
args.setRow(row);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws IOError, 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_deleteAllRow();
}
}
public void deleteAllRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, org.apache.thrift.async.AsyncMethodCallback<deleteAllRowTs_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
deleteAllRowTs_call method_call = new deleteAllRowTs_call(tableName, row, timestamp, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteAllRowTs_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private ByteBuffer row;
private long timestamp;
public deleteAllRowTs_call(ByteBuffer tableName, ByteBuffer row, long timestamp, org.apache.thrift.async.AsyncMethodCallback<deleteAllRowTs_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.tableName = tableName;
this.row = row;
this.timestamp = timestamp;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteAllRowTs", org.apache.thrift.protocol.TMessageType.CALL, 0));
deleteAllRowTs_args args = new deleteAllRowTs_args();
args.setTableName(tableName);
args.setRow(row);
args.setTimestamp(timestamp);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws IOError, 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_deleteAllRowTs();
}
}
public void scannerOpen(ByteBuffer tableName, ByteBuffer startRow, List<ByteBuffer> columns, org.apache.thrift.async.AsyncMethodCallback<scannerOpen_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
scannerOpen_call method_call = new scannerOpen_call(tableName, startRow, columns, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class scannerOpen_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private ByteBuffer startRow;
private List<ByteBuffer> columns;
public scannerOpen_call(ByteBuffer tableName, ByteBuffer startRow, List<ByteBuffer> columns, org.apache.thrift.async.AsyncMethodCallback<scannerOpen_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.tableName = tableName;
this.startRow = startRow;
this.columns = columns;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scannerOpen", org.apache.thrift.protocol.TMessageType.CALL, 0));
scannerOpen_args args = new scannerOpen_args();
args.setTableName(tableName);
args.setStartRow(startRow);
args.setColumns(columns);
args.write(prot);
prot.writeMessageEnd();
}
public int getResult() throws IOError, 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_scannerOpen();
}
}
public void scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List<ByteBuffer> columns, org.apache.thrift.async.AsyncMethodCallback<scannerOpenWithStop_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
scannerOpenWithStop_call method_call = new scannerOpenWithStop_call(tableName, startRow, stopRow, columns, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class scannerOpenWithStop_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private ByteBuffer startRow;
private ByteBuffer stopRow;
private List<ByteBuffer> columns;
public scannerOpenWithStop_call(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List<ByteBuffer> columns, org.apache.thrift.async.AsyncMethodCallback<scannerOpenWithStop_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.tableName = tableName;
this.startRow = startRow;
this.stopRow = stopRow;
this.columns = columns;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scannerOpenWithStop", org.apache.thrift.protocol.TMessageType.CALL, 0));
scannerOpenWithStop_args args = new scannerOpenWithStop_args();
args.setTableName(tableName);
args.setStartRow(startRow);
args.setStopRow(stopRow);
args.setColumns(columns);
args.write(prot);
prot.writeMessageEnd();
}
public int getResult() throws IOError, 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_scannerOpenWithStop();
}
}
public void scannerOpenWithPrefix(ByteBuffer tableName, ByteBuffer startAndPrefix, List<ByteBuffer> columns, org.apache.thrift.async.AsyncMethodCallback<scannerOpenWithPrefix_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
scannerOpenWithPrefix_call method_call = new scannerOpenWithPrefix_call(tableName, startAndPrefix, columns, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class scannerOpenWithPrefix_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private ByteBuffer startAndPrefix;
private List<ByteBuffer> columns;
public scannerOpenWithPrefix_call(ByteBuffer tableName, ByteBuffer startAndPrefix, List<ByteBuffer> columns, org.apache.thrift.async.AsyncMethodCallback<scannerOpenWithPrefix_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.tableName = tableName;
this.startAndPrefix = startAndPrefix;
this.columns = columns;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scannerOpenWithPrefix", org.apache.thrift.protocol.TMessageType.CALL, 0));
scannerOpenWithPrefix_args args = new scannerOpenWithPrefix_args();
args.setTableName(tableName);
args.setStartAndPrefix(startAndPrefix);
args.setColumns(columns);
args.write(prot);
prot.writeMessageEnd();
}
public int getResult() throws IOError, 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_scannerOpenWithPrefix();
}
}
public void scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, List<ByteBuffer> columns, long timestamp, org.apache.thrift.async.AsyncMethodCallback<scannerOpenTs_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
scannerOpenTs_call method_call = new scannerOpenTs_call(tableName, startRow, columns, timestamp, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class scannerOpenTs_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private ByteBuffer startRow;
private List<ByteBuffer> columns;
private long timestamp;
public scannerOpenTs_call(ByteBuffer tableName, ByteBuffer startRow, List<ByteBuffer> columns, long timestamp, org.apache.thrift.async.AsyncMethodCallback<scannerOpenTs_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.tableName = tableName;
this.startRow = startRow;
this.columns = columns;
this.timestamp = timestamp;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scannerOpenTs", org.apache.thrift.protocol.TMessageType.CALL, 0));
scannerOpenTs_args args = new scannerOpenTs_args();
args.setTableName(tableName);
args.setStartRow(startRow);
args.setColumns(columns);
args.setTimestamp(timestamp);
args.write(prot);
prot.writeMessageEnd();
}
public int getResult() throws IOError, 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_scannerOpenTs();
}
}
public void scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List<ByteBuffer> columns, long timestamp, org.apache.thrift.async.AsyncMethodCallback<scannerOpenWithStopTs_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
scannerOpenWithStopTs_call method_call = new scannerOpenWithStopTs_call(tableName, startRow, stopRow, columns, timestamp, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class scannerOpenWithStopTs_call extends org.apache.thrift.async.TAsyncMethodCall {
private ByteBuffer tableName;
private ByteBuffer startRow;
private ByteBuffer stopRow;
private List<ByteBuffer> columns;
private long timestamp;
public scannerOpenWithStopTs_call(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List<ByteBuffer> columns, long timestamp, org.apache.thrift.async.AsyncMethodCallback<scannerOpenWithStopTs_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.tableName = tableName;
this.startRow = startRow;
this.stopRow = stopRow;
this.columns = columns;
this.timestamp = timestamp;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scannerOpenWithStopTs", org.apache.thrift.protocol.TMessageType.CALL, 0));
scannerOpenWithStopTs_args args = new scannerOpenWithStopTs_args();
args.setTableName(tableName);
args.setStartRow(startRow);
args.setStopRow(stopRow);
args.setColumns(columns);
args.setTimestamp(timestamp);
args.write(prot);
prot.writeMessageEnd();
}
public int getResult() throws IOError, 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_scannerOpenWithStopTs();
}
}
public void scannerGet(int id, org.apache.thrift.async.AsyncMethodCallback<scannerGet_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
scannerGet_call method_call = new scannerGet_call(id, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class scannerGet_call extends org.apache.thrift.async.TAsyncMethodCall {
private int id;
public scannerGet_call(int id, org.apache.thrift.async.AsyncMethodCallback<scannerGet_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.id = id;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scannerGet", org.apache.thrift.protocol.TMessageType.CALL, 0));
scannerGet_args args = new scannerGet_args();
args.setId(id);
args.write(prot);
prot.writeMessageEnd();
}
public List<TRowResult> getResult() throws IOError, IllegalArgument, 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_scannerGet();
}
}
public void scannerGetList(int id, int nbRows, org.apache.thrift.async.AsyncMethodCallback<scannerGetList_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
scannerGetList_call method_call = new scannerGetList_call(id, nbRows, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class scannerGetList_call extends org.apache.thrift.async.TAsyncMethodCall {
private int id;
private int nbRows;
public scannerGetList_call(int id, int nbRows, org.apache.thrift.async.AsyncMethodCallback<scannerGetList_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.id = id;
this.nbRows = nbRows;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scannerGetList", org.apache.thrift.protocol.TMessageType.CALL, 0));
scannerGetList_args args = new scannerGetList_args();
args.setId(id);
args.setNbRows(nbRows);
args.write(prot);
prot.writeMessageEnd();
}
public List<TRowResult> getResult() throws IOError, IllegalArgument, 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_scannerGetList();
}
}
public void scannerClose(int id, org.apache.thrift.async.AsyncMethodCallback<scannerClose_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
scannerClose_call method_call = new scannerClose_call(id, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class scannerClose_call extends org.apache.thrift.async.TAsyncMethodCall {
private int id;
public scannerClose_call(int id, org.apache.thrift.async.AsyncMethodCallback<scannerClose_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.id = id;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scannerClose", org.apache.thrift.protocol.TMessageType.CALL, 0));
scannerClose_args args = new scannerClose_args();
args.setId(id);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws IOError, IllegalArgument, 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_scannerClose();
}
}
}
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("enableTable", new enableTable());
processMap.put("disableTable", new disableTable());
processMap.put("isTableEnabled", new isTableEnabled());
processMap.put("compact", new compact());
processMap.put("majorCompact", new majorCompact());
processMap.put("getTableNames", new getTableNames());
processMap.put("getColumnDescriptors", new getColumnDescriptors());
processMap.put("getTableRegions", new getTableRegions());
processMap.put("createTable", new createTable());
processMap.put("deleteTable", new deleteTable());
processMap.put("get", new get());
processMap.put("getVer", new getVer());
processMap.put("getVerTs", new getVerTs());
processMap.put("getRow", new getRow());
processMap.put("getRowWithColumns", new getRowWithColumns());
processMap.put("getRowTs", new getRowTs());
processMap.put("getRowWithColumnsTs", new getRowWithColumnsTs());
processMap.put("getRows", new getRows());
processMap.put("getRowsWithColumns", new getRowsWithColumns());
processMap.put("getRowsTs", new getRowsTs());
processMap.put("getRowsWithColumnsTs", new getRowsWithColumnsTs());
processMap.put("mutateRow", new mutateRow());
processMap.put("mutateRowTs", new mutateRowTs());
processMap.put("mutateRows", new mutateRows());
processMap.put("mutateRowsTs", new mutateRowsTs());
processMap.put("atomicIncrement", new atomicIncrement());
processMap.put("deleteAll", new deleteAll());
processMap.put("deleteAllTs", new deleteAllTs());
processMap.put("deleteAllRow", new deleteAllRow());
processMap.put("deleteAllRowTs", new deleteAllRowTs());
processMap.put("scannerOpen", new scannerOpen());
processMap.put("scannerOpenWithStop", new scannerOpenWithStop());
processMap.put("scannerOpenWithPrefix", new scannerOpenWithPrefix());
processMap.put("scannerOpenTs", new scannerOpenTs());
processMap.put("scannerOpenWithStopTs", new scannerOpenWithStopTs());
processMap.put("scannerGet", new scannerGet());
processMap.put("scannerGetList", new scannerGetList());
processMap.put("scannerClose", new scannerClose());
return processMap;
}
private static class enableTable<I extends Iface> extends org.apache.thrift.ProcessFunction<I, enableTable_args> {
public enableTable() {
super("enableTable");
}
protected enableTable_args getEmptyArgsInstance() {
return new enableTable_args();
}
protected enableTable_result getResult(I iface, enableTable_args args) throws org.apache.thrift.TException {
enableTable_result result = new enableTable_result();
try {
iface.enableTable(args.tableName);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class disableTable<I extends Iface> extends org.apache.thrift.ProcessFunction<I, disableTable_args> {
public disableTable() {
super("disableTable");
}
protected disableTable_args getEmptyArgsInstance() {
return new disableTable_args();
}
protected disableTable_result getResult(I iface, disableTable_args args) throws org.apache.thrift.TException {
disableTable_result result = new disableTable_result();
try {
iface.disableTable(args.tableName);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class isTableEnabled<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isTableEnabled_args> {
public isTableEnabled() {
super("isTableEnabled");
}
protected isTableEnabled_args getEmptyArgsInstance() {
return new isTableEnabled_args();
}
protected isTableEnabled_result getResult(I iface, isTableEnabled_args args) throws org.apache.thrift.TException {
isTableEnabled_result result = new isTableEnabled_result();
try {
result.success = iface.isTableEnabled(args.tableName);
result.setSuccessIsSet(true);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class compact<I extends Iface> extends org.apache.thrift.ProcessFunction<I, compact_args> {
public compact() {
super("compact");
}
protected compact_args getEmptyArgsInstance() {
return new compact_args();
}
protected compact_result getResult(I iface, compact_args args) throws org.apache.thrift.TException {
compact_result result = new compact_result();
try {
iface.compact(args.tableNameOrRegionName);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class majorCompact<I extends Iface> extends org.apache.thrift.ProcessFunction<I, majorCompact_args> {
public majorCompact() {
super("majorCompact");
}
protected majorCompact_args getEmptyArgsInstance() {
return new majorCompact_args();
}
protected majorCompact_result getResult(I iface, majorCompact_args args) throws org.apache.thrift.TException {
majorCompact_result result = new majorCompact_result();
try {
iface.majorCompact(args.tableNameOrRegionName);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class getTableNames<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getTableNames_args> {
public getTableNames() {
super("getTableNames");
}
protected getTableNames_args getEmptyArgsInstance() {
return new getTableNames_args();
}
protected getTableNames_result getResult(I iface, getTableNames_args args) throws org.apache.thrift.TException {
getTableNames_result result = new getTableNames_result();
try {
result.success = iface.getTableNames();
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class getColumnDescriptors<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getColumnDescriptors_args> {
public getColumnDescriptors() {
super("getColumnDescriptors");
}
protected getColumnDescriptors_args getEmptyArgsInstance() {
return new getColumnDescriptors_args();
}
protected getColumnDescriptors_result getResult(I iface, getColumnDescriptors_args args) throws org.apache.thrift.TException {
getColumnDescriptors_result result = new getColumnDescriptors_result();
try {
result.success = iface.getColumnDescriptors(args.tableName);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class getTableRegions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getTableRegions_args> {
public getTableRegions() {
super("getTableRegions");
}
protected getTableRegions_args getEmptyArgsInstance() {
return new getTableRegions_args();
}
protected getTableRegions_result getResult(I iface, getTableRegions_args args) throws org.apache.thrift.TException {
getTableRegions_result result = new getTableRegions_result();
try {
result.success = iface.getTableRegions(args.tableName);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class createTable<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createTable_args> {
public createTable() {
super("createTable");
}
protected createTable_args getEmptyArgsInstance() {
return new createTable_args();
}
protected createTable_result getResult(I iface, createTable_args args) throws org.apache.thrift.TException {
createTable_result result = new createTable_result();
try {
iface.createTable(args.tableName, args.columnFamilies);
} catch (IOError io) {
result.io = io;
} catch (IllegalArgument ia) {
result.ia = ia;
} catch (AlreadyExists exist) {
result.exist = exist;
}
return result;
}
}
private static class deleteTable<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteTable_args> {
public deleteTable() {
super("deleteTable");
}
protected deleteTable_args getEmptyArgsInstance() {
return new deleteTable_args();
}
protected deleteTable_result getResult(I iface, deleteTable_args args) throws org.apache.thrift.TException {
deleteTable_result result = new deleteTable_result();
try {
iface.deleteTable(args.tableName);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class get<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_args> {
public get() {
super("get");
}
protected get_args getEmptyArgsInstance() {
return new get_args();
}
protected get_result getResult(I iface, get_args args) throws org.apache.thrift.TException {
get_result result = new get_result();
try {
result.success = iface.get(args.tableName, args.row, args.column);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class getVer<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getVer_args> {
public getVer() {
super("getVer");
}
protected getVer_args getEmptyArgsInstance() {
return new getVer_args();
}
protected getVer_result getResult(I iface, getVer_args args) throws org.apache.thrift.TException {
getVer_result result = new getVer_result();
try {
result.success = iface.getVer(args.tableName, args.row, args.column, args.numVersions);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class getVerTs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getVerTs_args> {
public getVerTs() {
super("getVerTs");
}
protected getVerTs_args getEmptyArgsInstance() {
return new getVerTs_args();
}
protected getVerTs_result getResult(I iface, getVerTs_args args) throws org.apache.thrift.TException {
getVerTs_result result = new getVerTs_result();
try {
result.success = iface.getVerTs(args.tableName, args.row, args.column, args.timestamp, args.numVersions);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class getRow<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRow_args> {
public getRow() {
super("getRow");
}
protected getRow_args getEmptyArgsInstance() {
return new getRow_args();
}
protected getRow_result getResult(I iface, getRow_args args) throws org.apache.thrift.TException {
getRow_result result = new getRow_result();
try {
result.success = iface.getRow(args.tableName, args.row);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class getRowWithColumns<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRowWithColumns_args> {
public getRowWithColumns() {
super("getRowWithColumns");
}
protected getRowWithColumns_args getEmptyArgsInstance() {
return new getRowWithColumns_args();
}
protected getRowWithColumns_result getResult(I iface, getRowWithColumns_args args) throws org.apache.thrift.TException {
getRowWithColumns_result result = new getRowWithColumns_result();
try {
result.success = iface.getRowWithColumns(args.tableName, args.row, args.columns);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class getRowTs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRowTs_args> {
public getRowTs() {
super("getRowTs");
}
protected getRowTs_args getEmptyArgsInstance() {
return new getRowTs_args();
}
protected getRowTs_result getResult(I iface, getRowTs_args args) throws org.apache.thrift.TException {
getRowTs_result result = new getRowTs_result();
try {
result.success = iface.getRowTs(args.tableName, args.row, args.timestamp);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class getRowWithColumnsTs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRowWithColumnsTs_args> {
public getRowWithColumnsTs() {
super("getRowWithColumnsTs");
}
protected getRowWithColumnsTs_args getEmptyArgsInstance() {
return new getRowWithColumnsTs_args();
}
protected getRowWithColumnsTs_result getResult(I iface, getRowWithColumnsTs_args args) throws org.apache.thrift.TException {
getRowWithColumnsTs_result result = new getRowWithColumnsTs_result();
try {
result.success = iface.getRowWithColumnsTs(args.tableName, args.row, args.columns, args.timestamp);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class getRows<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRows_args> {
public getRows() {
super("getRows");
}
protected getRows_args getEmptyArgsInstance() {
return new getRows_args();
}
protected getRows_result getResult(I iface, getRows_args args) throws org.apache.thrift.TException {
getRows_result result = new getRows_result();
try {
result.success = iface.getRows(args.tableName, args.rows);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class getRowsWithColumns<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRowsWithColumns_args> {
public getRowsWithColumns() {
super("getRowsWithColumns");
}
protected getRowsWithColumns_args getEmptyArgsInstance() {
return new getRowsWithColumns_args();
}
protected getRowsWithColumns_result getResult(I iface, getRowsWithColumns_args args) throws org.apache.thrift.TException {
getRowsWithColumns_result result = new getRowsWithColumns_result();
try {
result.success = iface.getRowsWithColumns(args.tableName, args.rows, args.columns);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class getRowsTs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRowsTs_args> {
public getRowsTs() {
super("getRowsTs");
}
protected getRowsTs_args getEmptyArgsInstance() {
return new getRowsTs_args();
}
protected getRowsTs_result getResult(I iface, getRowsTs_args args) throws org.apache.thrift.TException {
getRowsTs_result result = new getRowsTs_result();
try {
result.success = iface.getRowsTs(args.tableName, args.rows, args.timestamp);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class getRowsWithColumnsTs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRowsWithColumnsTs_args> {
public getRowsWithColumnsTs() {
super("getRowsWithColumnsTs");
}
protected getRowsWithColumnsTs_args getEmptyArgsInstance() {
return new getRowsWithColumnsTs_args();
}
protected getRowsWithColumnsTs_result getResult(I iface, getRowsWithColumnsTs_args args) throws org.apache.thrift.TException {
getRowsWithColumnsTs_result result = new getRowsWithColumnsTs_result();
try {
result.success = iface.getRowsWithColumnsTs(args.tableName, args.rows, args.columns, args.timestamp);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class mutateRow<I extends Iface> extends org.apache.thrift.ProcessFunction<I, mutateRow_args> {
public mutateRow() {
super("mutateRow");
}
protected mutateRow_args getEmptyArgsInstance() {
return new mutateRow_args();
}
protected mutateRow_result getResult(I iface, mutateRow_args args) throws org.apache.thrift.TException {
mutateRow_result result = new mutateRow_result();
try {
iface.mutateRow(args.tableName, args.row, args.mutations);
} catch (IOError io) {
result.io = io;
} catch (IllegalArgument ia) {
result.ia = ia;
}
return result;
}
}
private static class mutateRowTs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, mutateRowTs_args> {
public mutateRowTs() {
super("mutateRowTs");
}
protected mutateRowTs_args getEmptyArgsInstance() {
return new mutateRowTs_args();
}
protected mutateRowTs_result getResult(I iface, mutateRowTs_args args) throws org.apache.thrift.TException {
mutateRowTs_result result = new mutateRowTs_result();
try {
iface.mutateRowTs(args.tableName, args.row, args.mutations, args.timestamp);
} catch (IOError io) {
result.io = io;
} catch (IllegalArgument ia) {
result.ia = ia;
}
return result;
}
}
private static class mutateRows<I extends Iface> extends org.apache.thrift.ProcessFunction<I, mutateRows_args> {
public mutateRows() {
super("mutateRows");
}
protected mutateRows_args getEmptyArgsInstance() {
return new mutateRows_args();
}
protected mutateRows_result getResult(I iface, mutateRows_args args) throws org.apache.thrift.TException {
mutateRows_result result = new mutateRows_result();
try {
iface.mutateRows(args.tableName, args.rowBatches);
} catch (IOError io) {
result.io = io;
} catch (IllegalArgument ia) {
result.ia = ia;
}
return result;
}
}
private static class mutateRowsTs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, mutateRowsTs_args> {
public mutateRowsTs() {
super("mutateRowsTs");
}
protected mutateRowsTs_args getEmptyArgsInstance() {
return new mutateRowsTs_args();
}
protected mutateRowsTs_result getResult(I iface, mutateRowsTs_args args) throws org.apache.thrift.TException {
mutateRowsTs_result result = new mutateRowsTs_result();
try {
iface.mutateRowsTs(args.tableName, args.rowBatches, args.timestamp);
} catch (IOError io) {
result.io = io;
} catch (IllegalArgument ia) {
result.ia = ia;
}
return result;
}
}
private static class atomicIncrement<I extends Iface> extends org.apache.thrift.ProcessFunction<I, atomicIncrement_args> {
public atomicIncrement() {
super("atomicIncrement");
}
protected atomicIncrement_args getEmptyArgsInstance() {
return new atomicIncrement_args();
}
protected atomicIncrement_result getResult(I iface, atomicIncrement_args args) throws org.apache.thrift.TException {
atomicIncrement_result result = new atomicIncrement_result();
try {
result.success = iface.atomicIncrement(args.tableName, args.row, args.column, args.value);
result.setSuccessIsSet(true);
} catch (IOError io) {
result.io = io;
} catch (IllegalArgument ia) {
result.ia = ia;
}
return result;
}
}
private static class deleteAll<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteAll_args> {
public deleteAll() {
super("deleteAll");
}
protected deleteAll_args getEmptyArgsInstance() {
return new deleteAll_args();
}
protected deleteAll_result getResult(I iface, deleteAll_args args) throws org.apache.thrift.TException {
deleteAll_result result = new deleteAll_result();
try {
iface.deleteAll(args.tableName, args.row, args.column);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class deleteAllTs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteAllTs_args> {
public deleteAllTs() {
super("deleteAllTs");
}
protected deleteAllTs_args getEmptyArgsInstance() {
return new deleteAllTs_args();
}
protected deleteAllTs_result getResult(I iface, deleteAllTs_args args) throws org.apache.thrift.TException {
deleteAllTs_result result = new deleteAllTs_result();
try {
iface.deleteAllTs(args.tableName, args.row, args.column, args.timestamp);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class deleteAllRow<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteAllRow_args> {
public deleteAllRow() {
super("deleteAllRow");
}
protected deleteAllRow_args getEmptyArgsInstance() {
return new deleteAllRow_args();
}
protected deleteAllRow_result getResult(I iface, deleteAllRow_args args) throws org.apache.thrift.TException {
deleteAllRow_result result = new deleteAllRow_result();
try {
iface.deleteAllRow(args.tableName, args.row);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class deleteAllRowTs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteAllRowTs_args> {
public deleteAllRowTs() {
super("deleteAllRowTs");
}
protected deleteAllRowTs_args getEmptyArgsInstance() {
return new deleteAllRowTs_args();
}
protected deleteAllRowTs_result getResult(I iface, deleteAllRowTs_args args) throws org.apache.thrift.TException {
deleteAllRowTs_result result = new deleteAllRowTs_result();
try {
iface.deleteAllRowTs(args.tableName, args.row, args.timestamp);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class scannerOpen<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scannerOpen_args> {
public scannerOpen() {
super("scannerOpen");
}
protected scannerOpen_args getEmptyArgsInstance() {
return new scannerOpen_args();
}
protected scannerOpen_result getResult(I iface, scannerOpen_args args) throws org.apache.thrift.TException {
scannerOpen_result result = new scannerOpen_result();
try {
result.success = iface.scannerOpen(args.tableName, args.startRow, args.columns);
result.setSuccessIsSet(true);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class scannerOpenWithStop<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scannerOpenWithStop_args> {
public scannerOpenWithStop() {
super("scannerOpenWithStop");
}
protected scannerOpenWithStop_args getEmptyArgsInstance() {
return new scannerOpenWithStop_args();
}
protected scannerOpenWithStop_result getResult(I iface, scannerOpenWithStop_args args) throws org.apache.thrift.TException {
scannerOpenWithStop_result result = new scannerOpenWithStop_result();
try {
result.success = iface.scannerOpenWithStop(args.tableName, args.startRow, args.stopRow, args.columns);
result.setSuccessIsSet(true);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class scannerOpenWithPrefix<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scannerOpenWithPrefix_args> {
public scannerOpenWithPrefix() {
super("scannerOpenWithPrefix");
}
protected scannerOpenWithPrefix_args getEmptyArgsInstance() {
return new scannerOpenWithPrefix_args();
}
protected scannerOpenWithPrefix_result getResult(I iface, scannerOpenWithPrefix_args args) throws org.apache.thrift.TException {
scannerOpenWithPrefix_result result = new scannerOpenWithPrefix_result();
try {
result.success = iface.scannerOpenWithPrefix(args.tableName, args.startAndPrefix, args.columns);
result.setSuccessIsSet(true);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class scannerOpenTs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scannerOpenTs_args> {
public scannerOpenTs() {
super("scannerOpenTs");
}
protected scannerOpenTs_args getEmptyArgsInstance() {
return new scannerOpenTs_args();
}
protected scannerOpenTs_result getResult(I iface, scannerOpenTs_args args) throws org.apache.thrift.TException {
scannerOpenTs_result result = new scannerOpenTs_result();
try {
result.success = iface.scannerOpenTs(args.tableName, args.startRow, args.columns, args.timestamp);
result.setSuccessIsSet(true);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class scannerOpenWithStopTs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scannerOpenWithStopTs_args> {
public scannerOpenWithStopTs() {
super("scannerOpenWithStopTs");
}
protected scannerOpenWithStopTs_args getEmptyArgsInstance() {
return new scannerOpenWithStopTs_args();
}
protected scannerOpenWithStopTs_result getResult(I iface, scannerOpenWithStopTs_args args) throws org.apache.thrift.TException {
scannerOpenWithStopTs_result result = new scannerOpenWithStopTs_result();
try {
result.success = iface.scannerOpenWithStopTs(args.tableName, args.startRow, args.stopRow, args.columns, args.timestamp);
result.setSuccessIsSet(true);
} catch (IOError io) {
result.io = io;
}
return result;
}
}
private static class scannerGet<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scannerGet_args> {
public scannerGet() {
super("scannerGet");
}
protected scannerGet_args getEmptyArgsInstance() {
return new scannerGet_args();
}
protected scannerGet_result getResult(I iface, scannerGet_args args) throws org.apache.thrift.TException {
scannerGet_result result = new scannerGet_result();
try {
result.success = iface.scannerGet(args.id);
} catch (IOError io) {
result.io = io;
} catch (IllegalArgument ia) {
result.ia = ia;
}
return result;
}
}
private static class scannerGetList<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scannerGetList_args> {
public scannerGetList() {
super("scannerGetList");
}
protected scannerGetList_args getEmptyArgsInstance() {
return new scannerGetList_args();
}
protected scannerGetList_result getResult(I iface, scannerGetList_args args) throws org.apache.thrift.TException {
scannerGetList_result result = new scannerGetList_result();
try {
result.success = iface.scannerGetList(args.id, args.nbRows);
} catch (IOError io) {
result.io = io;
} catch (IllegalArgument ia) {
result.ia = ia;
}
return result;
}
}
private static class scannerClose<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scannerClose_args> {
public scannerClose() {
super("scannerClose");
}
protected scannerClose_args getEmptyArgsInstance() {
return new scannerClose_args();
}
protected scannerClose_result getResult(I iface, scannerClose_args args) throws org.apache.thrift.TException {
scannerClose_result result = new scannerClose_result();
try {
iface.scannerClose(args.id);
} catch (IOError io) {
result.io = io;
} catch (IllegalArgument ia) {
result.ia = ia;
}
return result;
}
}
}
public static class enableTable_args implements org.apache.thrift.TBase<enableTable_args, enableTable_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enableTable_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 enableTable_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new enableTable_argsTupleSchemeFactory());
}
/**
* name of the table
*/
public ByteBuffer tableName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of the table
*/
TABLE_NAME((short)1, "tableName");
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_NAME
return TABLE_NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Bytes")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enableTable_args.class, metaDataMap);
}
public enableTable_args() {
}
public enableTable_args(
ByteBuffer tableName)
{
this();
this.tableName = tableName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public enableTable_args(enableTable_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
}
public enableTable_args deepCopy() {
return new enableTable_args(this);
}
@Override
public void clear() {
this.tableName = null;
}
/**
* name of the table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of the table
*/
public enableTable_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public enableTable_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
}
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_NAME:
return isSetTableName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof enableTable_args)
return this.equals((enableTable_args)that);
return false;
}
public boolean equals(enableTable_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(enableTable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
enableTable_args typedOther = (enableTable_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
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("enableTable_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 enableTable_argsStandardSchemeFactory implements SchemeFactory {
public enableTable_argsStandardScheme getScheme() {
return new enableTable_argsStandardScheme();
}
}
private static class enableTable_argsStandardScheme extends StandardScheme<enableTable_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, enableTable_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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, enableTable_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class enableTable_argsTupleSchemeFactory implements SchemeFactory {
public enableTable_argsTupleScheme getScheme() {
return new enableTable_argsTupleScheme();
}
}
private static class enableTable_argsTupleScheme extends TupleScheme<enableTable_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, enableTable_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, enableTable_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
}
}
}
public static class enableTable_result implements org.apache.thrift.TBase<enableTable_result, enableTable_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enableTable_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 enableTable_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new enableTable_resultTupleSchemeFactory());
}
public IOError 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(enableTable_result.class, metaDataMap);
}
public enableTable_result() {
}
public enableTable_result(
IOError io)
{
this();
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public enableTable_result(enableTable_result other) {
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public enableTable_result deepCopy() {
return new enableTable_result(this);
}
@Override
public void clear() {
this.io = null;
}
public IOError getIo() {
return this.io;
}
public enableTable_result setIo(IOError 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((IOError)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 enableTable_result)
return this.equals((enableTable_result)that);
return false;
}
public boolean equals(enableTable_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() {
return 0;
}
public int compareTo(enableTable_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
enableTable_result typedOther = (enableTable_result)other;
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("enableTable_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
}
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 enableTable_resultStandardSchemeFactory implements SchemeFactory {
public enableTable_resultStandardScheme getScheme() {
return new enableTable_resultStandardScheme();
}
}
private static class enableTable_resultStandardScheme extends StandardScheme<enableTable_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, enableTable_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 IOError();
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, enableTable_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 enableTable_resultTupleSchemeFactory implements SchemeFactory {
public enableTable_resultTupleScheme getScheme() {
return new enableTable_resultTupleScheme();
}
}
private static class enableTable_resultTupleScheme extends TupleScheme<enableTable_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, enableTable_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, enableTable_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class disableTable_args implements org.apache.thrift.TBase<disableTable_args, disableTable_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disableTable_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 disableTable_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new disableTable_argsTupleSchemeFactory());
}
/**
* name of the table
*/
public ByteBuffer tableName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of the table
*/
TABLE_NAME((short)1, "tableName");
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_NAME
return TABLE_NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Bytes")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disableTable_args.class, metaDataMap);
}
public disableTable_args() {
}
public disableTable_args(
ByteBuffer tableName)
{
this();
this.tableName = tableName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public disableTable_args(disableTable_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
}
public disableTable_args deepCopy() {
return new disableTable_args(this);
}
@Override
public void clear() {
this.tableName = null;
}
/**
* name of the table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of the table
*/
public disableTable_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public disableTable_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
}
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_NAME:
return isSetTableName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof disableTable_args)
return this.equals((disableTable_args)that);
return false;
}
public boolean equals(disableTable_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(disableTable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
disableTable_args typedOther = (disableTable_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
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("disableTable_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 disableTable_argsStandardSchemeFactory implements SchemeFactory {
public disableTable_argsStandardScheme getScheme() {
return new disableTable_argsStandardScheme();
}
}
private static class disableTable_argsStandardScheme extends StandardScheme<disableTable_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, disableTable_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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, disableTable_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class disableTable_argsTupleSchemeFactory implements SchemeFactory {
public disableTable_argsTupleScheme getScheme() {
return new disableTable_argsTupleScheme();
}
}
private static class disableTable_argsTupleScheme extends TupleScheme<disableTable_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, disableTable_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, disableTable_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
}
}
}
public static class disableTable_result implements org.apache.thrift.TBase<disableTable_result, disableTable_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disableTable_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 disableTable_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new disableTable_resultTupleSchemeFactory());
}
public IOError 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(disableTable_result.class, metaDataMap);
}
public disableTable_result() {
}
public disableTable_result(
IOError io)
{
this();
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public disableTable_result(disableTable_result other) {
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public disableTable_result deepCopy() {
return new disableTable_result(this);
}
@Override
public void clear() {
this.io = null;
}
public IOError getIo() {
return this.io;
}
public disableTable_result setIo(IOError 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((IOError)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 disableTable_result)
return this.equals((disableTable_result)that);
return false;
}
public boolean equals(disableTable_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() {
return 0;
}
public int compareTo(disableTable_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
disableTable_result typedOther = (disableTable_result)other;
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("disableTable_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
}
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 disableTable_resultStandardSchemeFactory implements SchemeFactory {
public disableTable_resultStandardScheme getScheme() {
return new disableTable_resultStandardScheme();
}
}
private static class disableTable_resultStandardScheme extends StandardScheme<disableTable_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, disableTable_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 IOError();
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, disableTable_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 disableTable_resultTupleSchemeFactory implements SchemeFactory {
public disableTable_resultTupleScheme getScheme() {
return new disableTable_resultTupleScheme();
}
}
private static class disableTable_resultTupleScheme extends TupleScheme<disableTable_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, disableTable_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, disableTable_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class isTableEnabled_args implements org.apache.thrift.TBase<isTableEnabled_args, isTableEnabled_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isTableEnabled_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 isTableEnabled_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new isTableEnabled_argsTupleSchemeFactory());
}
/**
* name of the table to check
*/
public ByteBuffer tableName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of the table to check
*/
TABLE_NAME((short)1, "tableName");
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_NAME
return TABLE_NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Bytes")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isTableEnabled_args.class, metaDataMap);
}
public isTableEnabled_args() {
}
public isTableEnabled_args(
ByteBuffer tableName)
{
this();
this.tableName = tableName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public isTableEnabled_args(isTableEnabled_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
}
public isTableEnabled_args deepCopy() {
return new isTableEnabled_args(this);
}
@Override
public void clear() {
this.tableName = null;
}
/**
* name of the table to check
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of the table to check
*/
public isTableEnabled_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public isTableEnabled_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
}
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_NAME:
return isSetTableName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof isTableEnabled_args)
return this.equals((isTableEnabled_args)that);
return false;
}
public boolean equals(isTableEnabled_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(isTableEnabled_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
isTableEnabled_args typedOther = (isTableEnabled_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
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("isTableEnabled_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 isTableEnabled_argsStandardSchemeFactory implements SchemeFactory {
public isTableEnabled_argsStandardScheme getScheme() {
return new isTableEnabled_argsStandardScheme();
}
}
private static class isTableEnabled_argsStandardScheme extends StandardScheme<isTableEnabled_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, isTableEnabled_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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, isTableEnabled_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class isTableEnabled_argsTupleSchemeFactory implements SchemeFactory {
public isTableEnabled_argsTupleScheme getScheme() {
return new isTableEnabled_argsTupleScheme();
}
}
private static class isTableEnabled_argsTupleScheme extends TupleScheme<isTableEnabled_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, isTableEnabled_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, isTableEnabled_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
}
}
}
public static class isTableEnabled_result implements org.apache.thrift.TBase<isTableEnabled_result, isTableEnabled_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isTableEnabled_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 isTableEnabled_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new isTableEnabled_resultTupleSchemeFactory());
}
public boolean success; // required
public IOError 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 BitSet __isset_bit_vector = new BitSet(1);
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(isTableEnabled_result.class, metaDataMap);
}
public isTableEnabled_result() {
}
public isTableEnabled_result(
boolean success,
IOError io)
{
this();
this.success = success;
setSuccessIsSet(true);
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public isTableEnabled_result(isTableEnabled_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public isTableEnabled_result deepCopy() {
return new isTableEnabled_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.io = null;
}
public boolean isSuccess() {
return this.success;
}
public isTableEnabled_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public IOError getIo() {
return this.io;
}
public isTableEnabled_result setIo(IOError 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((IOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Boolean.valueOf(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 isTableEnabled_result)
return this.equals((isTableEnabled_result)that);
return false;
}
public boolean equals(isTableEnabled_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() {
return 0;
}
public int compareTo(isTableEnabled_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
isTableEnabled_result typedOther = (isTableEnabled_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("isTableEnabled_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
}
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_bit_vector = new BitSet(1);
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 isTableEnabled_resultStandardSchemeFactory implements SchemeFactory {
public isTableEnabled_resultStandardScheme getScheme() {
return new isTableEnabled_resultStandardScheme();
}
}
private static class isTableEnabled_resultStandardScheme extends StandardScheme<isTableEnabled_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, isTableEnabled_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 IOError();
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, isTableEnabled_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
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 isTableEnabled_resultTupleSchemeFactory implements SchemeFactory {
public isTableEnabled_resultTupleScheme getScheme() {
return new isTableEnabled_resultTupleScheme();
}
}
private static class isTableEnabled_resultTupleScheme extends TupleScheme<isTableEnabled_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, isTableEnabled_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, isTableEnabled_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 IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class compact_args implements org.apache.thrift.TBase<compact_args, compact_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_OR_REGION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableNameOrRegionName", 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 compact_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new compact_argsTupleSchemeFactory());
}
public ByteBuffer tableNameOrRegionName; // 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_NAME_OR_REGION_NAME((short)1, "tableNameOrRegionName");
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_NAME_OR_REGION_NAME
return TABLE_NAME_OR_REGION_NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.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_NAME_OR_REGION_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableNameOrRegionName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Bytes")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact_args.class, metaDataMap);
}
public compact_args() {
}
public compact_args(
ByteBuffer tableNameOrRegionName)
{
this();
this.tableNameOrRegionName = tableNameOrRegionName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public compact_args(compact_args other) {
if (other.isSetTableNameOrRegionName()) {
this.tableNameOrRegionName = other.tableNameOrRegionName;
}
}
public compact_args deepCopy() {
return new compact_args(this);
}
@Override
public void clear() {
this.tableNameOrRegionName = null;
}
public byte[] getTableNameOrRegionName() {
setTableNameOrRegionName(org.apache.thrift.TBaseHelper.rightSize(tableNameOrRegionName));
return tableNameOrRegionName == null ? null : tableNameOrRegionName.array();
}
public ByteBuffer bufferForTableNameOrRegionName() {
return tableNameOrRegionName;
}
public compact_args setTableNameOrRegionName(byte[] tableNameOrRegionName) {
setTableNameOrRegionName(tableNameOrRegionName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableNameOrRegionName));
return this;
}
public compact_args setTableNameOrRegionName(ByteBuffer tableNameOrRegionName) {
this.tableNameOrRegionName = tableNameOrRegionName;
return this;
}
public void unsetTableNameOrRegionName() {
this.tableNameOrRegionName = null;
}
/** Returns true if field tableNameOrRegionName is set (has been assigned a value) and false otherwise */
public boolean isSetTableNameOrRegionName() {
return this.tableNameOrRegionName != null;
}
public void setTableNameOrRegionNameIsSet(boolean value) {
if (!value) {
this.tableNameOrRegionName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME_OR_REGION_NAME:
if (value == null) {
unsetTableNameOrRegionName();
} else {
setTableNameOrRegionName((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME_OR_REGION_NAME:
return getTableNameOrRegionName();
}
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_NAME_OR_REGION_NAME:
return isSetTableNameOrRegionName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof compact_args)
return this.equals((compact_args)that);
return false;
}
public boolean equals(compact_args that) {
if (that == null)
return false;
boolean this_present_tableNameOrRegionName = true && this.isSetTableNameOrRegionName();
boolean that_present_tableNameOrRegionName = true && that.isSetTableNameOrRegionName();
if (this_present_tableNameOrRegionName || that_present_tableNameOrRegionName) {
if (!(this_present_tableNameOrRegionName && that_present_tableNameOrRegionName))
return false;
if (!this.tableNameOrRegionName.equals(that.tableNameOrRegionName))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(compact_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
compact_args typedOther = (compact_args)other;
lastComparison = Boolean.valueOf(isSetTableNameOrRegionName()).compareTo(typedOther.isSetTableNameOrRegionName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableNameOrRegionName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableNameOrRegionName, typedOther.tableNameOrRegionName);
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("compact_args(");
boolean first = true;
sb.append("tableNameOrRegionName:");
if (this.tableNameOrRegionName == null) {
sb.append("null");
} else {
sb.append(this.tableNameOrRegionName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 compact_argsStandardSchemeFactory implements SchemeFactory {
public compact_argsStandardScheme getScheme() {
return new compact_argsStandardScheme();
}
}
private static class compact_argsStandardScheme extends StandardScheme<compact_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, compact_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_NAME_OR_REGION_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableNameOrRegionName = iprot.readBinary();
struct.setTableNameOrRegionNameIsSet(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, compact_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableNameOrRegionName != null) {
oprot.writeFieldBegin(TABLE_NAME_OR_REGION_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableNameOrRegionName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class compact_argsTupleSchemeFactory implements SchemeFactory {
public compact_argsTupleScheme getScheme() {
return new compact_argsTupleScheme();
}
}
private static class compact_argsTupleScheme extends TupleScheme<compact_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, compact_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableNameOrRegionName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTableNameOrRegionName()) {
oprot.writeBinary(struct.tableNameOrRegionName);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, compact_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.tableNameOrRegionName = iprot.readBinary();
struct.setTableNameOrRegionNameIsSet(true);
}
}
}
}
public static class compact_result implements org.apache.thrift.TBase<compact_result, compact_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_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 compact_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new compact_resultTupleSchemeFactory());
}
public IOError 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(compact_result.class, metaDataMap);
}
public compact_result() {
}
public compact_result(
IOError io)
{
this();
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public compact_result(compact_result other) {
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public compact_result deepCopy() {
return new compact_result(this);
}
@Override
public void clear() {
this.io = null;
}
public IOError getIo() {
return this.io;
}
public compact_result setIo(IOError 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((IOError)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 compact_result)
return this.equals((compact_result)that);
return false;
}
public boolean equals(compact_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() {
return 0;
}
public int compareTo(compact_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
compact_result typedOther = (compact_result)other;
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("compact_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
}
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 compact_resultStandardSchemeFactory implements SchemeFactory {
public compact_resultStandardScheme getScheme() {
return new compact_resultStandardScheme();
}
}
private static class compact_resultStandardScheme extends StandardScheme<compact_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, compact_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 IOError();
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, compact_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 compact_resultTupleSchemeFactory implements SchemeFactory {
public compact_resultTupleScheme getScheme() {
return new compact_resultTupleScheme();
}
}
private static class compact_resultTupleScheme extends TupleScheme<compact_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, compact_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, compact_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class majorCompact_args implements org.apache.thrift.TBase<majorCompact_args, majorCompact_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("majorCompact_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_OR_REGION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableNameOrRegionName", 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 majorCompact_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new majorCompact_argsTupleSchemeFactory());
}
public ByteBuffer tableNameOrRegionName; // 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_NAME_OR_REGION_NAME((short)1, "tableNameOrRegionName");
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_NAME_OR_REGION_NAME
return TABLE_NAME_OR_REGION_NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.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_NAME_OR_REGION_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableNameOrRegionName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Bytes")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(majorCompact_args.class, metaDataMap);
}
public majorCompact_args() {
}
public majorCompact_args(
ByteBuffer tableNameOrRegionName)
{
this();
this.tableNameOrRegionName = tableNameOrRegionName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public majorCompact_args(majorCompact_args other) {
if (other.isSetTableNameOrRegionName()) {
this.tableNameOrRegionName = other.tableNameOrRegionName;
}
}
public majorCompact_args deepCopy() {
return new majorCompact_args(this);
}
@Override
public void clear() {
this.tableNameOrRegionName = null;
}
public byte[] getTableNameOrRegionName() {
setTableNameOrRegionName(org.apache.thrift.TBaseHelper.rightSize(tableNameOrRegionName));
return tableNameOrRegionName == null ? null : tableNameOrRegionName.array();
}
public ByteBuffer bufferForTableNameOrRegionName() {
return tableNameOrRegionName;
}
public majorCompact_args setTableNameOrRegionName(byte[] tableNameOrRegionName) {
setTableNameOrRegionName(tableNameOrRegionName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableNameOrRegionName));
return this;
}
public majorCompact_args setTableNameOrRegionName(ByteBuffer tableNameOrRegionName) {
this.tableNameOrRegionName = tableNameOrRegionName;
return this;
}
public void unsetTableNameOrRegionName() {
this.tableNameOrRegionName = null;
}
/** Returns true if field tableNameOrRegionName is set (has been assigned a value) and false otherwise */
public boolean isSetTableNameOrRegionName() {
return this.tableNameOrRegionName != null;
}
public void setTableNameOrRegionNameIsSet(boolean value) {
if (!value) {
this.tableNameOrRegionName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME_OR_REGION_NAME:
if (value == null) {
unsetTableNameOrRegionName();
} else {
setTableNameOrRegionName((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME_OR_REGION_NAME:
return getTableNameOrRegionName();
}
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_NAME_OR_REGION_NAME:
return isSetTableNameOrRegionName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof majorCompact_args)
return this.equals((majorCompact_args)that);
return false;
}
public boolean equals(majorCompact_args that) {
if (that == null)
return false;
boolean this_present_tableNameOrRegionName = true && this.isSetTableNameOrRegionName();
boolean that_present_tableNameOrRegionName = true && that.isSetTableNameOrRegionName();
if (this_present_tableNameOrRegionName || that_present_tableNameOrRegionName) {
if (!(this_present_tableNameOrRegionName && that_present_tableNameOrRegionName))
return false;
if (!this.tableNameOrRegionName.equals(that.tableNameOrRegionName))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(majorCompact_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
majorCompact_args typedOther = (majorCompact_args)other;
lastComparison = Boolean.valueOf(isSetTableNameOrRegionName()).compareTo(typedOther.isSetTableNameOrRegionName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableNameOrRegionName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableNameOrRegionName, typedOther.tableNameOrRegionName);
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("majorCompact_args(");
boolean first = true;
sb.append("tableNameOrRegionName:");
if (this.tableNameOrRegionName == null) {
sb.append("null");
} else {
sb.append(this.tableNameOrRegionName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 majorCompact_argsStandardSchemeFactory implements SchemeFactory {
public majorCompact_argsStandardScheme getScheme() {
return new majorCompact_argsStandardScheme();
}
}
private static class majorCompact_argsStandardScheme extends StandardScheme<majorCompact_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, majorCompact_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_NAME_OR_REGION_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableNameOrRegionName = iprot.readBinary();
struct.setTableNameOrRegionNameIsSet(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, majorCompact_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableNameOrRegionName != null) {
oprot.writeFieldBegin(TABLE_NAME_OR_REGION_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableNameOrRegionName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class majorCompact_argsTupleSchemeFactory implements SchemeFactory {
public majorCompact_argsTupleScheme getScheme() {
return new majorCompact_argsTupleScheme();
}
}
private static class majorCompact_argsTupleScheme extends TupleScheme<majorCompact_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, majorCompact_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableNameOrRegionName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTableNameOrRegionName()) {
oprot.writeBinary(struct.tableNameOrRegionName);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, majorCompact_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.tableNameOrRegionName = iprot.readBinary();
struct.setTableNameOrRegionNameIsSet(true);
}
}
}
}
public static class majorCompact_result implements org.apache.thrift.TBase<majorCompact_result, majorCompact_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("majorCompact_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 majorCompact_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new majorCompact_resultTupleSchemeFactory());
}
public IOError 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(majorCompact_result.class, metaDataMap);
}
public majorCompact_result() {
}
public majorCompact_result(
IOError io)
{
this();
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public majorCompact_result(majorCompact_result other) {
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public majorCompact_result deepCopy() {
return new majorCompact_result(this);
}
@Override
public void clear() {
this.io = null;
}
public IOError getIo() {
return this.io;
}
public majorCompact_result setIo(IOError 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((IOError)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 majorCompact_result)
return this.equals((majorCompact_result)that);
return false;
}
public boolean equals(majorCompact_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() {
return 0;
}
public int compareTo(majorCompact_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
majorCompact_result typedOther = (majorCompact_result)other;
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("majorCompact_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
}
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 majorCompact_resultStandardSchemeFactory implements SchemeFactory {
public majorCompact_resultStandardScheme getScheme() {
return new majorCompact_resultStandardScheme();
}
}
private static class majorCompact_resultStandardScheme extends StandardScheme<majorCompact_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, majorCompact_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 IOError();
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, majorCompact_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 majorCompact_resultTupleSchemeFactory implements SchemeFactory {
public majorCompact_resultTupleScheme getScheme() {
return new majorCompact_resultTupleScheme();
}
}
private static class majorCompact_resultTupleScheme extends TupleScheme<majorCompact_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, majorCompact_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, majorCompact_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class getTableNames_args implements org.apache.thrift.TBase<getTableNames_args, getTableNames_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableNames_args");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getTableNames_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getTableNames_argsTupleSchemeFactory());
}
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTableNames_args.class, metaDataMap);
}
public getTableNames_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getTableNames_args(getTableNames_args other) {
}
public getTableNames_args deepCopy() {
return new getTableNames_args(this);
}
@Override
public void clear() {
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getTableNames_args)
return this.equals((getTableNames_args)that);
return false;
}
public boolean equals(getTableNames_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getTableNames_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getTableNames_args typedOther = (getTableNames_args)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getTableNames_args(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 getTableNames_argsStandardSchemeFactory implements SchemeFactory {
public getTableNames_argsStandardScheme getScheme() {
return new getTableNames_argsStandardScheme();
}
}
private static class getTableNames_argsStandardScheme extends StandardScheme<getTableNames_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getTableNames_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getTableNames_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getTableNames_argsTupleSchemeFactory implements SchemeFactory {
public getTableNames_argsTupleScheme getScheme() {
return new getTableNames_argsTupleScheme();
}
}
private static class getTableNames_argsTupleScheme extends TupleScheme<getTableNames_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getTableNames_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getTableNames_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class getTableNames_result implements org.apache.thrift.TBase<getTableNames_result, getTableNames_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableNames_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 getTableNames_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getTableNames_resultTupleSchemeFactory());
}
public List<ByteBuffer> success; // required
public IOError 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.STRING , "Text"))));
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(getTableNames_result.class, metaDataMap);
}
public getTableNames_result() {
}
public getTableNames_result(
List<ByteBuffer> success,
IOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getTableNames_result(getTableNames_result other) {
if (other.isSetSuccess()) {
List<ByteBuffer> __this__success = new ArrayList<ByteBuffer>();
for (ByteBuffer other_element : other.success) {
__this__success.add(other_element);
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public getTableNames_result deepCopy() {
return new getTableNames_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<ByteBuffer> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(ByteBuffer elem) {
if (this.success == null) {
this.success = new ArrayList<ByteBuffer>();
}
this.success.add(elem);
}
public List<ByteBuffer> getSuccess() {
return this.success;
}
public getTableNames_result setSuccess(List<ByteBuffer> success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public IOError getIo() {
return this.io;
}
public getTableNames_result setIo(IOError 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<ByteBuffer>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((IOError)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 getTableNames_result)
return this.equals((getTableNames_result)that);
return false;
}
public boolean equals(getTableNames_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(getTableNames_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getTableNames_result typedOther = (getTableNames_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("getTableNames_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
}
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 getTableNames_resultStandardSchemeFactory implements SchemeFactory {
public getTableNames_resultStandardScheme getScheme() {
return new getTableNames_resultStandardScheme();
}
}
private static class getTableNames_resultStandardScheme extends StandardScheme<getTableNames_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getTableNames_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 _list18 = iprot.readListBegin();
struct.success = new ArrayList<ByteBuffer>(_list18.size);
for (int _i19 = 0; _i19 < _list18.size; ++_i19)
{
ByteBuffer _elem20; // required
_elem20 = iprot.readBinary();
struct.success.add(_elem20);
}
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 IOError();
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, getTableNames_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.STRING, struct.success.size()));
for (ByteBuffer _iter21 : struct.success)
{
oprot.writeBinary(_iter21);
}
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 getTableNames_resultTupleSchemeFactory implements SchemeFactory {
public getTableNames_resultTupleScheme getScheme() {
return new getTableNames_resultTupleScheme();
}
}
private static class getTableNames_resultTupleScheme extends TupleScheme<getTableNames_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getTableNames_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 (ByteBuffer _iter22 : struct.success)
{
oprot.writeBinary(_iter22);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getTableNames_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 _list23 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.success = new ArrayList<ByteBuffer>(_list23.size);
for (int _i24 = 0; _i24 < _list23.size; ++_i24)
{
ByteBuffer _elem25; // required
_elem25 = iprot.readBinary();
struct.success.add(_elem25);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class getColumnDescriptors_args implements org.apache.thrift.TBase<getColumnDescriptors_args, getColumnDescriptors_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getColumnDescriptors_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 getColumnDescriptors_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getColumnDescriptors_argsTupleSchemeFactory());
}
/**
* table name
*/
public ByteBuffer tableName; // 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 name
*/
TABLE_NAME((short)1, "tableName");
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_NAME
return TABLE_NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getColumnDescriptors_args.class, metaDataMap);
}
public getColumnDescriptors_args() {
}
public getColumnDescriptors_args(
ByteBuffer tableName)
{
this();
this.tableName = tableName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getColumnDescriptors_args(getColumnDescriptors_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
}
public getColumnDescriptors_args deepCopy() {
return new getColumnDescriptors_args(this);
}
@Override
public void clear() {
this.tableName = null;
}
/**
* table name
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* table name
*/
public getColumnDescriptors_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public getColumnDescriptors_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
}
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_NAME:
return isSetTableName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getColumnDescriptors_args)
return this.equals((getColumnDescriptors_args)that);
return false;
}
public boolean equals(getColumnDescriptors_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getColumnDescriptors_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getColumnDescriptors_args typedOther = (getColumnDescriptors_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
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("getColumnDescriptors_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 getColumnDescriptors_argsStandardSchemeFactory implements SchemeFactory {
public getColumnDescriptors_argsStandardScheme getScheme() {
return new getColumnDescriptors_argsStandardScheme();
}
}
private static class getColumnDescriptors_argsStandardScheme extends StandardScheme<getColumnDescriptors_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getColumnDescriptors_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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, getColumnDescriptors_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getColumnDescriptors_argsTupleSchemeFactory implements SchemeFactory {
public getColumnDescriptors_argsTupleScheme getScheme() {
return new getColumnDescriptors_argsTupleScheme();
}
}
private static class getColumnDescriptors_argsTupleScheme extends TupleScheme<getColumnDescriptors_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getColumnDescriptors_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getColumnDescriptors_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
}
}
}
public static class getColumnDescriptors_result implements org.apache.thrift.TBase<getColumnDescriptors_result, getColumnDescriptors_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getColumnDescriptors_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (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 getColumnDescriptors_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getColumnDescriptors_resultTupleSchemeFactory());
}
public Map<ByteBuffer,ColumnDescriptor> success; // required
public IOError 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.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"),
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnDescriptor.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(getColumnDescriptors_result.class, metaDataMap);
}
public getColumnDescriptors_result() {
}
public getColumnDescriptors_result(
Map<ByteBuffer,ColumnDescriptor> success,
IOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getColumnDescriptors_result(getColumnDescriptors_result other) {
if (other.isSetSuccess()) {
Map<ByteBuffer,ColumnDescriptor> __this__success = new HashMap<ByteBuffer,ColumnDescriptor>();
for (Map.Entry<ByteBuffer, ColumnDescriptor> other_element : other.success.entrySet()) {
ByteBuffer other_element_key = other_element.getKey();
ColumnDescriptor other_element_value = other_element.getValue();
ByteBuffer __this__success_copy_key = other_element_key;
ColumnDescriptor __this__success_copy_value = new ColumnDescriptor(other_element_value);
__this__success.put(__this__success_copy_key, __this__success_copy_value);
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public getColumnDescriptors_result deepCopy() {
return new getColumnDescriptors_result(this);
}
@Override
public void clear() {
this.success = null;
this.io = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public void putToSuccess(ByteBuffer key, ColumnDescriptor val) {
if (this.success == null) {
this.success = new HashMap<ByteBuffer,ColumnDescriptor>();
}
this.success.put(key, val);
}
public Map<ByteBuffer,ColumnDescriptor> getSuccess() {
return this.success;
}
public getColumnDescriptors_result setSuccess(Map<ByteBuffer,ColumnDescriptor> 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 IOError getIo() {
return this.io;
}
public getColumnDescriptors_result setIo(IOError 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((Map<ByteBuffer,ColumnDescriptor>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((IOError)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 getColumnDescriptors_result)
return this.equals((getColumnDescriptors_result)that);
return false;
}
public boolean equals(getColumnDescriptors_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(getColumnDescriptors_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getColumnDescriptors_result typedOther = (getColumnDescriptors_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("getColumnDescriptors_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
}
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 getColumnDescriptors_resultStandardSchemeFactory implements SchemeFactory {
public getColumnDescriptors_resultStandardScheme getScheme() {
return new getColumnDescriptors_resultStandardScheme();
}
}
private static class getColumnDescriptors_resultStandardScheme extends StandardScheme<getColumnDescriptors_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getColumnDescriptors_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.MAP) {
{
org.apache.thrift.protocol.TMap _map26 = iprot.readMapBegin();
struct.success = new HashMap<ByteBuffer,ColumnDescriptor>(2*_map26.size);
for (int _i27 = 0; _i27 < _map26.size; ++_i27)
{
ByteBuffer _key28; // required
ColumnDescriptor _val29; // optional
_key28 = iprot.readBinary();
_val29 = new ColumnDescriptor();
_val29.read(iprot);
struct.success.put(_key28, _val29);
}
iprot.readMapEnd();
}
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 IOError();
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, getColumnDescriptors_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
for (Map.Entry<ByteBuffer, ColumnDescriptor> _iter30 : struct.success.entrySet())
{
oprot.writeBinary(_iter30.getKey());
_iter30.getValue().write(oprot);
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
if (struct.io != null) {
oprot.writeFieldBegin(IO_FIELD_DESC);
struct.io.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getColumnDescriptors_resultTupleSchemeFactory implements SchemeFactory {
public getColumnDescriptors_resultTupleScheme getScheme() {
return new getColumnDescriptors_resultTupleScheme();
}
}
private static class getColumnDescriptors_resultTupleScheme extends TupleScheme<getColumnDescriptors_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getColumnDescriptors_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 (Map.Entry<ByteBuffer, ColumnDescriptor> _iter31 : struct.success.entrySet())
{
oprot.writeBinary(_iter31.getKey());
_iter31.getValue().write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getColumnDescriptors_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map32 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new HashMap<ByteBuffer,ColumnDescriptor>(2*_map32.size);
for (int _i33 = 0; _i33 < _map32.size; ++_i33)
{
ByteBuffer _key34; // required
ColumnDescriptor _val35; // optional
_key34 = iprot.readBinary();
_val35 = new ColumnDescriptor();
_val35.read(iprot);
struct.success.put(_key34, _val35);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class getTableRegions_args implements org.apache.thrift.TBase<getTableRegions_args, getTableRegions_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableRegions_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 getTableRegions_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getTableRegions_argsTupleSchemeFactory());
}
/**
* table name
*/
public ByteBuffer tableName; // 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 name
*/
TABLE_NAME((short)1, "tableName");
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_NAME
return TABLE_NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTableRegions_args.class, metaDataMap);
}
public getTableRegions_args() {
}
public getTableRegions_args(
ByteBuffer tableName)
{
this();
this.tableName = tableName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getTableRegions_args(getTableRegions_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
}
public getTableRegions_args deepCopy() {
return new getTableRegions_args(this);
}
@Override
public void clear() {
this.tableName = null;
}
/**
* table name
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* table name
*/
public getTableRegions_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public getTableRegions_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
}
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_NAME:
return isSetTableName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getTableRegions_args)
return this.equals((getTableRegions_args)that);
return false;
}
public boolean equals(getTableRegions_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getTableRegions_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getTableRegions_args typedOther = (getTableRegions_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
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("getTableRegions_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 getTableRegions_argsStandardSchemeFactory implements SchemeFactory {
public getTableRegions_argsStandardScheme getScheme() {
return new getTableRegions_argsStandardScheme();
}
}
private static class getTableRegions_argsStandardScheme extends StandardScheme<getTableRegions_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getTableRegions_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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, getTableRegions_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getTableRegions_argsTupleSchemeFactory implements SchemeFactory {
public getTableRegions_argsTupleScheme getScheme() {
return new getTableRegions_argsTupleScheme();
}
}
private static class getTableRegions_argsTupleScheme extends TupleScheme<getTableRegions_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getTableRegions_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getTableRegions_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
}
}
}
public static class getTableRegions_result implements org.apache.thrift.TBase<getTableRegions_result, getTableRegions_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableRegions_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 getTableRegions_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getTableRegions_resultTupleSchemeFactory());
}
public List<TRegionInfo> success; // required
public IOError 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, TRegionInfo.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(getTableRegions_result.class, metaDataMap);
}
public getTableRegions_result() {
}
public getTableRegions_result(
List<TRegionInfo> success,
IOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getTableRegions_result(getTableRegions_result other) {
if (other.isSetSuccess()) {
List<TRegionInfo> __this__success = new ArrayList<TRegionInfo>();
for (TRegionInfo other_element : other.success) {
__this__success.add(new TRegionInfo(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public getTableRegions_result deepCopy() {
return new getTableRegions_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<TRegionInfo> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TRegionInfo elem) {
if (this.success == null) {
this.success = new ArrayList<TRegionInfo>();
}
this.success.add(elem);
}
public List<TRegionInfo> getSuccess() {
return this.success;
}
public getTableRegions_result setSuccess(List<TRegionInfo> 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 IOError getIo() {
return this.io;
}
public getTableRegions_result setIo(IOError 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<TRegionInfo>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((IOError)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 getTableRegions_result)
return this.equals((getTableRegions_result)that);
return false;
}
public boolean equals(getTableRegions_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(getTableRegions_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getTableRegions_result typedOther = (getTableRegions_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("getTableRegions_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
}
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 getTableRegions_resultStandardSchemeFactory implements SchemeFactory {
public getTableRegions_resultStandardScheme getScheme() {
return new getTableRegions_resultStandardScheme();
}
}
private static class getTableRegions_resultStandardScheme extends StandardScheme<getTableRegions_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getTableRegions_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 _list36 = iprot.readListBegin();
struct.success = new ArrayList<TRegionInfo>(_list36.size);
for (int _i37 = 0; _i37 < _list36.size; ++_i37)
{
TRegionInfo _elem38; // required
_elem38 = new TRegionInfo();
_elem38.read(iprot);
struct.success.add(_elem38);
}
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 IOError();
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, getTableRegions_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 (TRegionInfo _iter39 : struct.success)
{
_iter39.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 getTableRegions_resultTupleSchemeFactory implements SchemeFactory {
public getTableRegions_resultTupleScheme getScheme() {
return new getTableRegions_resultTupleScheme();
}
}
private static class getTableRegions_resultTupleScheme extends TupleScheme<getTableRegions_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getTableRegions_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 (TRegionInfo _iter40 : struct.success)
{
_iter40.write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getTableRegions_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 _list41 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TRegionInfo>(_list41.size);
for (int _i42 = 0; _i42 < _list41.size; ++_i42)
{
TRegionInfo _elem43; // required
_elem43 = new TRegionInfo();
_elem43.read(iprot);
struct.success.add(_elem43);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class createTable_args implements org.apache.thrift.TBase<createTable_args, createTable_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTable_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField COLUMN_FAMILIES_FIELD_DESC = new org.apache.thrift.protocol.TField("columnFamilies", 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 createTable_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new createTable_argsTupleSchemeFactory());
}
/**
* name of table to create
*/
public ByteBuffer tableName; // required
/**
* list of column family descriptors
*/
public List<ColumnDescriptor> columnFamilies; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table to create
*/
TABLE_NAME((short)1, "tableName"),
/**
* list of column family descriptors
*/
COLUMN_FAMILIES((short)2, "columnFamilies");
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_NAME
return TABLE_NAME;
case 2: // COLUMN_FAMILIES
return COLUMN_FAMILIES;
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.COLUMN_FAMILIES, new org.apache.thrift.meta_data.FieldMetaData("columnFamilies", 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, ColumnDescriptor.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createTable_args.class, metaDataMap);
}
public createTable_args() {
}
public createTable_args(
ByteBuffer tableName,
List<ColumnDescriptor> columnFamilies)
{
this();
this.tableName = tableName;
this.columnFamilies = columnFamilies;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public createTable_args(createTable_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetColumnFamilies()) {
List<ColumnDescriptor> __this__columnFamilies = new ArrayList<ColumnDescriptor>();
for (ColumnDescriptor other_element : other.columnFamilies) {
__this__columnFamilies.add(new ColumnDescriptor(other_element));
}
this.columnFamilies = __this__columnFamilies;
}
}
public createTable_args deepCopy() {
return new createTable_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.columnFamilies = null;
}
/**
* name of table to create
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table to create
*/
public createTable_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public createTable_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public int getColumnFamiliesSize() {
return (this.columnFamilies == null) ? 0 : this.columnFamilies.size();
}
public java.util.Iterator<ColumnDescriptor> getColumnFamiliesIterator() {
return (this.columnFamilies == null) ? null : this.columnFamilies.iterator();
}
public void addToColumnFamilies(ColumnDescriptor elem) {
if (this.columnFamilies == null) {
this.columnFamilies = new ArrayList<ColumnDescriptor>();
}
this.columnFamilies.add(elem);
}
/**
* list of column family descriptors
*/
public List<ColumnDescriptor> getColumnFamilies() {
return this.columnFamilies;
}
/**
* list of column family descriptors
*/
public createTable_args setColumnFamilies(List<ColumnDescriptor> columnFamilies) {
this.columnFamilies = columnFamilies;
return this;
}
public void unsetColumnFamilies() {
this.columnFamilies = null;
}
/** Returns true if field columnFamilies is set (has been assigned a value) and false otherwise */
public boolean isSetColumnFamilies() {
return this.columnFamilies != null;
}
public void setColumnFamiliesIsSet(boolean value) {
if (!value) {
this.columnFamilies = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case COLUMN_FAMILIES:
if (value == null) {
unsetColumnFamilies();
} else {
setColumnFamilies((List<ColumnDescriptor>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case COLUMN_FAMILIES:
return getColumnFamilies();
}
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_NAME:
return isSetTableName();
case COLUMN_FAMILIES:
return isSetColumnFamilies();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof createTable_args)
return this.equals((createTable_args)that);
return false;
}
public boolean equals(createTable_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_columnFamilies = true && this.isSetColumnFamilies();
boolean that_present_columnFamilies = true && that.isSetColumnFamilies();
if (this_present_columnFamilies || that_present_columnFamilies) {
if (!(this_present_columnFamilies && that_present_columnFamilies))
return false;
if (!this.columnFamilies.equals(that.columnFamilies))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(createTable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
createTable_args typedOther = (createTable_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumnFamilies()).compareTo(typedOther.isSetColumnFamilies());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnFamilies()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnFamilies, typedOther.columnFamilies);
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("createTable_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("columnFamilies:");
if (this.columnFamilies == null) {
sb.append("null");
} else {
sb.append(this.columnFamilies);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 createTable_argsStandardSchemeFactory implements SchemeFactory {
public createTable_argsStandardScheme getScheme() {
return new createTable_argsStandardScheme();
}
}
private static class createTable_argsStandardScheme extends StandardScheme<createTable_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, createTable_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // COLUMN_FAMILIES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list44 = iprot.readListBegin();
struct.columnFamilies = new ArrayList<ColumnDescriptor>(_list44.size);
for (int _i45 = 0; _i45 < _list44.size; ++_i45)
{
ColumnDescriptor _elem46; // required
_elem46 = new ColumnDescriptor();
_elem46.read(iprot);
struct.columnFamilies.add(_elem46);
}
iprot.readListEnd();
}
struct.setColumnFamiliesIsSet(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, createTable_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.columnFamilies != null) {
oprot.writeFieldBegin(COLUMN_FAMILIES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columnFamilies.size()));
for (ColumnDescriptor _iter47 : struct.columnFamilies)
{
_iter47.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createTable_argsTupleSchemeFactory implements SchemeFactory {
public createTable_argsTupleScheme getScheme() {
return new createTable_argsTupleScheme();
}
}
private static class createTable_argsTupleScheme extends TupleScheme<createTable_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createTable_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetColumnFamilies()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetColumnFamilies()) {
{
oprot.writeI32(struct.columnFamilies.size());
for (ColumnDescriptor _iter48 : struct.columnFamilies)
{
_iter48.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createTable_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list49 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.columnFamilies = new ArrayList<ColumnDescriptor>(_list49.size);
for (int _i50 = 0; _i50 < _list49.size; ++_i50)
{
ColumnDescriptor _elem51; // required
_elem51 = new ColumnDescriptor();
_elem51.read(iprot);
struct.columnFamilies.add(_elem51);
}
}
struct.setColumnFamiliesIsSet(true);
}
}
}
}
public static class createTable_result implements org.apache.thrift.TBase<createTable_result, createTable_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTable_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 org.apache.thrift.protocol.TField EXIST_FIELD_DESC = new org.apache.thrift.protocol.TField("exist", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new createTable_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new createTable_resultTupleSchemeFactory());
}
public IOError io; // required
public IllegalArgument ia; // required
public AlreadyExists exist; // 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"),
IA((short)2, "ia"),
EXIST((short)3, "exist");
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;
case 3: // EXIST
return EXIST;
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)));
tmpMap.put(_Fields.EXIST, new org.apache.thrift.meta_data.FieldMetaData("exist", 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(createTable_result.class, metaDataMap);
}
public createTable_result() {
}
public createTable_result(
IOError io,
IllegalArgument ia,
AlreadyExists exist)
{
this();
this.io = io;
this.ia = ia;
this.exist = exist;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public createTable_result(createTable_result other) {
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
if (other.isSetIa()) {
this.ia = new IllegalArgument(other.ia);
}
if (other.isSetExist()) {
this.exist = new AlreadyExists(other.exist);
}
}
public createTable_result deepCopy() {
return new createTable_result(this);
}
@Override
public void clear() {
this.io = null;
this.ia = null;
this.exist = null;
}
public IOError getIo() {
return this.io;
}
public createTable_result setIo(IOError 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 IllegalArgument getIa() {
return this.ia;
}
public createTable_result setIa(IllegalArgument 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 AlreadyExists getExist() {
return this.exist;
}
public createTable_result setExist(AlreadyExists exist) {
this.exist = exist;
return this;
}
public void unsetExist() {
this.exist = null;
}
/** Returns true if field exist is set (has been assigned a value) and false otherwise */
public boolean isSetExist() {
return this.exist != null;
}
public void setExistIsSet(boolean value) {
if (!value) {
this.exist = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case IO:
if (value == null) {
unsetIo();
} else {
setIo((IOError)value);
}
break;
case IA:
if (value == null) {
unsetIa();
} else {
setIa((IllegalArgument)value);
}
break;
case EXIST:
if (value == null) {
unsetExist();
} else {
setExist((AlreadyExists)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case IO:
return getIo();
case IA:
return getIa();
case EXIST:
return getExist();
}
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();
case EXIST:
return isSetExist();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof createTable_result)
return this.equals((createTable_result)that);
return false;
}
public boolean equals(createTable_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;
}
boolean this_present_exist = true && this.isSetExist();
boolean that_present_exist = true && that.isSetExist();
if (this_present_exist || that_present_exist) {
if (!(this_present_exist && that_present_exist))
return false;
if (!this.exist.equals(that.exist))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(createTable_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
createTable_result typedOther = (createTable_result)other;
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;
}
}
lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIa()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, typedOther.ia);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetExist()).compareTo(typedOther.isSetExist());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExist()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.exist, typedOther.exist);
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("createTable_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;
if (!first) sb.append(", ");
sb.append("exist:");
if (this.exist == null) {
sb.append("null");
} else {
sb.append(this.exist);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 createTable_resultStandardSchemeFactory implements SchemeFactory {
public createTable_resultStandardScheme getScheme() {
return new createTable_resultStandardScheme();
}
}
private static class createTable_resultStandardScheme extends StandardScheme<createTable_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, createTable_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 IOError();
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 IllegalArgument();
struct.ia.read(iprot);
struct.setIaIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // EXIST
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.exist = new AlreadyExists();
struct.exist.read(iprot);
struct.setExistIsSet(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, createTable_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();
}
if (struct.exist != null) {
oprot.writeFieldBegin(EXIST_FIELD_DESC);
struct.exist.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createTable_resultTupleSchemeFactory implements SchemeFactory {
public createTable_resultTupleScheme getScheme() {
return new createTable_resultTupleScheme();
}
}
private static class createTable_resultTupleScheme extends TupleScheme<createTable_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createTable_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);
}
if (struct.isSetExist()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetIo()) {
struct.io.write(oprot);
}
if (struct.isSetIa()) {
struct.ia.write(oprot);
}
if (struct.isSetExist()) {
struct.exist.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createTable_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
if (incoming.get(1)) {
struct.ia = new IllegalArgument();
struct.ia.read(iprot);
struct.setIaIsSet(true);
}
if (incoming.get(2)) {
struct.exist = new AlreadyExists();
struct.exist.read(iprot);
struct.setExistIsSet(true);
}
}
}
}
public static class deleteTable_args implements org.apache.thrift.TBase<deleteTable_args, deleteTable_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteTable_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 deleteTable_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteTable_argsTupleSchemeFactory());
}
/**
* name of table to delete
*/
public ByteBuffer tableName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table to delete
*/
TABLE_NAME((short)1, "tableName");
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_NAME
return TABLE_NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteTable_args.class, metaDataMap);
}
public deleteTable_args() {
}
public deleteTable_args(
ByteBuffer tableName)
{
this();
this.tableName = tableName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteTable_args(deleteTable_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
}
public deleteTable_args deepCopy() {
return new deleteTable_args(this);
}
@Override
public void clear() {
this.tableName = null;
}
/**
* name of table to delete
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table to delete
*/
public deleteTable_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public deleteTable_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
}
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_NAME:
return isSetTableName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteTable_args)
return this.equals((deleteTable_args)that);
return false;
}
public boolean equals(deleteTable_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(deleteTable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
deleteTable_args typedOther = (deleteTable_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
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("deleteTable_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 deleteTable_argsStandardSchemeFactory implements SchemeFactory {
public deleteTable_argsStandardScheme getScheme() {
return new deleteTable_argsStandardScheme();
}
}
private static class deleteTable_argsStandardScheme extends StandardScheme<deleteTable_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteTable_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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, deleteTable_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteTable_argsTupleSchemeFactory implements SchemeFactory {
public deleteTable_argsTupleScheme getScheme() {
return new deleteTable_argsTupleScheme();
}
}
private static class deleteTable_argsTupleScheme extends TupleScheme<deleteTable_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteTable_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteTable_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
}
}
}
public static class deleteTable_result implements org.apache.thrift.TBase<deleteTable_result, deleteTable_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteTable_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 deleteTable_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteTable_resultTupleSchemeFactory());
}
public IOError 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(deleteTable_result.class, metaDataMap);
}
public deleteTable_result() {
}
public deleteTable_result(
IOError io)
{
this();
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteTable_result(deleteTable_result other) {
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public deleteTable_result deepCopy() {
return new deleteTable_result(this);
}
@Override
public void clear() {
this.io = null;
}
public IOError getIo() {
return this.io;
}
public deleteTable_result setIo(IOError 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((IOError)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 deleteTable_result)
return this.equals((deleteTable_result)that);
return false;
}
public boolean equals(deleteTable_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() {
return 0;
}
public int compareTo(deleteTable_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
deleteTable_result typedOther = (deleteTable_result)other;
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("deleteTable_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
}
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 deleteTable_resultStandardSchemeFactory implements SchemeFactory {
public deleteTable_resultStandardScheme getScheme() {
return new deleteTable_resultStandardScheme();
}
}
private static class deleteTable_resultStandardScheme extends StandardScheme<deleteTable_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteTable_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 IOError();
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, deleteTable_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 deleteTable_resultTupleSchemeFactory implements SchemeFactory {
public deleteTable_resultTupleScheme getScheme() {
return new deleteTable_resultTupleScheme();
}
}
private static class deleteTable_resultTupleScheme extends TupleScheme<deleteTable_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteTable_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, deleteTable_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.io = new IOError();
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 {
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_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)3);
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());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* row key
*/
public ByteBuffer row; // required
/**
* column name
*/
public ByteBuffer column; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* row key
*/
ROW((short)2, "row"),
/**
* column name
*/
COLUMN((short)3, "column");
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_NAME
return TABLE_NAME;
case 2: // ROW
return ROW;
case 3: // COLUMN
return COLUMN;
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_args.class, metaDataMap);
}
public get_args() {
}
public get_args(
ByteBuffer tableName,
ByteBuffer row,
ByteBuffer column)
{
this();
this.tableName = tableName;
this.row = row;
this.column = column;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public get_args(get_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRow()) {
this.row = other.row;
}
if (other.isSetColumn()) {
this.column = other.column;
}
}
public get_args deepCopy() {
return new get_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.row = null;
this.column = null;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public get_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public get_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* row key
*/
public byte[] getRow() {
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
return row;
}
/**
* row key
*/
public get_args setRow(byte[] row) {
setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
return this;
}
public get_args setRow(ByteBuffer row) {
this.row = 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 name
*/
public byte[] getColumn() {
setColumn(org.apache.thrift.TBaseHelper.rightSize(column));
return column == null ? null : column.array();
}
public ByteBuffer bufferForColumn() {
return column;
}
/**
* column name
*/
public get_args setColumn(byte[] column) {
setColumn(column == null ? (ByteBuffer)null : ByteBuffer.wrap(column));
return this;
}
public get_args setColumn(ByteBuffer column) {
this.column = column;
return this;
}
public void unsetColumn() {
this.column = null;
}
/** Returns true if field column is set (has been assigned a value) and false otherwise */
public boolean isSetColumn() {
return this.column != null;
}
public void setColumnIsSet(boolean value) {
if (!value) {
this.column = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
}
break;
case COLUMN:
if (value == null) {
unsetColumn();
} else {
setColumn((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROW:
return getRow();
case COLUMN:
return getColumn();
}
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_NAME:
return isSetTableName();
case ROW:
return isSetRow();
case COLUMN:
return isSetColumn();
}
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_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
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_column = true && this.isSetColumn();
boolean that_present_column = true && that.isSetColumn();
if (this_present_column || that_present_column) {
if (!(this_present_column && that_present_column))
return false;
if (!this.column.equals(that.column))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(get_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
get_args typedOther = (get_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumn()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, typedOther.column);
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("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("row:");
if (this.row == null) {
sb.append("null");
} else {
sb.append(this.row);
}
first = false;
if (!first) sb.append(", ");
sb.append("column:");
if (this.column == null) {
sb.append("null");
} else {
sb.append(this.column);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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: // COLUMN
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.column = iprot.readBinary();
struct.setColumnIsSet(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.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.row != null) {
oprot.writeFieldBegin(ROW_FIELD_DESC);
oprot.writeBinary(struct.row);
oprot.writeFieldEnd();
}
if (struct.column != null) {
oprot.writeFieldBegin(COLUMN_FIELD_DESC);
oprot.writeBinary(struct.column);
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;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRow()) {
optionals.set(1);
}
if (struct.isSetColumn()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
if (struct.isSetColumn()) {
oprot.writeBinary(struct.column);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
}
if (incoming.get(2)) {
struct.column = iprot.readBinary();
struct.setColumnIsSet(true);
}
}
}
}
public static class get_result implements org.apache.thrift.TBase<get_result, get_result._Fields>, java.io.Serializable, Cloneable {
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.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 get_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new get_resultTupleSchemeFactory());
}
public List<TCell> success; // required
public IOError 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, TCell.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(
List<TCell> success,
IOError 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()) {
List<TCell> __this__success = new ArrayList<TCell>();
for (TCell other_element : other.success) {
__this__success.add(new TCell(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public get_result deepCopy() {
return new get_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<TCell> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TCell elem) {
if (this.success == null) {
this.success = new ArrayList<TCell>();
}
this.success.add(elem);
}
public List<TCell> getSuccess() {
return this.success;
}
public get_result setSuccess(List<TCell> 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 IOError getIo() {
return this.io;
}
public get_result setIo(IOError 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<TCell>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((IOError)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() {
return 0;
}
public int compareTo(get_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
get_result typedOther = (get_result)other;
lastComparison = Boolean.valueOf(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("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
}
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.LIST) {
{
org.apache.thrift.protocol.TList _list52 = iprot.readListBegin();
struct.success = new ArrayList<TCell>(_list52.size);
for (int _i53 = 0; _i53 < _list52.size; ++_i53)
{
TCell _elem54; // required
_elem54 = new TCell();
_elem54.read(iprot);
struct.success.add(_elem54);
}
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 IOError();
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);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
for (TCell _iter55 : struct.success)
{
_iter55.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 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()) {
{
oprot.writeI32(struct.success.size());
for (TCell _iter56 : struct.success)
{
_iter56.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)) {
{
org.apache.thrift.protocol.TList _list57 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TCell>(_list57.size);
for (int _i58 = 0; _i58 < _list57.size; ++_i58)
{
TCell _elem59; // required
_elem59 = new TCell();
_elem59.read(iprot);
struct.success.add(_elem59);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class getVer_args implements org.apache.thrift.TBase<getVer_args, getVer_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVer_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField NUM_VERSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("numVersions", org.apache.thrift.protocol.TType.I32, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getVer_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getVer_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* row key
*/
public ByteBuffer row; // required
/**
* column name
*/
public ByteBuffer column; // required
/**
* number of versions to retrieve
*/
public int numVersions; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* row key
*/
ROW((short)2, "row"),
/**
* column name
*/
COLUMN((short)3, "column"),
/**
* number of versions to retrieve
*/
NUM_VERSIONS((short)4, "numVersions");
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_NAME
return TABLE_NAME;
case 2: // ROW
return ROW;
case 3: // COLUMN
return COLUMN;
case 4: // NUM_VERSIONS
return NUM_VERSIONS;
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 __NUMVERSIONS_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.NUM_VERSIONS, new org.apache.thrift.meta_data.FieldMetaData("numVersions", 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(getVer_args.class, metaDataMap);
}
public getVer_args() {
}
public getVer_args(
ByteBuffer tableName,
ByteBuffer row,
ByteBuffer column,
int numVersions)
{
this();
this.tableName = tableName;
this.row = row;
this.column = column;
this.numVersions = numVersions;
setNumVersionsIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getVer_args(getVer_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRow()) {
this.row = other.row;
}
if (other.isSetColumn()) {
this.column = other.column;
}
this.numVersions = other.numVersions;
}
public getVer_args deepCopy() {
return new getVer_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.row = null;
this.column = null;
setNumVersionsIsSet(false);
this.numVersions = 0;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public getVer_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public getVer_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* row key
*/
public byte[] getRow() {
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
return row;
}
/**
* row key
*/
public getVer_args setRow(byte[] row) {
setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
return this;
}
public getVer_args setRow(ByteBuffer row) {
this.row = 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 name
*/
public byte[] getColumn() {
setColumn(org.apache.thrift.TBaseHelper.rightSize(column));
return column == null ? null : column.array();
}
public ByteBuffer bufferForColumn() {
return column;
}
/**
* column name
*/
public getVer_args setColumn(byte[] column) {
setColumn(column == null ? (ByteBuffer)null : ByteBuffer.wrap(column));
return this;
}
public getVer_args setColumn(ByteBuffer column) {
this.column = column;
return this;
}
public void unsetColumn() {
this.column = null;
}
/** Returns true if field column is set (has been assigned a value) and false otherwise */
public boolean isSetColumn() {
return this.column != null;
}
public void setColumnIsSet(boolean value) {
if (!value) {
this.column = null;
}
}
/**
* number of versions to retrieve
*/
public int getNumVersions() {
return this.numVersions;
}
/**
* number of versions to retrieve
*/
public getVer_args setNumVersions(int numVersions) {
this.numVersions = numVersions;
setNumVersionsIsSet(true);
return this;
}
public void unsetNumVersions() {
__isset_bit_vector.clear(__NUMVERSIONS_ISSET_ID);
}
/** Returns true if field numVersions is set (has been assigned a value) and false otherwise */
public boolean isSetNumVersions() {
return __isset_bit_vector.get(__NUMVERSIONS_ISSET_ID);
}
public void setNumVersionsIsSet(boolean value) {
__isset_bit_vector.set(__NUMVERSIONS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
}
break;
case COLUMN:
if (value == null) {
unsetColumn();
} else {
setColumn((ByteBuffer)value);
}
break;
case NUM_VERSIONS:
if (value == null) {
unsetNumVersions();
} else {
setNumVersions((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROW:
return getRow();
case COLUMN:
return getColumn();
case NUM_VERSIONS:
return Integer.valueOf(getNumVersions());
}
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_NAME:
return isSetTableName();
case ROW:
return isSetRow();
case COLUMN:
return isSetColumn();
case NUM_VERSIONS:
return isSetNumVersions();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getVer_args)
return this.equals((getVer_args)that);
return false;
}
public boolean equals(getVer_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
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_column = true && this.isSetColumn();
boolean that_present_column = true && that.isSetColumn();
if (this_present_column || that_present_column) {
if (!(this_present_column && that_present_column))
return false;
if (!this.column.equals(that.column))
return false;
}
boolean this_present_numVersions = true;
boolean that_present_numVersions = true;
if (this_present_numVersions || that_present_numVersions) {
if (!(this_present_numVersions && that_present_numVersions))
return false;
if (this.numVersions != that.numVersions)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getVer_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getVer_args typedOther = (getVer_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumn()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, typedOther.column);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetNumVersions()).compareTo(typedOther.isSetNumVersions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNumVersions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numVersions, typedOther.numVersions);
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("getVer_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("row:");
if (this.row == null) {
sb.append("null");
} else {
sb.append(this.row);
}
first = false;
if (!first) sb.append(", ");
sb.append("column:");
if (this.column == null) {
sb.append("null");
} else {
sb.append(this.column);
}
first = false;
if (!first) sb.append(", ");
sb.append("numVersions:");
sb.append(this.numVersions);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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 getVer_argsStandardSchemeFactory implements SchemeFactory {
public getVer_argsStandardScheme getScheme() {
return new getVer_argsStandardScheme();
}
}
private static class getVer_argsStandardScheme extends StandardScheme<getVer_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getVer_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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: // COLUMN
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.column = iprot.readBinary();
struct.setColumnIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // NUM_VERSIONS
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.numVersions = iprot.readI32();
struct.setNumVersionsIsSet(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, getVer_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.row != null) {
oprot.writeFieldBegin(ROW_FIELD_DESC);
oprot.writeBinary(struct.row);
oprot.writeFieldEnd();
}
if (struct.column != null) {
oprot.writeFieldBegin(COLUMN_FIELD_DESC);
oprot.writeBinary(struct.column);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(NUM_VERSIONS_FIELD_DESC);
oprot.writeI32(struct.numVersions);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getVer_argsTupleSchemeFactory implements SchemeFactory {
public getVer_argsTupleScheme getScheme() {
return new getVer_argsTupleScheme();
}
}
private static class getVer_argsTupleScheme extends TupleScheme<getVer_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getVer_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRow()) {
optionals.set(1);
}
if (struct.isSetColumn()) {
optionals.set(2);
}
if (struct.isSetNumVersions()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
if (struct.isSetColumn()) {
oprot.writeBinary(struct.column);
}
if (struct.isSetNumVersions()) {
oprot.writeI32(struct.numVersions);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getVer_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
}
if (incoming.get(2)) {
struct.column = iprot.readBinary();
struct.setColumnIsSet(true);
}
if (incoming.get(3)) {
struct.numVersions = iprot.readI32();
struct.setNumVersionsIsSet(true);
}
}
}
}
public static class getVer_result implements org.apache.thrift.TBase<getVer_result, getVer_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVer_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 getVer_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getVer_resultTupleSchemeFactory());
}
public List<TCell> success; // required
public IOError 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, TCell.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(getVer_result.class, metaDataMap);
}
public getVer_result() {
}
public getVer_result(
List<TCell> success,
IOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getVer_result(getVer_result other) {
if (other.isSetSuccess()) {
List<TCell> __this__success = new ArrayList<TCell>();
for (TCell other_element : other.success) {
__this__success.add(new TCell(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public getVer_result deepCopy() {
return new getVer_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<TCell> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TCell elem) {
if (this.success == null) {
this.success = new ArrayList<TCell>();
}
this.success.add(elem);
}
public List<TCell> getSuccess() {
return this.success;
}
public getVer_result setSuccess(List<TCell> 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 IOError getIo() {
return this.io;
}
public getVer_result setIo(IOError 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<TCell>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((IOError)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 getVer_result)
return this.equals((getVer_result)that);
return false;
}
public boolean equals(getVer_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(getVer_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getVer_result typedOther = (getVer_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("getVer_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
}
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 getVer_resultStandardSchemeFactory implements SchemeFactory {
public getVer_resultStandardScheme getScheme() {
return new getVer_resultStandardScheme();
}
}
private static class getVer_resultStandardScheme extends StandardScheme<getVer_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getVer_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 _list60 = iprot.readListBegin();
struct.success = new ArrayList<TCell>(_list60.size);
for (int _i61 = 0; _i61 < _list60.size; ++_i61)
{
TCell _elem62; // required
_elem62 = new TCell();
_elem62.read(iprot);
struct.success.add(_elem62);
}
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 IOError();
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, getVer_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 (TCell _iter63 : struct.success)
{
_iter63.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 getVer_resultTupleSchemeFactory implements SchemeFactory {
public getVer_resultTupleScheme getScheme() {
return new getVer_resultTupleScheme();
}
}
private static class getVer_resultTupleScheme extends TupleScheme<getVer_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getVer_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 (TCell _iter64 : struct.success)
{
_iter64.write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getVer_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 _list65 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TCell>(_list65.size);
for (int _i66 = 0; _i66 < _list65.size; ++_i66)
{
TCell _elem67; // required
_elem67 = new TCell();
_elem67.read(iprot);
struct.success.add(_elem67);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class getVerTs_args implements org.apache.thrift.TBase<getVerTs_args, getVerTs_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVerTs_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)4);
private static final org.apache.thrift.protocol.TField NUM_VERSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("numVersions", org.apache.thrift.protocol.TType.I32, (short)5);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getVerTs_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getVerTs_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* row key
*/
public ByteBuffer row; // required
/**
* column name
*/
public ByteBuffer column; // required
/**
* timestamp
*/
public long timestamp; // required
/**
* number of versions to retrieve
*/
public int numVersions; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* row key
*/
ROW((short)2, "row"),
/**
* column name
*/
COLUMN((short)3, "column"),
/**
* timestamp
*/
TIMESTAMP((short)4, "timestamp"),
/**
* number of versions to retrieve
*/
NUM_VERSIONS((short)5, "numVersions");
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_NAME
return TABLE_NAME;
case 2: // ROW
return ROW;
case 3: // COLUMN
return COLUMN;
case 4: // TIMESTAMP
return TIMESTAMP;
case 5: // NUM_VERSIONS
return NUM_VERSIONS;
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 __TIMESTAMP_ISSET_ID = 0;
private static final int __NUMVERSIONS_ISSET_ID = 1;
private BitSet __isset_bit_vector = new BitSet(2);
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.NUM_VERSIONS, new org.apache.thrift.meta_data.FieldMetaData("numVersions", 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(getVerTs_args.class, metaDataMap);
}
public getVerTs_args() {
}
public getVerTs_args(
ByteBuffer tableName,
ByteBuffer row,
ByteBuffer column,
long timestamp,
int numVersions)
{
this();
this.tableName = tableName;
this.row = row;
this.column = column;
this.timestamp = timestamp;
setTimestampIsSet(true);
this.numVersions = numVersions;
setNumVersionsIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getVerTs_args(getVerTs_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRow()) {
this.row = other.row;
}
if (other.isSetColumn()) {
this.column = other.column;
}
this.timestamp = other.timestamp;
this.numVersions = other.numVersions;
}
public getVerTs_args deepCopy() {
return new getVerTs_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.row = null;
this.column = null;
setTimestampIsSet(false);
this.timestamp = 0;
setNumVersionsIsSet(false);
this.numVersions = 0;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public getVerTs_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public getVerTs_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* row key
*/
public byte[] getRow() {
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
return row;
}
/**
* row key
*/
public getVerTs_args setRow(byte[] row) {
setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
return this;
}
public getVerTs_args setRow(ByteBuffer row) {
this.row = 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 name
*/
public byte[] getColumn() {
setColumn(org.apache.thrift.TBaseHelper.rightSize(column));
return column == null ? null : column.array();
}
public ByteBuffer bufferForColumn() {
return column;
}
/**
* column name
*/
public getVerTs_args setColumn(byte[] column) {
setColumn(column == null ? (ByteBuffer)null : ByteBuffer.wrap(column));
return this;
}
public getVerTs_args setColumn(ByteBuffer column) {
this.column = column;
return this;
}
public void unsetColumn() {
this.column = null;
}
/** Returns true if field column is set (has been assigned a value) and false otherwise */
public boolean isSetColumn() {
return this.column != null;
}
public void setColumnIsSet(boolean value) {
if (!value) {
this.column = null;
}
}
/**
* timestamp
*/
public long getTimestamp() {
return this.timestamp;
}
/**
* timestamp
*/
public getVerTs_args setTimestamp(long timestamp) {
this.timestamp = timestamp;
setTimestampIsSet(true);
return this;
}
public void unsetTimestamp() {
__isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
}
/**
* number of versions to retrieve
*/
public int getNumVersions() {
return this.numVersions;
}
/**
* number of versions to retrieve
*/
public getVerTs_args setNumVersions(int numVersions) {
this.numVersions = numVersions;
setNumVersionsIsSet(true);
return this;
}
public void unsetNumVersions() {
__isset_bit_vector.clear(__NUMVERSIONS_ISSET_ID);
}
/** Returns true if field numVersions is set (has been assigned a value) and false otherwise */
public boolean isSetNumVersions() {
return __isset_bit_vector.get(__NUMVERSIONS_ISSET_ID);
}
public void setNumVersionsIsSet(boolean value) {
__isset_bit_vector.set(__NUMVERSIONS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
}
break;
case COLUMN:
if (value == null) {
unsetColumn();
} else {
setColumn((ByteBuffer)value);
}
break;
case TIMESTAMP:
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
}
break;
case NUM_VERSIONS:
if (value == null) {
unsetNumVersions();
} else {
setNumVersions((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROW:
return getRow();
case COLUMN:
return getColumn();
case TIMESTAMP:
return Long.valueOf(getTimestamp());
case NUM_VERSIONS:
return Integer.valueOf(getNumVersions());
}
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_NAME:
return isSetTableName();
case ROW:
return isSetRow();
case COLUMN:
return isSetColumn();
case TIMESTAMP:
return isSetTimestamp();
case NUM_VERSIONS:
return isSetNumVersions();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getVerTs_args)
return this.equals((getVerTs_args)that);
return false;
}
public boolean equals(getVerTs_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
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_column = true && this.isSetColumn();
boolean that_present_column = true && that.isSetColumn();
if (this_present_column || that_present_column) {
if (!(this_present_column && that_present_column))
return false;
if (!this.column.equals(that.column))
return false;
}
boolean this_present_timestamp = true;
boolean that_present_timestamp = true;
if (this_present_timestamp || that_present_timestamp) {
if (!(this_present_timestamp && that_present_timestamp))
return false;
if (this.timestamp != that.timestamp)
return false;
}
boolean this_present_numVersions = true;
boolean that_present_numVersions = true;
if (this_present_numVersions || that_present_numVersions) {
if (!(this_present_numVersions && that_present_numVersions))
return false;
if (this.numVersions != that.numVersions)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getVerTs_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getVerTs_args typedOther = (getVerTs_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumn()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, typedOther.column);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetNumVersions()).compareTo(typedOther.isSetNumVersions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNumVersions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numVersions, typedOther.numVersions);
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("getVerTs_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("row:");
if (this.row == null) {
sb.append("null");
} else {
sb.append(this.row);
}
first = false;
if (!first) sb.append(", ");
sb.append("column:");
if (this.column == null) {
sb.append("null");
} else {
sb.append(this.column);
}
first = false;
if (!first) sb.append(", ");
sb.append("timestamp:");
sb.append(this.timestamp);
first = false;
if (!first) sb.append(", ");
sb.append("numVersions:");
sb.append(this.numVersions);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 getVerTs_argsStandardSchemeFactory implements SchemeFactory {
public getVerTs_argsStandardScheme getScheme() {
return new getVerTs_argsStandardScheme();
}
}
private static class getVerTs_argsStandardScheme extends StandardScheme<getVerTs_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getVerTs_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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: // COLUMN
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.column = iprot.readBinary();
struct.setColumnIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // TIMESTAMP
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // NUM_VERSIONS
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.numVersions = iprot.readI32();
struct.setNumVersionsIsSet(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, getVerTs_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.row != null) {
oprot.writeFieldBegin(ROW_FIELD_DESC);
oprot.writeBinary(struct.row);
oprot.writeFieldEnd();
}
if (struct.column != null) {
oprot.writeFieldBegin(COLUMN_FIELD_DESC);
oprot.writeBinary(struct.column);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.timestamp);
oprot.writeFieldEnd();
oprot.writeFieldBegin(NUM_VERSIONS_FIELD_DESC);
oprot.writeI32(struct.numVersions);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getVerTs_argsTupleSchemeFactory implements SchemeFactory {
public getVerTs_argsTupleScheme getScheme() {
return new getVerTs_argsTupleScheme();
}
}
private static class getVerTs_argsTupleScheme extends TupleScheme<getVerTs_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getVerTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRow()) {
optionals.set(1);
}
if (struct.isSetColumn()) {
optionals.set(2);
}
if (struct.isSetTimestamp()) {
optionals.set(3);
}
if (struct.isSetNumVersions()) {
optionals.set(4);
}
oprot.writeBitSet(optionals, 5);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
if (struct.isSetColumn()) {
oprot.writeBinary(struct.column);
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
if (struct.isSetNumVersions()) {
oprot.writeI32(struct.numVersions);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getVerTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
}
if (incoming.get(2)) {
struct.column = iprot.readBinary();
struct.setColumnIsSet(true);
}
if (incoming.get(3)) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
}
if (incoming.get(4)) {
struct.numVersions = iprot.readI32();
struct.setNumVersionsIsSet(true);
}
}
}
}
public static class getVerTs_result implements org.apache.thrift.TBase<getVerTs_result, getVerTs_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVerTs_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 getVerTs_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getVerTs_resultTupleSchemeFactory());
}
public List<TCell> success; // required
public IOError 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, TCell.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(getVerTs_result.class, metaDataMap);
}
public getVerTs_result() {
}
public getVerTs_result(
List<TCell> success,
IOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getVerTs_result(getVerTs_result other) {
if (other.isSetSuccess()) {
List<TCell> __this__success = new ArrayList<TCell>();
for (TCell other_element : other.success) {
__this__success.add(new TCell(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public getVerTs_result deepCopy() {
return new getVerTs_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<TCell> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TCell elem) {
if (this.success == null) {
this.success = new ArrayList<TCell>();
}
this.success.add(elem);
}
public List<TCell> getSuccess() {
return this.success;
}
public getVerTs_result setSuccess(List<TCell> 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 IOError getIo() {
return this.io;
}
public getVerTs_result setIo(IOError 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<TCell>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((IOError)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 getVerTs_result)
return this.equals((getVerTs_result)that);
return false;
}
public boolean equals(getVerTs_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(getVerTs_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getVerTs_result typedOther = (getVerTs_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("getVerTs_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
}
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 getVerTs_resultStandardSchemeFactory implements SchemeFactory {
public getVerTs_resultStandardScheme getScheme() {
return new getVerTs_resultStandardScheme();
}
}
private static class getVerTs_resultStandardScheme extends StandardScheme<getVerTs_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getVerTs_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 _list68 = iprot.readListBegin();
struct.success = new ArrayList<TCell>(_list68.size);
for (int _i69 = 0; _i69 < _list68.size; ++_i69)
{
TCell _elem70; // required
_elem70 = new TCell();
_elem70.read(iprot);
struct.success.add(_elem70);
}
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 IOError();
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, getVerTs_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 (TCell _iter71 : struct.success)
{
_iter71.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 getVerTs_resultTupleSchemeFactory implements SchemeFactory {
public getVerTs_resultTupleScheme getScheme() {
return new getVerTs_resultTupleScheme();
}
}
private static class getVerTs_resultTupleScheme extends TupleScheme<getVerTs_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getVerTs_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 (TCell _iter72 : struct.success)
{
_iter72.write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getVerTs_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 _list73 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TCell>(_list73.size);
for (int _i74 = 0; _i74 < _list73.size; ++_i74)
{
TCell _elem75; // required
_elem75 = new TCell();
_elem75.read(iprot);
struct.success.add(_elem75);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class getRow_args implements org.apache.thrift.TBase<getRow_args, getRow_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRow_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getRow_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRow_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* row key
*/
public ByteBuffer row; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* row key
*/
ROW((short)2, "row");
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_NAME
return TABLE_NAME;
case 2: // ROW
return ROW;
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRow_args.class, metaDataMap);
}
public getRow_args() {
}
public getRow_args(
ByteBuffer tableName,
ByteBuffer row)
{
this();
this.tableName = tableName;
this.row = row;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getRow_args(getRow_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRow()) {
this.row = other.row;
}
}
public getRow_args deepCopy() {
return new getRow_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.row = null;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public getRow_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public getRow_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* row key
*/
public byte[] getRow() {
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
return row;
}
/**
* row key
*/
public getRow_args setRow(byte[] row) {
setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
return this;
}
public getRow_args setRow(ByteBuffer row) {
this.row = 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 void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROW:
return getRow();
}
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_NAME:
return isSetTableName();
case ROW:
return isSetRow();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getRow_args)
return this.equals((getRow_args)that);
return false;
}
public boolean equals(getRow_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
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;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getRow_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getRow_args typedOther = (getRow_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
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("getRow_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("row:");
if (this.row == null) {
sb.append("null");
} else {
sb.append(this.row);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 getRow_argsStandardSchemeFactory implements SchemeFactory {
public getRow_argsStandardScheme getScheme() {
return new getRow_argsStandardScheme();
}
}
private static class getRow_argsStandardScheme extends StandardScheme<getRow_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getRow_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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;
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, getRow_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.row != null) {
oprot.writeFieldBegin(ROW_FIELD_DESC);
oprot.writeBinary(struct.row);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getRow_argsTupleSchemeFactory implements SchemeFactory {
public getRow_argsTupleScheme getScheme() {
return new getRow_argsTupleScheme();
}
}
private static class getRow_argsTupleScheme extends TupleScheme<getRow_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRow_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRow()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRow_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
}
}
}
}
public static class getRow_result implements org.apache.thrift.TBase<getRow_result, getRow_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRow_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 getRow_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRow_resultTupleSchemeFactory());
}
public List<TRowResult> success; // required
public IOError 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, TRowResult.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(getRow_result.class, metaDataMap);
}
public getRow_result() {
}
public getRow_result(
List<TRowResult> success,
IOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getRow_result(getRow_result other) {
if (other.isSetSuccess()) {
List<TRowResult> __this__success = new ArrayList<TRowResult>();
for (TRowResult other_element : other.success) {
__this__success.add(new TRowResult(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public getRow_result deepCopy() {
return new getRow_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<TRowResult> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TRowResult elem) {
if (this.success == null) {
this.success = new ArrayList<TRowResult>();
}
this.success.add(elem);
}
public List<TRowResult> getSuccess() {
return this.success;
}
public getRow_result setSuccess(List<TRowResult> 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 IOError getIo() {
return this.io;
}
public getRow_result setIo(IOError 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<TRowResult>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((IOError)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 getRow_result)
return this.equals((getRow_result)that);
return false;
}
public boolean equals(getRow_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(getRow_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getRow_result typedOther = (getRow_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("getRow_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
}
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 getRow_resultStandardSchemeFactory implements SchemeFactory {
public getRow_resultStandardScheme getScheme() {
return new getRow_resultStandardScheme();
}
}
private static class getRow_resultStandardScheme extends StandardScheme<getRow_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getRow_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 _list76 = iprot.readListBegin();
struct.success = new ArrayList<TRowResult>(_list76.size);
for (int _i77 = 0; _i77 < _list76.size; ++_i77)
{
TRowResult _elem78; // required
_elem78 = new TRowResult();
_elem78.read(iprot);
struct.success.add(_elem78);
}
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 IOError();
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, getRow_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 (TRowResult _iter79 : struct.success)
{
_iter79.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 getRow_resultTupleSchemeFactory implements SchemeFactory {
public getRow_resultTupleScheme getScheme() {
return new getRow_resultTupleScheme();
}
}
private static class getRow_resultTupleScheme extends TupleScheme<getRow_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRow_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 (TRowResult _iter80 : struct.success)
{
_iter80.write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRow_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 _list81 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TRowResult>(_list81.size);
for (int _i82 = 0; _i82 < _list81.size; ++_i82)
{
TRowResult _elem83; // required
_elem83 = new TRowResult();
_elem83.read(iprot);
struct.success.add(_elem83);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class getRowWithColumns_args implements org.apache.thrift.TBase<getRowWithColumns_args, getRowWithColumns_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowWithColumns_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getRowWithColumns_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRowWithColumns_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* row key
*/
public ByteBuffer row; // required
/**
* List of columns to return, null for all columns
*/
public List<ByteBuffer> columns; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* row key
*/
ROW((short)2, "row"),
/**
* List of columns to return, null for all columns
*/
COLUMNS((short)3, "columns");
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_NAME
return TABLE_NAME;
case 2: // ROW
return ROW;
case 3: // COLUMNS
return COLUMNS;
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowWithColumns_args.class, metaDataMap);
}
public getRowWithColumns_args() {
}
public getRowWithColumns_args(
ByteBuffer tableName,
ByteBuffer row,
List<ByteBuffer> columns)
{
this();
this.tableName = tableName;
this.row = row;
this.columns = columns;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getRowWithColumns_args(getRowWithColumns_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRow()) {
this.row = other.row;
}
if (other.isSetColumns()) {
List<ByteBuffer> __this__columns = new ArrayList<ByteBuffer>();
for (ByteBuffer other_element : other.columns) {
__this__columns.add(other_element);
}
this.columns = __this__columns;
}
}
public getRowWithColumns_args deepCopy() {
return new getRowWithColumns_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.row = null;
this.columns = null;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public getRowWithColumns_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public getRowWithColumns_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* row key
*/
public byte[] getRow() {
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
return row;
}
/**
* row key
*/
public getRowWithColumns_args setRow(byte[] row) {
setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
return this;
}
public getRowWithColumns_args setRow(ByteBuffer row) {
this.row = 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 int getColumnsSize() {
return (this.columns == null) ? 0 : this.columns.size();
}
public java.util.Iterator<ByteBuffer> getColumnsIterator() {
return (this.columns == null) ? null : this.columns.iterator();
}
public void addToColumns(ByteBuffer elem) {
if (this.columns == null) {
this.columns = new ArrayList<ByteBuffer>();
}
this.columns.add(elem);
}
/**
* List of columns to return, null for all columns
*/
public List<ByteBuffer> getColumns() {
return this.columns;
}
/**
* List of columns to return, null for all columns
*/
public getRowWithColumns_args setColumns(List<ByteBuffer> columns) {
this.columns = columns;
return this;
}
public void unsetColumns() {
this.columns = null;
}
/** Returns true if field columns is set (has been assigned a value) and false otherwise */
public boolean isSetColumns() {
return this.columns != null;
}
public void setColumnsIsSet(boolean value) {
if (!value) {
this.columns = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
}
break;
case COLUMNS:
if (value == null) {
unsetColumns();
} else {
setColumns((List<ByteBuffer>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROW:
return getRow();
case COLUMNS:
return getColumns();
}
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_NAME:
return isSetTableName();
case ROW:
return isSetRow();
case COLUMNS:
return isSetColumns();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getRowWithColumns_args)
return this.equals((getRowWithColumns_args)that);
return false;
}
public boolean equals(getRowWithColumns_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
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_columns = true && this.isSetColumns();
boolean that_present_columns = true && that.isSetColumns();
if (this_present_columns || that_present_columns) {
if (!(this_present_columns && that_present_columns))
return false;
if (!this.columns.equals(that.columns))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getRowWithColumns_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getRowWithColumns_args typedOther = (getRowWithColumns_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumns()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
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("getRowWithColumns_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("row:");
if (this.row == null) {
sb.append("null");
} else {
sb.append(this.row);
}
first = false;
if (!first) sb.append(", ");
sb.append("columns:");
if (this.columns == null) {
sb.append("null");
} else {
sb.append(this.columns);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 getRowWithColumns_argsStandardSchemeFactory implements SchemeFactory {
public getRowWithColumns_argsStandardScheme getScheme() {
return new getRowWithColumns_argsStandardScheme();
}
}
private static class getRowWithColumns_argsStandardScheme extends StandardScheme<getRowWithColumns_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getRowWithColumns_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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: // COLUMNS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list84 = iprot.readListBegin();
struct.columns = new ArrayList<ByteBuffer>(_list84.size);
for (int _i85 = 0; _i85 < _list84.size; ++_i85)
{
ByteBuffer _elem86; // required
_elem86 = iprot.readBinary();
struct.columns.add(_elem86);
}
iprot.readListEnd();
}
struct.setColumnsIsSet(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, getRowWithColumns_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.row != null) {
oprot.writeFieldBegin(ROW_FIELD_DESC);
oprot.writeBinary(struct.row);
oprot.writeFieldEnd();
}
if (struct.columns != null) {
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size()));
for (ByteBuffer _iter87 : struct.columns)
{
oprot.writeBinary(_iter87);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getRowWithColumns_argsTupleSchemeFactory implements SchemeFactory {
public getRowWithColumns_argsTupleScheme getScheme() {
return new getRowWithColumns_argsTupleScheme();
}
}
private static class getRowWithColumns_argsTupleScheme extends TupleScheme<getRowWithColumns_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRowWithColumns_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRow()) {
optionals.set(1);
}
if (struct.isSetColumns()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
if (struct.isSetColumns()) {
{
oprot.writeI32(struct.columns.size());
for (ByteBuffer _iter88 : struct.columns)
{
oprot.writeBinary(_iter88);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRowWithColumns_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list89 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.columns = new ArrayList<ByteBuffer>(_list89.size);
for (int _i90 = 0; _i90 < _list89.size; ++_i90)
{
ByteBuffer _elem91; // required
_elem91 = iprot.readBinary();
struct.columns.add(_elem91);
}
}
struct.setColumnsIsSet(true);
}
}
}
}
public static class getRowWithColumns_result implements org.apache.thrift.TBase<getRowWithColumns_result, getRowWithColumns_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowWithColumns_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 getRowWithColumns_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRowWithColumns_resultTupleSchemeFactory());
}
public List<TRowResult> success; // required
public IOError 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, TRowResult.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(getRowWithColumns_result.class, metaDataMap);
}
public getRowWithColumns_result() {
}
public getRowWithColumns_result(
List<TRowResult> success,
IOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getRowWithColumns_result(getRowWithColumns_result other) {
if (other.isSetSuccess()) {
List<TRowResult> __this__success = new ArrayList<TRowResult>();
for (TRowResult other_element : other.success) {
__this__success.add(new TRowResult(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public getRowWithColumns_result deepCopy() {
return new getRowWithColumns_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<TRowResult> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TRowResult elem) {
if (this.success == null) {
this.success = new ArrayList<TRowResult>();
}
this.success.add(elem);
}
public List<TRowResult> getSuccess() {
return this.success;
}
public getRowWithColumns_result setSuccess(List<TRowResult> 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 IOError getIo() {
return this.io;
}
public getRowWithColumns_result setIo(IOError 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<TRowResult>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((IOError)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 getRowWithColumns_result)
return this.equals((getRowWithColumns_result)that);
return false;
}
public boolean equals(getRowWithColumns_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(getRowWithColumns_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getRowWithColumns_result typedOther = (getRowWithColumns_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("getRowWithColumns_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
}
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 getRowWithColumns_resultStandardSchemeFactory implements SchemeFactory {
public getRowWithColumns_resultStandardScheme getScheme() {
return new getRowWithColumns_resultStandardScheme();
}
}
private static class getRowWithColumns_resultStandardScheme extends StandardScheme<getRowWithColumns_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getRowWithColumns_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 _list92 = iprot.readListBegin();
struct.success = new ArrayList<TRowResult>(_list92.size);
for (int _i93 = 0; _i93 < _list92.size; ++_i93)
{
TRowResult _elem94; // required
_elem94 = new TRowResult();
_elem94.read(iprot);
struct.success.add(_elem94);
}
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 IOError();
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, getRowWithColumns_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 (TRowResult _iter95 : struct.success)
{
_iter95.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 getRowWithColumns_resultTupleSchemeFactory implements SchemeFactory {
public getRowWithColumns_resultTupleScheme getScheme() {
return new getRowWithColumns_resultTupleScheme();
}
}
private static class getRowWithColumns_resultTupleScheme extends TupleScheme<getRowWithColumns_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRowWithColumns_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 (TRowResult _iter96 : struct.success)
{
_iter96.write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRowWithColumns_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 _list97 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TRowResult>(_list97.size);
for (int _i98 = 0; _i98 < _list97.size; ++_i98)
{
TRowResult _elem99; // required
_elem99 = new TRowResult();
_elem99.read(iprot);
struct.success.add(_elem99);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class getRowTs_args implements org.apache.thrift.TBase<getRowTs_args, getRowTs_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowTs_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getRowTs_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRowTs_argsTupleSchemeFactory());
}
/**
* name of the table
*/
public ByteBuffer tableName; // required
/**
* row key
*/
public ByteBuffer row; // required
/**
* timestamp
*/
public long timestamp; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of the table
*/
TABLE_NAME((short)1, "tableName"),
/**
* row key
*/
ROW((short)2, "row"),
/**
* timestamp
*/
TIMESTAMP((short)3, "timestamp");
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_NAME
return TABLE_NAME;
case 2: // ROW
return ROW;
case 3: // TIMESTAMP
return TIMESTAMP;
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 __TIMESTAMP_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowTs_args.class, metaDataMap);
}
public getRowTs_args() {
}
public getRowTs_args(
ByteBuffer tableName,
ByteBuffer row,
long timestamp)
{
this();
this.tableName = tableName;
this.row = row;
this.timestamp = timestamp;
setTimestampIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getRowTs_args(getRowTs_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRow()) {
this.row = other.row;
}
this.timestamp = other.timestamp;
}
public getRowTs_args deepCopy() {
return new getRowTs_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.row = null;
setTimestampIsSet(false);
this.timestamp = 0;
}
/**
* name of the table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of the table
*/
public getRowTs_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public getRowTs_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* row key
*/
public byte[] getRow() {
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
return row;
}
/**
* row key
*/
public getRowTs_args setRow(byte[] row) {
setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
return this;
}
public getRowTs_args setRow(ByteBuffer row) {
this.row = 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;
}
}
/**
* timestamp
*/
public long getTimestamp() {
return this.timestamp;
}
/**
* timestamp
*/
public getRowTs_args setTimestamp(long timestamp) {
this.timestamp = timestamp;
setTimestampIsSet(true);
return this;
}
public void unsetTimestamp() {
__isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
}
break;
case TIMESTAMP:
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROW:
return getRow();
case TIMESTAMP:
return Long.valueOf(getTimestamp());
}
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_NAME:
return isSetTableName();
case ROW:
return isSetRow();
case TIMESTAMP:
return isSetTimestamp();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getRowTs_args)
return this.equals((getRowTs_args)that);
return false;
}
public boolean equals(getRowTs_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
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_timestamp = true;
boolean that_present_timestamp = true;
if (this_present_timestamp || that_present_timestamp) {
if (!(this_present_timestamp && that_present_timestamp))
return false;
if (this.timestamp != that.timestamp)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getRowTs_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getRowTs_args typedOther = (getRowTs_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
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("getRowTs_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("row:");
if (this.row == null) {
sb.append("null");
} else {
sb.append(this.row);
}
first = false;
if (!first) sb.append(", ");
sb.append("timestamp:");
sb.append(this.timestamp);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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 getRowTs_argsStandardSchemeFactory implements SchemeFactory {
public getRowTs_argsStandardScheme getScheme() {
return new getRowTs_argsStandardScheme();
}
}
private static class getRowTs_argsStandardScheme extends StandardScheme<getRowTs_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getRowTs_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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: // TIMESTAMP
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(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, getRowTs_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.row != null) {
oprot.writeFieldBegin(ROW_FIELD_DESC);
oprot.writeBinary(struct.row);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.timestamp);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getRowTs_argsTupleSchemeFactory implements SchemeFactory {
public getRowTs_argsTupleScheme getScheme() {
return new getRowTs_argsTupleScheme();
}
}
private static class getRowTs_argsTupleScheme extends TupleScheme<getRowTs_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRowTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRow()) {
optionals.set(1);
}
if (struct.isSetTimestamp()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRowTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
}
if (incoming.get(2)) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
}
}
}
}
public static class getRowTs_result implements org.apache.thrift.TBase<getRowTs_result, getRowTs_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowTs_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 getRowTs_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRowTs_resultTupleSchemeFactory());
}
public List<TRowResult> success; // required
public IOError 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, TRowResult.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(getRowTs_result.class, metaDataMap);
}
public getRowTs_result() {
}
public getRowTs_result(
List<TRowResult> success,
IOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getRowTs_result(getRowTs_result other) {
if (other.isSetSuccess()) {
List<TRowResult> __this__success = new ArrayList<TRowResult>();
for (TRowResult other_element : other.success) {
__this__success.add(new TRowResult(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public getRowTs_result deepCopy() {
return new getRowTs_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<TRowResult> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TRowResult elem) {
if (this.success == null) {
this.success = new ArrayList<TRowResult>();
}
this.success.add(elem);
}
public List<TRowResult> getSuccess() {
return this.success;
}
public getRowTs_result setSuccess(List<TRowResult> 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 IOError getIo() {
return this.io;
}
public getRowTs_result setIo(IOError 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<TRowResult>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((IOError)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 getRowTs_result)
return this.equals((getRowTs_result)that);
return false;
}
public boolean equals(getRowTs_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(getRowTs_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getRowTs_result typedOther = (getRowTs_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("getRowTs_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
}
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 getRowTs_resultStandardSchemeFactory implements SchemeFactory {
public getRowTs_resultStandardScheme getScheme() {
return new getRowTs_resultStandardScheme();
}
}
private static class getRowTs_resultStandardScheme extends StandardScheme<getRowTs_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getRowTs_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 _list100 = iprot.readListBegin();
struct.success = new ArrayList<TRowResult>(_list100.size);
for (int _i101 = 0; _i101 < _list100.size; ++_i101)
{
TRowResult _elem102; // required
_elem102 = new TRowResult();
_elem102.read(iprot);
struct.success.add(_elem102);
}
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 IOError();
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, getRowTs_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 (TRowResult _iter103 : struct.success)
{
_iter103.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 getRowTs_resultTupleSchemeFactory implements SchemeFactory {
public getRowTs_resultTupleScheme getScheme() {
return new getRowTs_resultTupleScheme();
}
}
private static class getRowTs_resultTupleScheme extends TupleScheme<getRowTs_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRowTs_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 (TRowResult _iter104 : struct.success)
{
_iter104.write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRowTs_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 _list105 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TRowResult>(_list105.size);
for (int _i106 = 0; _i106 < _list105.size; ++_i106)
{
TRowResult _elem107; // required
_elem107 = new TRowResult();
_elem107.read(iprot);
struct.success.add(_elem107);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class getRowWithColumnsTs_args implements org.apache.thrift.TBase<getRowWithColumnsTs_args, getRowWithColumnsTs_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowWithColumnsTs_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getRowWithColumnsTs_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRowWithColumnsTs_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* row key
*/
public ByteBuffer row; // required
/**
* List of columns to return, null for all columns
*/
public List<ByteBuffer> columns; // required
public long timestamp; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* row key
*/
ROW((short)2, "row"),
/**
* List of columns to return, null for all columns
*/
COLUMNS((short)3, "columns"),
TIMESTAMP((short)4, "timestamp");
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_NAME
return TABLE_NAME;
case 2: // ROW
return ROW;
case 3: // COLUMNS
return COLUMNS;
case 4: // TIMESTAMP
return TIMESTAMP;
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 __TIMESTAMP_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowWithColumnsTs_args.class, metaDataMap);
}
public getRowWithColumnsTs_args() {
}
public getRowWithColumnsTs_args(
ByteBuffer tableName,
ByteBuffer row,
List<ByteBuffer> columns,
long timestamp)
{
this();
this.tableName = tableName;
this.row = row;
this.columns = columns;
this.timestamp = timestamp;
setTimestampIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getRowWithColumnsTs_args(getRowWithColumnsTs_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRow()) {
this.row = other.row;
}
if (other.isSetColumns()) {
List<ByteBuffer> __this__columns = new ArrayList<ByteBuffer>();
for (ByteBuffer other_element : other.columns) {
__this__columns.add(other_element);
}
this.columns = __this__columns;
}
this.timestamp = other.timestamp;
}
public getRowWithColumnsTs_args deepCopy() {
return new getRowWithColumnsTs_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.row = null;
this.columns = null;
setTimestampIsSet(false);
this.timestamp = 0;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public getRowWithColumnsTs_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public getRowWithColumnsTs_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* row key
*/
public byte[] getRow() {
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
return row;
}
/**
* row key
*/
public getRowWithColumnsTs_args setRow(byte[] row) {
setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
return this;
}
public getRowWithColumnsTs_args setRow(ByteBuffer row) {
this.row = 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 int getColumnsSize() {
return (this.columns == null) ? 0 : this.columns.size();
}
public java.util.Iterator<ByteBuffer> getColumnsIterator() {
return (this.columns == null) ? null : this.columns.iterator();
}
public void addToColumns(ByteBuffer elem) {
if (this.columns == null) {
this.columns = new ArrayList<ByteBuffer>();
}
this.columns.add(elem);
}
/**
* List of columns to return, null for all columns
*/
public List<ByteBuffer> getColumns() {
return this.columns;
}
/**
* List of columns to return, null for all columns
*/
public getRowWithColumnsTs_args setColumns(List<ByteBuffer> columns) {
this.columns = columns;
return this;
}
public void unsetColumns() {
this.columns = null;
}
/** Returns true if field columns is set (has been assigned a value) and false otherwise */
public boolean isSetColumns() {
return this.columns != null;
}
public void setColumnsIsSet(boolean value) {
if (!value) {
this.columns = null;
}
}
public long getTimestamp() {
return this.timestamp;
}
public getRowWithColumnsTs_args setTimestamp(long timestamp) {
this.timestamp = timestamp;
setTimestampIsSet(true);
return this;
}
public void unsetTimestamp() {
__isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
}
break;
case COLUMNS:
if (value == null) {
unsetColumns();
} else {
setColumns((List<ByteBuffer>)value);
}
break;
case TIMESTAMP:
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROW:
return getRow();
case COLUMNS:
return getColumns();
case TIMESTAMP:
return Long.valueOf(getTimestamp());
}
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_NAME:
return isSetTableName();
case ROW:
return isSetRow();
case COLUMNS:
return isSetColumns();
case TIMESTAMP:
return isSetTimestamp();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getRowWithColumnsTs_args)
return this.equals((getRowWithColumnsTs_args)that);
return false;
}
public boolean equals(getRowWithColumnsTs_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
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_columns = true && this.isSetColumns();
boolean that_present_columns = true && that.isSetColumns();
if (this_present_columns || that_present_columns) {
if (!(this_present_columns && that_present_columns))
return false;
if (!this.columns.equals(that.columns))
return false;
}
boolean this_present_timestamp = true;
boolean that_present_timestamp = true;
if (this_present_timestamp || that_present_timestamp) {
if (!(this_present_timestamp && that_present_timestamp))
return false;
if (this.timestamp != that.timestamp)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getRowWithColumnsTs_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getRowWithColumnsTs_args typedOther = (getRowWithColumnsTs_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumns()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
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("getRowWithColumnsTs_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("row:");
if (this.row == null) {
sb.append("null");
} else {
sb.append(this.row);
}
first = false;
if (!first) sb.append(", ");
sb.append("columns:");
if (this.columns == null) {
sb.append("null");
} else {
sb.append(this.columns);
}
first = false;
if (!first) sb.append(", ");
sb.append("timestamp:");
sb.append(this.timestamp);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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 getRowWithColumnsTs_argsStandardSchemeFactory implements SchemeFactory {
public getRowWithColumnsTs_argsStandardScheme getScheme() {
return new getRowWithColumnsTs_argsStandardScheme();
}
}
private static class getRowWithColumnsTs_argsStandardScheme extends StandardScheme<getRowWithColumnsTs_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getRowWithColumnsTs_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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: // COLUMNS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list108 = iprot.readListBegin();
struct.columns = new ArrayList<ByteBuffer>(_list108.size);
for (int _i109 = 0; _i109 < _list108.size; ++_i109)
{
ByteBuffer _elem110; // required
_elem110 = iprot.readBinary();
struct.columns.add(_elem110);
}
iprot.readListEnd();
}
struct.setColumnsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // TIMESTAMP
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(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, getRowWithColumnsTs_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.row != null) {
oprot.writeFieldBegin(ROW_FIELD_DESC);
oprot.writeBinary(struct.row);
oprot.writeFieldEnd();
}
if (struct.columns != null) {
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size()));
for (ByteBuffer _iter111 : struct.columns)
{
oprot.writeBinary(_iter111);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.timestamp);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getRowWithColumnsTs_argsTupleSchemeFactory implements SchemeFactory {
public getRowWithColumnsTs_argsTupleScheme getScheme() {
return new getRowWithColumnsTs_argsTupleScheme();
}
}
private static class getRowWithColumnsTs_argsTupleScheme extends TupleScheme<getRowWithColumnsTs_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRowWithColumnsTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRow()) {
optionals.set(1);
}
if (struct.isSetColumns()) {
optionals.set(2);
}
if (struct.isSetTimestamp()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
if (struct.isSetColumns()) {
{
oprot.writeI32(struct.columns.size());
for (ByteBuffer _iter112 : struct.columns)
{
oprot.writeBinary(_iter112);
}
}
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRowWithColumnsTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list113 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.columns = new ArrayList<ByteBuffer>(_list113.size);
for (int _i114 = 0; _i114 < _list113.size; ++_i114)
{
ByteBuffer _elem115; // required
_elem115 = iprot.readBinary();
struct.columns.add(_elem115);
}
}
struct.setColumnsIsSet(true);
}
if (incoming.get(3)) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
}
}
}
}
public static class getRowWithColumnsTs_result implements org.apache.thrift.TBase<getRowWithColumnsTs_result, getRowWithColumnsTs_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowWithColumnsTs_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 getRowWithColumnsTs_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRowWithColumnsTs_resultTupleSchemeFactory());
}
public List<TRowResult> success; // required
public IOError 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, TRowResult.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(getRowWithColumnsTs_result.class, metaDataMap);
}
public getRowWithColumnsTs_result() {
}
public getRowWithColumnsTs_result(
List<TRowResult> success,
IOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getRowWithColumnsTs_result(getRowWithColumnsTs_result other) {
if (other.isSetSuccess()) {
List<TRowResult> __this__success = new ArrayList<TRowResult>();
for (TRowResult other_element : other.success) {
__this__success.add(new TRowResult(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public getRowWithColumnsTs_result deepCopy() {
return new getRowWithColumnsTs_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<TRowResult> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TRowResult elem) {
if (this.success == null) {
this.success = new ArrayList<TRowResult>();
}
this.success.add(elem);
}
public List<TRowResult> getSuccess() {
return this.success;
}
public getRowWithColumnsTs_result setSuccess(List<TRowResult> 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 IOError getIo() {
return this.io;
}
public getRowWithColumnsTs_result setIo(IOError 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<TRowResult>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((IOError)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 getRowWithColumnsTs_result)
return this.equals((getRowWithColumnsTs_result)that);
return false;
}
public boolean equals(getRowWithColumnsTs_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(getRowWithColumnsTs_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getRowWithColumnsTs_result typedOther = (getRowWithColumnsTs_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("getRowWithColumnsTs_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
}
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 getRowWithColumnsTs_resultStandardSchemeFactory implements SchemeFactory {
public getRowWithColumnsTs_resultStandardScheme getScheme() {
return new getRowWithColumnsTs_resultStandardScheme();
}
}
private static class getRowWithColumnsTs_resultStandardScheme extends StandardScheme<getRowWithColumnsTs_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getRowWithColumnsTs_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 _list116 = iprot.readListBegin();
struct.success = new ArrayList<TRowResult>(_list116.size);
for (int _i117 = 0; _i117 < _list116.size; ++_i117)
{
TRowResult _elem118; // required
_elem118 = new TRowResult();
_elem118.read(iprot);
struct.success.add(_elem118);
}
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 IOError();
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, getRowWithColumnsTs_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 (TRowResult _iter119 : struct.success)
{
_iter119.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 getRowWithColumnsTs_resultTupleSchemeFactory implements SchemeFactory {
public getRowWithColumnsTs_resultTupleScheme getScheme() {
return new getRowWithColumnsTs_resultTupleScheme();
}
}
private static class getRowWithColumnsTs_resultTupleScheme extends TupleScheme<getRowWithColumnsTs_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRowWithColumnsTs_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 (TRowResult _iter120 : struct.success)
{
_iter120.write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRowWithColumnsTs_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 _list121 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TRowResult>(_list121.size);
for (int _i122 = 0; _i122 < _list121.size; ++_i122)
{
TRowResult _elem123; // required
_elem123 = new TRowResult();
_elem123.read(iprot);
struct.success.add(_elem123);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class getRows_args implements org.apache.thrift.TBase<getRows_args, getRows_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRows_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("rows", 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 getRows_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRows_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* row keys
*/
public List<ByteBuffer> rows; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* row keys
*/
ROWS((short)2, "rows");
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_NAME
return TABLE_NAME;
case 2: // ROWS
return 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
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROWS, new org.apache.thrift.meta_data.FieldMetaData("rows", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRows_args.class, metaDataMap);
}
public getRows_args() {
}
public getRows_args(
ByteBuffer tableName,
List<ByteBuffer> rows)
{
this();
this.tableName = tableName;
this.rows = rows;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getRows_args(getRows_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRows()) {
List<ByteBuffer> __this__rows = new ArrayList<ByteBuffer>();
for (ByteBuffer other_element : other.rows) {
__this__rows.add(other_element);
}
this.rows = __this__rows;
}
}
public getRows_args deepCopy() {
return new getRows_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.rows = null;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public getRows_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public getRows_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public int getRowsSize() {
return (this.rows == null) ? 0 : this.rows.size();
}
public java.util.Iterator<ByteBuffer> getRowsIterator() {
return (this.rows == null) ? null : this.rows.iterator();
}
public void addToRows(ByteBuffer elem) {
if (this.rows == null) {
this.rows = new ArrayList<ByteBuffer>();
}
this.rows.add(elem);
}
/**
* row keys
*/
public List<ByteBuffer> getRows() {
return this.rows;
}
/**
* row keys
*/
public getRows_args setRows(List<ByteBuffer> rows) {
this.rows = rows;
return this;
}
public void unsetRows() {
this.rows = null;
}
/** Returns true if field rows is set (has been assigned a value) and false otherwise */
public boolean isSetRows() {
return this.rows != null;
}
public void setRowsIsSet(boolean value) {
if (!value) {
this.rows = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROWS:
if (value == null) {
unsetRows();
} else {
setRows((List<ByteBuffer>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROWS:
return getRows();
}
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_NAME:
return isSetTableName();
case ROWS:
return isSetRows();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getRows_args)
return this.equals((getRows_args)that);
return false;
}
public boolean equals(getRows_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_rows = true && this.isSetRows();
boolean that_present_rows = true && that.isSetRows();
if (this_present_rows || that_present_rows) {
if (!(this_present_rows && that_present_rows))
return false;
if (!this.rows.equals(that.rows))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getRows_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getRows_args typedOther = (getRows_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRows()).compareTo(typedOther.isSetRows());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRows()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rows, typedOther.rows);
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("getRows_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("rows:");
if (this.rows == null) {
sb.append("null");
} else {
sb.append(this.rows);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 getRows_argsStandardSchemeFactory implements SchemeFactory {
public getRows_argsStandardScheme getScheme() {
return new getRows_argsStandardScheme();
}
}
private static class getRows_argsStandardScheme extends StandardScheme<getRows_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getRows_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // ROWS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list124 = iprot.readListBegin();
struct.rows = new ArrayList<ByteBuffer>(_list124.size);
for (int _i125 = 0; _i125 < _list124.size; ++_i125)
{
ByteBuffer _elem126; // required
_elem126 = iprot.readBinary();
struct.rows.add(_elem126);
}
iprot.readListEnd();
}
struct.setRowsIsSet(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, getRows_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.rows != null) {
oprot.writeFieldBegin(ROWS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.rows.size()));
for (ByteBuffer _iter127 : struct.rows)
{
oprot.writeBinary(_iter127);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getRows_argsTupleSchemeFactory implements SchemeFactory {
public getRows_argsTupleScheme getScheme() {
return new getRows_argsTupleScheme();
}
}
private static class getRows_argsTupleScheme extends TupleScheme<getRows_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRows_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRows()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRows()) {
{
oprot.writeI32(struct.rows.size());
for (ByteBuffer _iter128 : struct.rows)
{
oprot.writeBinary(_iter128);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRows_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list129 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.rows = new ArrayList<ByteBuffer>(_list129.size);
for (int _i130 = 0; _i130 < _list129.size; ++_i130)
{
ByteBuffer _elem131; // required
_elem131 = iprot.readBinary();
struct.rows.add(_elem131);
}
}
struct.setRowsIsSet(true);
}
}
}
}
public static class getRows_result implements org.apache.thrift.TBase<getRows_result, getRows_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRows_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 getRows_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRows_resultTupleSchemeFactory());
}
public List<TRowResult> success; // required
public IOError 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, TRowResult.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(getRows_result.class, metaDataMap);
}
public getRows_result() {
}
public getRows_result(
List<TRowResult> success,
IOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getRows_result(getRows_result other) {
if (other.isSetSuccess()) {
List<TRowResult> __this__success = new ArrayList<TRowResult>();
for (TRowResult other_element : other.success) {
__this__success.add(new TRowResult(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public getRows_result deepCopy() {
return new getRows_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<TRowResult> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TRowResult elem) {
if (this.success == null) {
this.success = new ArrayList<TRowResult>();
}
this.success.add(elem);
}
public List<TRowResult> getSuccess() {
return this.success;
}
public getRows_result setSuccess(List<TRowResult> 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 IOError getIo() {
return this.io;
}
public getRows_result setIo(IOError 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<TRowResult>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((IOError)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 getRows_result)
return this.equals((getRows_result)that);
return false;
}
public boolean equals(getRows_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(getRows_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getRows_result typedOther = (getRows_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("getRows_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
}
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 getRows_resultStandardSchemeFactory implements SchemeFactory {
public getRows_resultStandardScheme getScheme() {
return new getRows_resultStandardScheme();
}
}
private static class getRows_resultStandardScheme extends StandardScheme<getRows_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getRows_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 _list132 = iprot.readListBegin();
struct.success = new ArrayList<TRowResult>(_list132.size);
for (int _i133 = 0; _i133 < _list132.size; ++_i133)
{
TRowResult _elem134; // required
_elem134 = new TRowResult();
_elem134.read(iprot);
struct.success.add(_elem134);
}
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 IOError();
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, getRows_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 (TRowResult _iter135 : struct.success)
{
_iter135.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 getRows_resultTupleSchemeFactory implements SchemeFactory {
public getRows_resultTupleScheme getScheme() {
return new getRows_resultTupleScheme();
}
}
private static class getRows_resultTupleScheme extends TupleScheme<getRows_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRows_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 (TRowResult _iter136 : struct.success)
{
_iter136.write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRows_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 _list137 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TRowResult>(_list137.size);
for (int _i138 = 0; _i138 < _list137.size; ++_i138)
{
TRowResult _elem139; // required
_elem139 = new TRowResult();
_elem139.read(iprot);
struct.success.add(_elem139);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class getRowsWithColumns_args implements org.apache.thrift.TBase<getRowsWithColumns_args, getRowsWithColumns_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowsWithColumns_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("rows", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getRowsWithColumns_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRowsWithColumns_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* row keys
*/
public List<ByteBuffer> rows; // required
/**
* List of columns to return, null for all columns
*/
public List<ByteBuffer> columns; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* row keys
*/
ROWS((short)2, "rows"),
/**
* List of columns to return, null for all columns
*/
COLUMNS((short)3, "columns");
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_NAME
return TABLE_NAME;
case 2: // ROWS
return ROWS;
case 3: // COLUMNS
return COLUMNS;
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROWS, new org.apache.thrift.meta_data.FieldMetaData("rows", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))));
tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowsWithColumns_args.class, metaDataMap);
}
public getRowsWithColumns_args() {
}
public getRowsWithColumns_args(
ByteBuffer tableName,
List<ByteBuffer> rows,
List<ByteBuffer> columns)
{
this();
this.tableName = tableName;
this.rows = rows;
this.columns = columns;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getRowsWithColumns_args(getRowsWithColumns_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRows()) {
List<ByteBuffer> __this__rows = new ArrayList<ByteBuffer>();
for (ByteBuffer other_element : other.rows) {
__this__rows.add(other_element);
}
this.rows = __this__rows;
}
if (other.isSetColumns()) {
List<ByteBuffer> __this__columns = new ArrayList<ByteBuffer>();
for (ByteBuffer other_element : other.columns) {
__this__columns.add(other_element);
}
this.columns = __this__columns;
}
}
public getRowsWithColumns_args deepCopy() {
return new getRowsWithColumns_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.rows = null;
this.columns = null;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public getRowsWithColumns_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public getRowsWithColumns_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public int getRowsSize() {
return (this.rows == null) ? 0 : this.rows.size();
}
public java.util.Iterator<ByteBuffer> getRowsIterator() {
return (this.rows == null) ? null : this.rows.iterator();
}
public void addToRows(ByteBuffer elem) {
if (this.rows == null) {
this.rows = new ArrayList<ByteBuffer>();
}
this.rows.add(elem);
}
/**
* row keys
*/
public List<ByteBuffer> getRows() {
return this.rows;
}
/**
* row keys
*/
public getRowsWithColumns_args setRows(List<ByteBuffer> rows) {
this.rows = rows;
return this;
}
public void unsetRows() {
this.rows = null;
}
/** Returns true if field rows is set (has been assigned a value) and false otherwise */
public boolean isSetRows() {
return this.rows != null;
}
public void setRowsIsSet(boolean value) {
if (!value) {
this.rows = null;
}
}
public int getColumnsSize() {
return (this.columns == null) ? 0 : this.columns.size();
}
public java.util.Iterator<ByteBuffer> getColumnsIterator() {
return (this.columns == null) ? null : this.columns.iterator();
}
public void addToColumns(ByteBuffer elem) {
if (this.columns == null) {
this.columns = new ArrayList<ByteBuffer>();
}
this.columns.add(elem);
}
/**
* List of columns to return, null for all columns
*/
public List<ByteBuffer> getColumns() {
return this.columns;
}
/**
* List of columns to return, null for all columns
*/
public getRowsWithColumns_args setColumns(List<ByteBuffer> columns) {
this.columns = columns;
return this;
}
public void unsetColumns() {
this.columns = null;
}
/** Returns true if field columns is set (has been assigned a value) and false otherwise */
public boolean isSetColumns() {
return this.columns != null;
}
public void setColumnsIsSet(boolean value) {
if (!value) {
this.columns = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROWS:
if (value == null) {
unsetRows();
} else {
setRows((List<ByteBuffer>)value);
}
break;
case COLUMNS:
if (value == null) {
unsetColumns();
} else {
setColumns((List<ByteBuffer>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROWS:
return getRows();
case COLUMNS:
return getColumns();
}
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_NAME:
return isSetTableName();
case ROWS:
return isSetRows();
case COLUMNS:
return isSetColumns();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getRowsWithColumns_args)
return this.equals((getRowsWithColumns_args)that);
return false;
}
public boolean equals(getRowsWithColumns_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_rows = true && this.isSetRows();
boolean that_present_rows = true && that.isSetRows();
if (this_present_rows || that_present_rows) {
if (!(this_present_rows && that_present_rows))
return false;
if (!this.rows.equals(that.rows))
return false;
}
boolean this_present_columns = true && this.isSetColumns();
boolean that_present_columns = true && that.isSetColumns();
if (this_present_columns || that_present_columns) {
if (!(this_present_columns && that_present_columns))
return false;
if (!this.columns.equals(that.columns))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getRowsWithColumns_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getRowsWithColumns_args typedOther = (getRowsWithColumns_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRows()).compareTo(typedOther.isSetRows());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRows()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rows, typedOther.rows);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumns()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
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("getRowsWithColumns_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("rows:");
if (this.rows == null) {
sb.append("null");
} else {
sb.append(this.rows);
}
first = false;
if (!first) sb.append(", ");
sb.append("columns:");
if (this.columns == null) {
sb.append("null");
} else {
sb.append(this.columns);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 getRowsWithColumns_argsStandardSchemeFactory implements SchemeFactory {
public getRowsWithColumns_argsStandardScheme getScheme() {
return new getRowsWithColumns_argsStandardScheme();
}
}
private static class getRowsWithColumns_argsStandardScheme extends StandardScheme<getRowsWithColumns_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getRowsWithColumns_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // ROWS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list140 = iprot.readListBegin();
struct.rows = new ArrayList<ByteBuffer>(_list140.size);
for (int _i141 = 0; _i141 < _list140.size; ++_i141)
{
ByteBuffer _elem142; // required
_elem142 = iprot.readBinary();
struct.rows.add(_elem142);
}
iprot.readListEnd();
}
struct.setRowsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // COLUMNS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list143 = iprot.readListBegin();
struct.columns = new ArrayList<ByteBuffer>(_list143.size);
for (int _i144 = 0; _i144 < _list143.size; ++_i144)
{
ByteBuffer _elem145; // required
_elem145 = iprot.readBinary();
struct.columns.add(_elem145);
}
iprot.readListEnd();
}
struct.setColumnsIsSet(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, getRowsWithColumns_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.rows != null) {
oprot.writeFieldBegin(ROWS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.rows.size()));
for (ByteBuffer _iter146 : struct.rows)
{
oprot.writeBinary(_iter146);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.columns != null) {
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size()));
for (ByteBuffer _iter147 : struct.columns)
{
oprot.writeBinary(_iter147);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getRowsWithColumns_argsTupleSchemeFactory implements SchemeFactory {
public getRowsWithColumns_argsTupleScheme getScheme() {
return new getRowsWithColumns_argsTupleScheme();
}
}
private static class getRowsWithColumns_argsTupleScheme extends TupleScheme<getRowsWithColumns_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRowsWithColumns_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRows()) {
optionals.set(1);
}
if (struct.isSetColumns()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRows()) {
{
oprot.writeI32(struct.rows.size());
for (ByteBuffer _iter148 : struct.rows)
{
oprot.writeBinary(_iter148);
}
}
}
if (struct.isSetColumns()) {
{
oprot.writeI32(struct.columns.size());
for (ByteBuffer _iter149 : struct.columns)
{
oprot.writeBinary(_iter149);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRowsWithColumns_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list150 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.rows = new ArrayList<ByteBuffer>(_list150.size);
for (int _i151 = 0; _i151 < _list150.size; ++_i151)
{
ByteBuffer _elem152; // required
_elem152 = iprot.readBinary();
struct.rows.add(_elem152);
}
}
struct.setRowsIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list153 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.columns = new ArrayList<ByteBuffer>(_list153.size);
for (int _i154 = 0; _i154 < _list153.size; ++_i154)
{
ByteBuffer _elem155; // required
_elem155 = iprot.readBinary();
struct.columns.add(_elem155);
}
}
struct.setColumnsIsSet(true);
}
}
}
}
public static class getRowsWithColumns_result implements org.apache.thrift.TBase<getRowsWithColumns_result, getRowsWithColumns_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowsWithColumns_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 getRowsWithColumns_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRowsWithColumns_resultTupleSchemeFactory());
}
public List<TRowResult> success; // required
public IOError 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, TRowResult.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(getRowsWithColumns_result.class, metaDataMap);
}
public getRowsWithColumns_result() {
}
public getRowsWithColumns_result(
List<TRowResult> success,
IOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getRowsWithColumns_result(getRowsWithColumns_result other) {
if (other.isSetSuccess()) {
List<TRowResult> __this__success = new ArrayList<TRowResult>();
for (TRowResult other_element : other.success) {
__this__success.add(new TRowResult(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public getRowsWithColumns_result deepCopy() {
return new getRowsWithColumns_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<TRowResult> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TRowResult elem) {
if (this.success == null) {
this.success = new ArrayList<TRowResult>();
}
this.success.add(elem);
}
public List<TRowResult> getSuccess() {
return this.success;
}
public getRowsWithColumns_result setSuccess(List<TRowResult> 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 IOError getIo() {
return this.io;
}
public getRowsWithColumns_result setIo(IOError 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<TRowResult>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((IOError)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 getRowsWithColumns_result)
return this.equals((getRowsWithColumns_result)that);
return false;
}
public boolean equals(getRowsWithColumns_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(getRowsWithColumns_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getRowsWithColumns_result typedOther = (getRowsWithColumns_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("getRowsWithColumns_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
}
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 getRowsWithColumns_resultStandardSchemeFactory implements SchemeFactory {
public getRowsWithColumns_resultStandardScheme getScheme() {
return new getRowsWithColumns_resultStandardScheme();
}
}
private static class getRowsWithColumns_resultStandardScheme extends StandardScheme<getRowsWithColumns_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getRowsWithColumns_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 _list156 = iprot.readListBegin();
struct.success = new ArrayList<TRowResult>(_list156.size);
for (int _i157 = 0; _i157 < _list156.size; ++_i157)
{
TRowResult _elem158; // required
_elem158 = new TRowResult();
_elem158.read(iprot);
struct.success.add(_elem158);
}
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 IOError();
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, getRowsWithColumns_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 (TRowResult _iter159 : struct.success)
{
_iter159.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 getRowsWithColumns_resultTupleSchemeFactory implements SchemeFactory {
public getRowsWithColumns_resultTupleScheme getScheme() {
return new getRowsWithColumns_resultTupleScheme();
}
}
private static class getRowsWithColumns_resultTupleScheme extends TupleScheme<getRowsWithColumns_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRowsWithColumns_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 (TRowResult _iter160 : struct.success)
{
_iter160.write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRowsWithColumns_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 _list161 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TRowResult>(_list161.size);
for (int _i162 = 0; _i162 < _list161.size; ++_i162)
{
TRowResult _elem163; // required
_elem163 = new TRowResult();
_elem163.read(iprot);
struct.success.add(_elem163);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class getRowsTs_args implements org.apache.thrift.TBase<getRowsTs_args, getRowsTs_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowsTs_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("rows", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getRowsTs_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRowsTs_argsTupleSchemeFactory());
}
/**
* name of the table
*/
public ByteBuffer tableName; // required
/**
* row keys
*/
public List<ByteBuffer> rows; // required
/**
* timestamp
*/
public long timestamp; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of the table
*/
TABLE_NAME((short)1, "tableName"),
/**
* row keys
*/
ROWS((short)2, "rows"),
/**
* timestamp
*/
TIMESTAMP((short)3, "timestamp");
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_NAME
return TABLE_NAME;
case 2: // ROWS
return ROWS;
case 3: // TIMESTAMP
return TIMESTAMP;
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 __TIMESTAMP_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROWS, new org.apache.thrift.meta_data.FieldMetaData("rows", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowsTs_args.class, metaDataMap);
}
public getRowsTs_args() {
}
public getRowsTs_args(
ByteBuffer tableName,
List<ByteBuffer> rows,
long timestamp)
{
this();
this.tableName = tableName;
this.rows = rows;
this.timestamp = timestamp;
setTimestampIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getRowsTs_args(getRowsTs_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRows()) {
List<ByteBuffer> __this__rows = new ArrayList<ByteBuffer>();
for (ByteBuffer other_element : other.rows) {
__this__rows.add(other_element);
}
this.rows = __this__rows;
}
this.timestamp = other.timestamp;
}
public getRowsTs_args deepCopy() {
return new getRowsTs_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.rows = null;
setTimestampIsSet(false);
this.timestamp = 0;
}
/**
* name of the table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of the table
*/
public getRowsTs_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public getRowsTs_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public int getRowsSize() {
return (this.rows == null) ? 0 : this.rows.size();
}
public java.util.Iterator<ByteBuffer> getRowsIterator() {
return (this.rows == null) ? null : this.rows.iterator();
}
public void addToRows(ByteBuffer elem) {
if (this.rows == null) {
this.rows = new ArrayList<ByteBuffer>();
}
this.rows.add(elem);
}
/**
* row keys
*/
public List<ByteBuffer> getRows() {
return this.rows;
}
/**
* row keys
*/
public getRowsTs_args setRows(List<ByteBuffer> rows) {
this.rows = rows;
return this;
}
public void unsetRows() {
this.rows = null;
}
/** Returns true if field rows is set (has been assigned a value) and false otherwise */
public boolean isSetRows() {
return this.rows != null;
}
public void setRowsIsSet(boolean value) {
if (!value) {
this.rows = null;
}
}
/**
* timestamp
*/
public long getTimestamp() {
return this.timestamp;
}
/**
* timestamp
*/
public getRowsTs_args setTimestamp(long timestamp) {
this.timestamp = timestamp;
setTimestampIsSet(true);
return this;
}
public void unsetTimestamp() {
__isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROWS:
if (value == null) {
unsetRows();
} else {
setRows((List<ByteBuffer>)value);
}
break;
case TIMESTAMP:
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROWS:
return getRows();
case TIMESTAMP:
return Long.valueOf(getTimestamp());
}
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_NAME:
return isSetTableName();
case ROWS:
return isSetRows();
case TIMESTAMP:
return isSetTimestamp();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getRowsTs_args)
return this.equals((getRowsTs_args)that);
return false;
}
public boolean equals(getRowsTs_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_rows = true && this.isSetRows();
boolean that_present_rows = true && that.isSetRows();
if (this_present_rows || that_present_rows) {
if (!(this_present_rows && that_present_rows))
return false;
if (!this.rows.equals(that.rows))
return false;
}
boolean this_present_timestamp = true;
boolean that_present_timestamp = true;
if (this_present_timestamp || that_present_timestamp) {
if (!(this_present_timestamp && that_present_timestamp))
return false;
if (this.timestamp != that.timestamp)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getRowsTs_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getRowsTs_args typedOther = (getRowsTs_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRows()).compareTo(typedOther.isSetRows());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRows()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rows, typedOther.rows);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
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("getRowsTs_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("rows:");
if (this.rows == null) {
sb.append("null");
} else {
sb.append(this.rows);
}
first = false;
if (!first) sb.append(", ");
sb.append("timestamp:");
sb.append(this.timestamp);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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 getRowsTs_argsStandardSchemeFactory implements SchemeFactory {
public getRowsTs_argsStandardScheme getScheme() {
return new getRowsTs_argsStandardScheme();
}
}
private static class getRowsTs_argsStandardScheme extends StandardScheme<getRowsTs_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getRowsTs_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // ROWS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list164 = iprot.readListBegin();
struct.rows = new ArrayList<ByteBuffer>(_list164.size);
for (int _i165 = 0; _i165 < _list164.size; ++_i165)
{
ByteBuffer _elem166; // required
_elem166 = iprot.readBinary();
struct.rows.add(_elem166);
}
iprot.readListEnd();
}
struct.setRowsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TIMESTAMP
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(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, getRowsTs_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.rows != null) {
oprot.writeFieldBegin(ROWS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.rows.size()));
for (ByteBuffer _iter167 : struct.rows)
{
oprot.writeBinary(_iter167);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.timestamp);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getRowsTs_argsTupleSchemeFactory implements SchemeFactory {
public getRowsTs_argsTupleScheme getScheme() {
return new getRowsTs_argsTupleScheme();
}
}
private static class getRowsTs_argsTupleScheme extends TupleScheme<getRowsTs_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRowsTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRows()) {
optionals.set(1);
}
if (struct.isSetTimestamp()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRows()) {
{
oprot.writeI32(struct.rows.size());
for (ByteBuffer _iter168 : struct.rows)
{
oprot.writeBinary(_iter168);
}
}
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRowsTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list169 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.rows = new ArrayList<ByteBuffer>(_list169.size);
for (int _i170 = 0; _i170 < _list169.size; ++_i170)
{
ByteBuffer _elem171; // required
_elem171 = iprot.readBinary();
struct.rows.add(_elem171);
}
}
struct.setRowsIsSet(true);
}
if (incoming.get(2)) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
}
}
}
}
public static class getRowsTs_result implements org.apache.thrift.TBase<getRowsTs_result, getRowsTs_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowsTs_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 getRowsTs_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRowsTs_resultTupleSchemeFactory());
}
public List<TRowResult> success; // required
public IOError 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, TRowResult.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(getRowsTs_result.class, metaDataMap);
}
public getRowsTs_result() {
}
public getRowsTs_result(
List<TRowResult> success,
IOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getRowsTs_result(getRowsTs_result other) {
if (other.isSetSuccess()) {
List<TRowResult> __this__success = new ArrayList<TRowResult>();
for (TRowResult other_element : other.success) {
__this__success.add(new TRowResult(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public getRowsTs_result deepCopy() {
return new getRowsTs_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<TRowResult> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TRowResult elem) {
if (this.success == null) {
this.success = new ArrayList<TRowResult>();
}
this.success.add(elem);
}
public List<TRowResult> getSuccess() {
return this.success;
}
public getRowsTs_result setSuccess(List<TRowResult> 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 IOError getIo() {
return this.io;
}
public getRowsTs_result setIo(IOError 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<TRowResult>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((IOError)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 getRowsTs_result)
return this.equals((getRowsTs_result)that);
return false;
}
public boolean equals(getRowsTs_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(getRowsTs_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getRowsTs_result typedOther = (getRowsTs_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("getRowsTs_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
}
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 getRowsTs_resultStandardSchemeFactory implements SchemeFactory {
public getRowsTs_resultStandardScheme getScheme() {
return new getRowsTs_resultStandardScheme();
}
}
private static class getRowsTs_resultStandardScheme extends StandardScheme<getRowsTs_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getRowsTs_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<TRowResult>(_list172.size);
for (int _i173 = 0; _i173 < _list172.size; ++_i173)
{
TRowResult _elem174; // required
_elem174 = new TRowResult();
_elem174.read(iprot);
struct.success.add(_elem174);
}
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 IOError();
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, getRowsTs_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 (TRowResult _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();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getRowsTs_resultTupleSchemeFactory implements SchemeFactory {
public getRowsTs_resultTupleScheme getScheme() {
return new getRowsTs_resultTupleScheme();
}
}
private static class getRowsTs_resultTupleScheme extends TupleScheme<getRowsTs_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRowsTs_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 (TRowResult _iter176 : struct.success)
{
_iter176.write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRowsTs_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 _list177 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TRowResult>(_list177.size);
for (int _i178 = 0; _i178 < _list177.size; ++_i178)
{
TRowResult _elem179; // required
_elem179 = new TRowResult();
_elem179.read(iprot);
struct.success.add(_elem179);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class getRowsWithColumnsTs_args implements org.apache.thrift.TBase<getRowsWithColumnsTs_args, getRowsWithColumnsTs_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowsWithColumnsTs_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("rows", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getRowsWithColumnsTs_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRowsWithColumnsTs_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* row keys
*/
public List<ByteBuffer> rows; // required
/**
* List of columns to return, null for all columns
*/
public List<ByteBuffer> columns; // required
public long timestamp; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* row keys
*/
ROWS((short)2, "rows"),
/**
* List of columns to return, null for all columns
*/
COLUMNS((short)3, "columns"),
TIMESTAMP((short)4, "timestamp");
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_NAME
return TABLE_NAME;
case 2: // ROWS
return ROWS;
case 3: // COLUMNS
return COLUMNS;
case 4: // TIMESTAMP
return TIMESTAMP;
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 __TIMESTAMP_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROWS, new org.apache.thrift.meta_data.FieldMetaData("rows", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))));
tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowsWithColumnsTs_args.class, metaDataMap);
}
public getRowsWithColumnsTs_args() {
}
public getRowsWithColumnsTs_args(
ByteBuffer tableName,
List<ByteBuffer> rows,
List<ByteBuffer> columns,
long timestamp)
{
this();
this.tableName = tableName;
this.rows = rows;
this.columns = columns;
this.timestamp = timestamp;
setTimestampIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getRowsWithColumnsTs_args(getRowsWithColumnsTs_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRows()) {
List<ByteBuffer> __this__rows = new ArrayList<ByteBuffer>();
for (ByteBuffer other_element : other.rows) {
__this__rows.add(other_element);
}
this.rows = __this__rows;
}
if (other.isSetColumns()) {
List<ByteBuffer> __this__columns = new ArrayList<ByteBuffer>();
for (ByteBuffer other_element : other.columns) {
__this__columns.add(other_element);
}
this.columns = __this__columns;
}
this.timestamp = other.timestamp;
}
public getRowsWithColumnsTs_args deepCopy() {
return new getRowsWithColumnsTs_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.rows = null;
this.columns = null;
setTimestampIsSet(false);
this.timestamp = 0;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public getRowsWithColumnsTs_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public getRowsWithColumnsTs_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public int getRowsSize() {
return (this.rows == null) ? 0 : this.rows.size();
}
public java.util.Iterator<ByteBuffer> getRowsIterator() {
return (this.rows == null) ? null : this.rows.iterator();
}
public void addToRows(ByteBuffer elem) {
if (this.rows == null) {
this.rows = new ArrayList<ByteBuffer>();
}
this.rows.add(elem);
}
/**
* row keys
*/
public List<ByteBuffer> getRows() {
return this.rows;
}
/**
* row keys
*/
public getRowsWithColumnsTs_args setRows(List<ByteBuffer> rows) {
this.rows = rows;
return this;
}
public void unsetRows() {
this.rows = null;
}
/** Returns true if field rows is set (has been assigned a value) and false otherwise */
public boolean isSetRows() {
return this.rows != null;
}
public void setRowsIsSet(boolean value) {
if (!value) {
this.rows = null;
}
}
public int getColumnsSize() {
return (this.columns == null) ? 0 : this.columns.size();
}
public java.util.Iterator<ByteBuffer> getColumnsIterator() {
return (this.columns == null) ? null : this.columns.iterator();
}
public void addToColumns(ByteBuffer elem) {
if (this.columns == null) {
this.columns = new ArrayList<ByteBuffer>();
}
this.columns.add(elem);
}
/**
* List of columns to return, null for all columns
*/
public List<ByteBuffer> getColumns() {
return this.columns;
}
/**
* List of columns to return, null for all columns
*/
public getRowsWithColumnsTs_args setColumns(List<ByteBuffer> columns) {
this.columns = columns;
return this;
}
public void unsetColumns() {
this.columns = null;
}
/** Returns true if field columns is set (has been assigned a value) and false otherwise */
public boolean isSetColumns() {
return this.columns != null;
}
public void setColumnsIsSet(boolean value) {
if (!value) {
this.columns = null;
}
}
public long getTimestamp() {
return this.timestamp;
}
public getRowsWithColumnsTs_args setTimestamp(long timestamp) {
this.timestamp = timestamp;
setTimestampIsSet(true);
return this;
}
public void unsetTimestamp() {
__isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROWS:
if (value == null) {
unsetRows();
} else {
setRows((List<ByteBuffer>)value);
}
break;
case COLUMNS:
if (value == null) {
unsetColumns();
} else {
setColumns((List<ByteBuffer>)value);
}
break;
case TIMESTAMP:
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROWS:
return getRows();
case COLUMNS:
return getColumns();
case TIMESTAMP:
return Long.valueOf(getTimestamp());
}
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_NAME:
return isSetTableName();
case ROWS:
return isSetRows();
case COLUMNS:
return isSetColumns();
case TIMESTAMP:
return isSetTimestamp();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getRowsWithColumnsTs_args)
return this.equals((getRowsWithColumnsTs_args)that);
return false;
}
public boolean equals(getRowsWithColumnsTs_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_rows = true && this.isSetRows();
boolean that_present_rows = true && that.isSetRows();
if (this_present_rows || that_present_rows) {
if (!(this_present_rows && that_present_rows))
return false;
if (!this.rows.equals(that.rows))
return false;
}
boolean this_present_columns = true && this.isSetColumns();
boolean that_present_columns = true && that.isSetColumns();
if (this_present_columns || that_present_columns) {
if (!(this_present_columns && that_present_columns))
return false;
if (!this.columns.equals(that.columns))
return false;
}
boolean this_present_timestamp = true;
boolean that_present_timestamp = true;
if (this_present_timestamp || that_present_timestamp) {
if (!(this_present_timestamp && that_present_timestamp))
return false;
if (this.timestamp != that.timestamp)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getRowsWithColumnsTs_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getRowsWithColumnsTs_args typedOther = (getRowsWithColumnsTs_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRows()).compareTo(typedOther.isSetRows());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRows()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rows, typedOther.rows);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumns()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
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("getRowsWithColumnsTs_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("rows:");
if (this.rows == null) {
sb.append("null");
} else {
sb.append(this.rows);
}
first = false;
if (!first) sb.append(", ");
sb.append("columns:");
if (this.columns == null) {
sb.append("null");
} else {
sb.append(this.columns);
}
first = false;
if (!first) sb.append(", ");
sb.append("timestamp:");
sb.append(this.timestamp);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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 getRowsWithColumnsTs_argsStandardSchemeFactory implements SchemeFactory {
public getRowsWithColumnsTs_argsStandardScheme getScheme() {
return new getRowsWithColumnsTs_argsStandardScheme();
}
}
private static class getRowsWithColumnsTs_argsStandardScheme extends StandardScheme<getRowsWithColumnsTs_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getRowsWithColumnsTs_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // ROWS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list180 = iprot.readListBegin();
struct.rows = new ArrayList<ByteBuffer>(_list180.size);
for (int _i181 = 0; _i181 < _list180.size; ++_i181)
{
ByteBuffer _elem182; // required
_elem182 = iprot.readBinary();
struct.rows.add(_elem182);
}
iprot.readListEnd();
}
struct.setRowsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // COLUMNS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list183 = iprot.readListBegin();
struct.columns = new ArrayList<ByteBuffer>(_list183.size);
for (int _i184 = 0; _i184 < _list183.size; ++_i184)
{
ByteBuffer _elem185; // required
_elem185 = iprot.readBinary();
struct.columns.add(_elem185);
}
iprot.readListEnd();
}
struct.setColumnsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // TIMESTAMP
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(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, getRowsWithColumnsTs_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.rows != null) {
oprot.writeFieldBegin(ROWS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.rows.size()));
for (ByteBuffer _iter186 : struct.rows)
{
oprot.writeBinary(_iter186);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.columns != null) {
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size()));
for (ByteBuffer _iter187 : struct.columns)
{
oprot.writeBinary(_iter187);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.timestamp);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getRowsWithColumnsTs_argsTupleSchemeFactory implements SchemeFactory {
public getRowsWithColumnsTs_argsTupleScheme getScheme() {
return new getRowsWithColumnsTs_argsTupleScheme();
}
}
private static class getRowsWithColumnsTs_argsTupleScheme extends TupleScheme<getRowsWithColumnsTs_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRowsWithColumnsTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRows()) {
optionals.set(1);
}
if (struct.isSetColumns()) {
optionals.set(2);
}
if (struct.isSetTimestamp()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRows()) {
{
oprot.writeI32(struct.rows.size());
for (ByteBuffer _iter188 : struct.rows)
{
oprot.writeBinary(_iter188);
}
}
}
if (struct.isSetColumns()) {
{
oprot.writeI32(struct.columns.size());
for (ByteBuffer _iter189 : struct.columns)
{
oprot.writeBinary(_iter189);
}
}
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRowsWithColumnsTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list190 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.rows = new ArrayList<ByteBuffer>(_list190.size);
for (int _i191 = 0; _i191 < _list190.size; ++_i191)
{
ByteBuffer _elem192; // required
_elem192 = iprot.readBinary();
struct.rows.add(_elem192);
}
}
struct.setRowsIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list193 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.columns = new ArrayList<ByteBuffer>(_list193.size);
for (int _i194 = 0; _i194 < _list193.size; ++_i194)
{
ByteBuffer _elem195; // required
_elem195 = iprot.readBinary();
struct.columns.add(_elem195);
}
}
struct.setColumnsIsSet(true);
}
if (incoming.get(3)) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
}
}
}
}
public static class getRowsWithColumnsTs_result implements org.apache.thrift.TBase<getRowsWithColumnsTs_result, getRowsWithColumnsTs_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowsWithColumnsTs_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 getRowsWithColumnsTs_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getRowsWithColumnsTs_resultTupleSchemeFactory());
}
public List<TRowResult> success; // required
public IOError 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, TRowResult.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(getRowsWithColumnsTs_result.class, metaDataMap);
}
public getRowsWithColumnsTs_result() {
}
public getRowsWithColumnsTs_result(
List<TRowResult> success,
IOError io)
{
this();
this.success = success;
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getRowsWithColumnsTs_result(getRowsWithColumnsTs_result other) {
if (other.isSetSuccess()) {
List<TRowResult> __this__success = new ArrayList<TRowResult>();
for (TRowResult other_element : other.success) {
__this__success.add(new TRowResult(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public getRowsWithColumnsTs_result deepCopy() {
return new getRowsWithColumnsTs_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<TRowResult> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TRowResult elem) {
if (this.success == null) {
this.success = new ArrayList<TRowResult>();
}
this.success.add(elem);
}
public List<TRowResult> getSuccess() {
return this.success;
}
public getRowsWithColumnsTs_result setSuccess(List<TRowResult> 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 IOError getIo() {
return this.io;
}
public getRowsWithColumnsTs_result setIo(IOError 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<TRowResult>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((IOError)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 getRowsWithColumnsTs_result)
return this.equals((getRowsWithColumnsTs_result)that);
return false;
}
public boolean equals(getRowsWithColumnsTs_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(getRowsWithColumnsTs_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getRowsWithColumnsTs_result typedOther = (getRowsWithColumnsTs_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("getRowsWithColumnsTs_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
}
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 getRowsWithColumnsTs_resultStandardSchemeFactory implements SchemeFactory {
public getRowsWithColumnsTs_resultStandardScheme getScheme() {
return new getRowsWithColumnsTs_resultStandardScheme();
}
}
private static class getRowsWithColumnsTs_resultStandardScheme extends StandardScheme<getRowsWithColumnsTs_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getRowsWithColumnsTs_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 _list196 = iprot.readListBegin();
struct.success = new ArrayList<TRowResult>(_list196.size);
for (int _i197 = 0; _i197 < _list196.size; ++_i197)
{
TRowResult _elem198; // required
_elem198 = new TRowResult();
_elem198.read(iprot);
struct.success.add(_elem198);
}
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 IOError();
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, getRowsWithColumnsTs_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 (TRowResult _iter199 : struct.success)
{
_iter199.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 getRowsWithColumnsTs_resultTupleSchemeFactory implements SchemeFactory {
public getRowsWithColumnsTs_resultTupleScheme getScheme() {
return new getRowsWithColumnsTs_resultTupleScheme();
}
}
private static class getRowsWithColumnsTs_resultTupleScheme extends TupleScheme<getRowsWithColumnsTs_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRowsWithColumnsTs_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 (TRowResult _iter200 : struct.success)
{
_iter200.write(oprot);
}
}
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRowsWithColumnsTs_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 _list201 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TRowResult>(_list201.size);
for (int _i202 = 0; _i202 < _list201.size; ++_i202)
{
TRowResult _elem203; // required
_elem203 = new TRowResult();
_elem203.read(iprot);
struct.success.add(_elem203);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class mutateRow_args implements org.apache.thrift.TBase<mutateRow_args, mutateRow_args._Fields>, java.io.Serializable, Cloneable {
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_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 MUTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("mutations", org.apache.thrift.protocol.TType.LIST, (short)3);
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());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* row key
*/
public ByteBuffer row; // required
/**
* list of mutation commands
*/
public List<Mutation> mutations; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* row key
*/
ROW((short)2, "row"),
/**
* list of mutation commands
*/
MUTATIONS((short)3, "mutations");
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_NAME
return TABLE_NAME;
case 2: // ROW
return ROW;
case 3: // MUTATIONS
return 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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.MUTATIONS, new org.apache.thrift.meta_data.FieldMetaData("mutations", 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, Mutation.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mutateRow_args.class, metaDataMap);
}
public mutateRow_args() {
}
public mutateRow_args(
ByteBuffer tableName,
ByteBuffer row,
List<Mutation> mutations)
{
this();
this.tableName = tableName;
this.row = row;
this.mutations = mutations;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public mutateRow_args(mutateRow_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRow()) {
this.row = other.row;
}
if (other.isSetMutations()) {
List<Mutation> __this__mutations = new ArrayList<Mutation>();
for (Mutation other_element : other.mutations) {
__this__mutations.add(new Mutation(other_element));
}
this.mutations = __this__mutations;
}
}
public mutateRow_args deepCopy() {
return new mutateRow_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.row = null;
this.mutations = null;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public mutateRow_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public mutateRow_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* row key
*/
public byte[] getRow() {
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
return row;
}
/**
* row key
*/
public mutateRow_args setRow(byte[] row) {
setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
return this;
}
public mutateRow_args setRow(ByteBuffer row) {
this.row = 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 int getMutationsSize() {
return (this.mutations == null) ? 0 : this.mutations.size();
}
public java.util.Iterator<Mutation> getMutationsIterator() {
return (this.mutations == null) ? null : this.mutations.iterator();
}
public void addToMutations(Mutation elem) {
if (this.mutations == null) {
this.mutations = new ArrayList<Mutation>();
}
this.mutations.add(elem);
}
/**
* list of mutation commands
*/
public List<Mutation> getMutations() {
return this.mutations;
}
/**
* list of mutation commands
*/
public mutateRow_args setMutations(List<Mutation> mutations) {
this.mutations = mutations;
return this;
}
public void unsetMutations() {
this.mutations = null;
}
/** Returns true if field mutations is set (has been assigned a value) and false otherwise */
public boolean isSetMutations() {
return this.mutations != null;
}
public void setMutationsIsSet(boolean value) {
if (!value) {
this.mutations = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
}
break;
case MUTATIONS:
if (value == null) {
unsetMutations();
} else {
setMutations((List<Mutation>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROW:
return getRow();
case MUTATIONS:
return getMutations();
}
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_NAME:
return isSetTableName();
case ROW:
return isSetRow();
case MUTATIONS:
return isSetMutations();
}
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_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
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_mutations = true && this.isSetMutations();
boolean that_present_mutations = true && that.isSetMutations();
if (this_present_mutations || that_present_mutations) {
if (!(this_present_mutations && that_present_mutations))
return false;
if (!this.mutations.equals(that.mutations))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(mutateRow_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
mutateRow_args typedOther = (mutateRow_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMutations()).compareTo(typedOther.isSetMutations());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMutations()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mutations, typedOther.mutations);
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("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("row:");
if (this.row == null) {
sb.append("null");
} else {
sb.append(this.row);
}
first = false;
if (!first) sb.append(", ");
sb.append("mutations:");
if (this.mutations == null) {
sb.append("null");
} else {
sb.append(this.mutations);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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: // MUTATIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list204 = iprot.readListBegin();
struct.mutations = new ArrayList<Mutation>(_list204.size);
for (int _i205 = 0; _i205 < _list204.size; ++_i205)
{
Mutation _elem206; // required
_elem206 = new Mutation();
_elem206.read(iprot);
struct.mutations.add(_elem206);
}
iprot.readListEnd();
}
struct.setMutationsIsSet(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.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.row != null) {
oprot.writeFieldBegin(ROW_FIELD_DESC);
oprot.writeBinary(struct.row);
oprot.writeFieldEnd();
}
if (struct.mutations != null) {
oprot.writeFieldBegin(MUTATIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.mutations.size()));
for (Mutation _iter207 : struct.mutations)
{
_iter207.write(oprot);
}
oprot.writeListEnd();
}
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;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRow()) {
optionals.set(1);
}
if (struct.isSetMutations()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
if (struct.isSetMutations()) {
{
oprot.writeI32(struct.mutations.size());
for (Mutation _iter208 : struct.mutations)
{
_iter208.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, mutateRow_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list209 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.mutations = new ArrayList<Mutation>(_list209.size);
for (int _i210 = 0; _i210 < _list209.size; ++_i210)
{
Mutation _elem211; // required
_elem211 = new Mutation();
_elem211.read(iprot);
struct.mutations.add(_elem211);
}
}
struct.setMutationsIsSet(true);
}
}
}
}
public static class mutateRow_result implements org.apache.thrift.TBase<mutateRow_result, mutateRow_result._Fields>, java.io.Serializable, Cloneable {
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 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 mutateRow_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new mutateRow_resultTupleSchemeFactory());
}
public IOError io; // required
public IllegalArgument 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"),
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(mutateRow_result.class, metaDataMap);
}
public mutateRow_result() {
}
public mutateRow_result(
IOError io,
IllegalArgument ia)
{
this();
this.io = io;
this.ia = ia;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public mutateRow_result(mutateRow_result other) {
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
if (other.isSetIa()) {
this.ia = new IllegalArgument(other.ia);
}
}
public mutateRow_result deepCopy() {
return new mutateRow_result(this);
}
@Override
public void clear() {
this.io = null;
this.ia = null;
}
public IOError getIo() {
return this.io;
}
public mutateRow_result setIo(IOError 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 IllegalArgument getIa() {
return this.ia;
}
public mutateRow_result setIa(IllegalArgument 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((IOError)value);
}
break;
case IA:
if (value == null) {
unsetIa();
} else {
setIa((IllegalArgument)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 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;
}
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() {
return 0;
}
public int compareTo(mutateRow_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
mutateRow_result typedOther = (mutateRow_result)other;
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;
}
}
lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIa()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, typedOther.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("mutateRow_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
}
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 IOError();
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 IllegalArgument();
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, 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();
}
if (struct.ia != null) {
oprot.writeFieldBegin(IA_FIELD_DESC);
struct.ia.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);
}
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, mutateRow_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
if (incoming.get(1)) {
struct.ia = new IllegalArgument();
struct.ia.read(iprot);
struct.setIaIsSet(true);
}
}
}
}
public static class mutateRowTs_args implements org.apache.thrift.TBase<mutateRowTs_args, mutateRowTs_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRowTs_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 MUTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("mutations", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new mutateRowTs_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new mutateRowTs_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* row key
*/
public ByteBuffer row; // required
/**
* list of mutation commands
*/
public List<Mutation> mutations; // required
/**
* timestamp
*/
public long timestamp; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* row key
*/
ROW((short)2, "row"),
/**
* list of mutation commands
*/
MUTATIONS((short)3, "mutations"),
/**
* timestamp
*/
TIMESTAMP((short)4, "timestamp");
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_NAME
return TABLE_NAME;
case 2: // ROW
return ROW;
case 3: // MUTATIONS
return MUTATIONS;
case 4: // TIMESTAMP
return TIMESTAMP;
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 __TIMESTAMP_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.MUTATIONS, new org.apache.thrift.meta_data.FieldMetaData("mutations", 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, Mutation.class))));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mutateRowTs_args.class, metaDataMap);
}
public mutateRowTs_args() {
}
public mutateRowTs_args(
ByteBuffer tableName,
ByteBuffer row,
List<Mutation> mutations,
long timestamp)
{
this();
this.tableName = tableName;
this.row = row;
this.mutations = mutations;
this.timestamp = timestamp;
setTimestampIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public mutateRowTs_args(mutateRowTs_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRow()) {
this.row = other.row;
}
if (other.isSetMutations()) {
List<Mutation> __this__mutations = new ArrayList<Mutation>();
for (Mutation other_element : other.mutations) {
__this__mutations.add(new Mutation(other_element));
}
this.mutations = __this__mutations;
}
this.timestamp = other.timestamp;
}
public mutateRowTs_args deepCopy() {
return new mutateRowTs_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.row = null;
this.mutations = null;
setTimestampIsSet(false);
this.timestamp = 0;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public mutateRowTs_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public mutateRowTs_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* row key
*/
public byte[] getRow() {
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
return row;
}
/**
* row key
*/
public mutateRowTs_args setRow(byte[] row) {
setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
return this;
}
public mutateRowTs_args setRow(ByteBuffer row) {
this.row = 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 int getMutationsSize() {
return (this.mutations == null) ? 0 : this.mutations.size();
}
public java.util.Iterator<Mutation> getMutationsIterator() {
return (this.mutations == null) ? null : this.mutations.iterator();
}
public void addToMutations(Mutation elem) {
if (this.mutations == null) {
this.mutations = new ArrayList<Mutation>();
}
this.mutations.add(elem);
}
/**
* list of mutation commands
*/
public List<Mutation> getMutations() {
return this.mutations;
}
/**
* list of mutation commands
*/
public mutateRowTs_args setMutations(List<Mutation> mutations) {
this.mutations = mutations;
return this;
}
public void unsetMutations() {
this.mutations = null;
}
/** Returns true if field mutations is set (has been assigned a value) and false otherwise */
public boolean isSetMutations() {
return this.mutations != null;
}
public void setMutationsIsSet(boolean value) {
if (!value) {
this.mutations = null;
}
}
/**
* timestamp
*/
public long getTimestamp() {
return this.timestamp;
}
/**
* timestamp
*/
public mutateRowTs_args setTimestamp(long timestamp) {
this.timestamp = timestamp;
setTimestampIsSet(true);
return this;
}
public void unsetTimestamp() {
__isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
}
break;
case MUTATIONS:
if (value == null) {
unsetMutations();
} else {
setMutations((List<Mutation>)value);
}
break;
case TIMESTAMP:
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROW:
return getRow();
case MUTATIONS:
return getMutations();
case TIMESTAMP:
return Long.valueOf(getTimestamp());
}
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_NAME:
return isSetTableName();
case ROW:
return isSetRow();
case MUTATIONS:
return isSetMutations();
case TIMESTAMP:
return isSetTimestamp();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof mutateRowTs_args)
return this.equals((mutateRowTs_args)that);
return false;
}
public boolean equals(mutateRowTs_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
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_mutations = true && this.isSetMutations();
boolean that_present_mutations = true && that.isSetMutations();
if (this_present_mutations || that_present_mutations) {
if (!(this_present_mutations && that_present_mutations))
return false;
if (!this.mutations.equals(that.mutations))
return false;
}
boolean this_present_timestamp = true;
boolean that_present_timestamp = true;
if (this_present_timestamp || that_present_timestamp) {
if (!(this_present_timestamp && that_present_timestamp))
return false;
if (this.timestamp != that.timestamp)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(mutateRowTs_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
mutateRowTs_args typedOther = (mutateRowTs_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMutations()).compareTo(typedOther.isSetMutations());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMutations()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mutations, typedOther.mutations);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
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("mutateRowTs_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("row:");
if (this.row == null) {
sb.append("null");
} else {
sb.append(this.row);
}
first = false;
if (!first) sb.append(", ");
sb.append("mutations:");
if (this.mutations == null) {
sb.append("null");
} else {
sb.append(this.mutations);
}
first = false;
if (!first) sb.append(", ");
sb.append("timestamp:");
sb.append(this.timestamp);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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 mutateRowTs_argsStandardSchemeFactory implements SchemeFactory {
public mutateRowTs_argsStandardScheme getScheme() {
return new mutateRowTs_argsStandardScheme();
}
}
private static class mutateRowTs_argsStandardScheme extends StandardScheme<mutateRowTs_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRowTs_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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: // MUTATIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list212 = iprot.readListBegin();
struct.mutations = new ArrayList<Mutation>(_list212.size);
for (int _i213 = 0; _i213 < _list212.size; ++_i213)
{
Mutation _elem214; // required
_elem214 = new Mutation();
_elem214.read(iprot);
struct.mutations.add(_elem214);
}
iprot.readListEnd();
}
struct.setMutationsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // TIMESTAMP
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(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, mutateRowTs_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.row != null) {
oprot.writeFieldBegin(ROW_FIELD_DESC);
oprot.writeBinary(struct.row);
oprot.writeFieldEnd();
}
if (struct.mutations != null) {
oprot.writeFieldBegin(MUTATIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.mutations.size()));
for (Mutation _iter215 : struct.mutations)
{
_iter215.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.timestamp);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class mutateRowTs_argsTupleSchemeFactory implements SchemeFactory {
public mutateRowTs_argsTupleScheme getScheme() {
return new mutateRowTs_argsTupleScheme();
}
}
private static class mutateRowTs_argsTupleScheme extends TupleScheme<mutateRowTs_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, mutateRowTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRow()) {
optionals.set(1);
}
if (struct.isSetMutations()) {
optionals.set(2);
}
if (struct.isSetTimestamp()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
if (struct.isSetMutations()) {
{
oprot.writeI32(struct.mutations.size());
for (Mutation _iter216 : struct.mutations)
{
_iter216.write(oprot);
}
}
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, mutateRowTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list217 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.mutations = new ArrayList<Mutation>(_list217.size);
for (int _i218 = 0; _i218 < _list217.size; ++_i218)
{
Mutation _elem219; // required
_elem219 = new Mutation();
_elem219.read(iprot);
struct.mutations.add(_elem219);
}
}
struct.setMutationsIsSet(true);
}
if (incoming.get(3)) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
}
}
}
}
public static class mutateRowTs_result implements org.apache.thrift.TBase<mutateRowTs_result, mutateRowTs_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRowTs_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 mutateRowTs_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new mutateRowTs_resultTupleSchemeFactory());
}
public IOError io; // required
public IllegalArgument 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"),
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(mutateRowTs_result.class, metaDataMap);
}
public mutateRowTs_result() {
}
public mutateRowTs_result(
IOError io,
IllegalArgument ia)
{
this();
this.io = io;
this.ia = ia;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public mutateRowTs_result(mutateRowTs_result other) {
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
if (other.isSetIa()) {
this.ia = new IllegalArgument(other.ia);
}
}
public mutateRowTs_result deepCopy() {
return new mutateRowTs_result(this);
}
@Override
public void clear() {
this.io = null;
this.ia = null;
}
public IOError getIo() {
return this.io;
}
public mutateRowTs_result setIo(IOError 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 IllegalArgument getIa() {
return this.ia;
}
public mutateRowTs_result setIa(IllegalArgument 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((IOError)value);
}
break;
case IA:
if (value == null) {
unsetIa();
} else {
setIa((IllegalArgument)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 mutateRowTs_result)
return this.equals((mutateRowTs_result)that);
return false;
}
public boolean equals(mutateRowTs_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() {
return 0;
}
public int compareTo(mutateRowTs_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
mutateRowTs_result typedOther = (mutateRowTs_result)other;
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;
}
}
lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIa()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, typedOther.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("mutateRowTs_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
}
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 mutateRowTs_resultStandardSchemeFactory implements SchemeFactory {
public mutateRowTs_resultStandardScheme getScheme() {
return new mutateRowTs_resultStandardScheme();
}
}
private static class mutateRowTs_resultStandardScheme extends StandardScheme<mutateRowTs_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRowTs_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 IOError();
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 IllegalArgument();
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, mutateRowTs_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 mutateRowTs_resultTupleSchemeFactory implements SchemeFactory {
public mutateRowTs_resultTupleScheme getScheme() {
return new mutateRowTs_resultTupleScheme();
}
}
private static class mutateRowTs_resultTupleScheme extends TupleScheme<mutateRowTs_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, mutateRowTs_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, mutateRowTs_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
if (incoming.get(1)) {
struct.ia = new IllegalArgument();
struct.ia.read(iprot);
struct.setIaIsSet(true);
}
}
}
}
public static class mutateRows_args implements org.apache.thrift.TBase<mutateRows_args, mutateRows_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRows_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField ROW_BATCHES_FIELD_DESC = new org.apache.thrift.protocol.TField("rowBatches", 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 mutateRows_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new mutateRows_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* list of row batches
*/
public List<BatchMutation> rowBatches; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* list of row batches
*/
ROW_BATCHES((short)2, "rowBatches");
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_NAME
return TABLE_NAME;
case 2: // ROW_BATCHES
return ROW_BATCHES;
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROW_BATCHES, new org.apache.thrift.meta_data.FieldMetaData("rowBatches", 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, BatchMutation.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mutateRows_args.class, metaDataMap);
}
public mutateRows_args() {
}
public mutateRows_args(
ByteBuffer tableName,
List<BatchMutation> rowBatches)
{
this();
this.tableName = tableName;
this.rowBatches = rowBatches;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public mutateRows_args(mutateRows_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRowBatches()) {
List<BatchMutation> __this__rowBatches = new ArrayList<BatchMutation>();
for (BatchMutation other_element : other.rowBatches) {
__this__rowBatches.add(new BatchMutation(other_element));
}
this.rowBatches = __this__rowBatches;
}
}
public mutateRows_args deepCopy() {
return new mutateRows_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.rowBatches = null;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public mutateRows_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public mutateRows_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public int getRowBatchesSize() {
return (this.rowBatches == null) ? 0 : this.rowBatches.size();
}
public java.util.Iterator<BatchMutation> getRowBatchesIterator() {
return (this.rowBatches == null) ? null : this.rowBatches.iterator();
}
public void addToRowBatches(BatchMutation elem) {
if (this.rowBatches == null) {
this.rowBatches = new ArrayList<BatchMutation>();
}
this.rowBatches.add(elem);
}
/**
* list of row batches
*/
public List<BatchMutation> getRowBatches() {
return this.rowBatches;
}
/**
* list of row batches
*/
public mutateRows_args setRowBatches(List<BatchMutation> rowBatches) {
this.rowBatches = rowBatches;
return this;
}
public void unsetRowBatches() {
this.rowBatches = null;
}
/** Returns true if field rowBatches is set (has been assigned a value) and false otherwise */
public boolean isSetRowBatches() {
return this.rowBatches != null;
}
public void setRowBatchesIsSet(boolean value) {
if (!value) {
this.rowBatches = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROW_BATCHES:
if (value == null) {
unsetRowBatches();
} else {
setRowBatches((List<BatchMutation>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROW_BATCHES:
return getRowBatches();
}
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_NAME:
return isSetTableName();
case ROW_BATCHES:
return isSetRowBatches();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof mutateRows_args)
return this.equals((mutateRows_args)that);
return false;
}
public boolean equals(mutateRows_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_rowBatches = true && this.isSetRowBatches();
boolean that_present_rowBatches = true && that.isSetRowBatches();
if (this_present_rowBatches || that_present_rowBatches) {
if (!(this_present_rowBatches && that_present_rowBatches))
return false;
if (!this.rowBatches.equals(that.rowBatches))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(mutateRows_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
mutateRows_args typedOther = (mutateRows_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRowBatches()).compareTo(typedOther.isSetRowBatches());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRowBatches()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rowBatches, typedOther.rowBatches);
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("mutateRows_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("rowBatches:");
if (this.rowBatches == null) {
sb.append("null");
} else {
sb.append(this.rowBatches);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 mutateRows_argsStandardSchemeFactory implements SchemeFactory {
public mutateRows_argsStandardScheme getScheme() {
return new mutateRows_argsStandardScheme();
}
}
private static class mutateRows_argsStandardScheme extends StandardScheme<mutateRows_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRows_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // ROW_BATCHES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list220 = iprot.readListBegin();
struct.rowBatches = new ArrayList<BatchMutation>(_list220.size);
for (int _i221 = 0; _i221 < _list220.size; ++_i221)
{
BatchMutation _elem222; // required
_elem222 = new BatchMutation();
_elem222.read(iprot);
struct.rowBatches.add(_elem222);
}
iprot.readListEnd();
}
struct.setRowBatchesIsSet(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, mutateRows_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.rowBatches != null) {
oprot.writeFieldBegin(ROW_BATCHES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.rowBatches.size()));
for (BatchMutation _iter223 : struct.rowBatches)
{
_iter223.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class mutateRows_argsTupleSchemeFactory implements SchemeFactory {
public mutateRows_argsTupleScheme getScheme() {
return new mutateRows_argsTupleScheme();
}
}
private static class mutateRows_argsTupleScheme extends TupleScheme<mutateRows_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, mutateRows_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRowBatches()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRowBatches()) {
{
oprot.writeI32(struct.rowBatches.size());
for (BatchMutation _iter224 : struct.rowBatches)
{
_iter224.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, mutateRows_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list225 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.rowBatches = new ArrayList<BatchMutation>(_list225.size);
for (int _i226 = 0; _i226 < _list225.size; ++_i226)
{
BatchMutation _elem227; // required
_elem227 = new BatchMutation();
_elem227.read(iprot);
struct.rowBatches.add(_elem227);
}
}
struct.setRowBatchesIsSet(true);
}
}
}
}
public static class mutateRows_result implements org.apache.thrift.TBase<mutateRows_result, mutateRows_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRows_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 mutateRows_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new mutateRows_resultTupleSchemeFactory());
}
public IOError io; // required
public IllegalArgument 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"),
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(mutateRows_result.class, metaDataMap);
}
public mutateRows_result() {
}
public mutateRows_result(
IOError io,
IllegalArgument ia)
{
this();
this.io = io;
this.ia = ia;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public mutateRows_result(mutateRows_result other) {
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
if (other.isSetIa()) {
this.ia = new IllegalArgument(other.ia);
}
}
public mutateRows_result deepCopy() {
return new mutateRows_result(this);
}
@Override
public void clear() {
this.io = null;
this.ia = null;
}
public IOError getIo() {
return this.io;
}
public mutateRows_result setIo(IOError 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 IllegalArgument getIa() {
return this.ia;
}
public mutateRows_result setIa(IllegalArgument 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((IOError)value);
}
break;
case IA:
if (value == null) {
unsetIa();
} else {
setIa((IllegalArgument)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 mutateRows_result)
return this.equals((mutateRows_result)that);
return false;
}
public boolean equals(mutateRows_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() {
return 0;
}
public int compareTo(mutateRows_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
mutateRows_result typedOther = (mutateRows_result)other;
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;
}
}
lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIa()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, typedOther.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("mutateRows_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
}
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 mutateRows_resultStandardSchemeFactory implements SchemeFactory {
public mutateRows_resultStandardScheme getScheme() {
return new mutateRows_resultStandardScheme();
}
}
private static class mutateRows_resultStandardScheme extends StandardScheme<mutateRows_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRows_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 IOError();
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 IllegalArgument();
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, mutateRows_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 mutateRows_resultTupleSchemeFactory implements SchemeFactory {
public mutateRows_resultTupleScheme getScheme() {
return new mutateRows_resultTupleScheme();
}
}
private static class mutateRows_resultTupleScheme extends TupleScheme<mutateRows_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, mutateRows_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, mutateRows_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
if (incoming.get(1)) {
struct.ia = new IllegalArgument();
struct.ia.read(iprot);
struct.setIaIsSet(true);
}
}
}
}
public static class mutateRowsTs_args implements org.apache.thrift.TBase<mutateRowsTs_args, mutateRowsTs_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRowsTs_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField ROW_BATCHES_FIELD_DESC = new org.apache.thrift.protocol.TField("rowBatches", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new mutateRowsTs_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new mutateRowsTs_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* list of row batches
*/
public List<BatchMutation> rowBatches; // required
/**
* timestamp
*/
public long timestamp; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* list of row batches
*/
ROW_BATCHES((short)2, "rowBatches"),
/**
* timestamp
*/
TIMESTAMP((short)3, "timestamp");
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_NAME
return TABLE_NAME;
case 2: // ROW_BATCHES
return ROW_BATCHES;
case 3: // TIMESTAMP
return TIMESTAMP;
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 __TIMESTAMP_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROW_BATCHES, new org.apache.thrift.meta_data.FieldMetaData("rowBatches", 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, BatchMutation.class))));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mutateRowsTs_args.class, metaDataMap);
}
public mutateRowsTs_args() {
}
public mutateRowsTs_args(
ByteBuffer tableName,
List<BatchMutation> rowBatches,
long timestamp)
{
this();
this.tableName = tableName;
this.rowBatches = rowBatches;
this.timestamp = timestamp;
setTimestampIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public mutateRowsTs_args(mutateRowsTs_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRowBatches()) {
List<BatchMutation> __this__rowBatches = new ArrayList<BatchMutation>();
for (BatchMutation other_element : other.rowBatches) {
__this__rowBatches.add(new BatchMutation(other_element));
}
this.rowBatches = __this__rowBatches;
}
this.timestamp = other.timestamp;
}
public mutateRowsTs_args deepCopy() {
return new mutateRowsTs_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.rowBatches = null;
setTimestampIsSet(false);
this.timestamp = 0;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public mutateRowsTs_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public mutateRowsTs_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
public int getRowBatchesSize() {
return (this.rowBatches == null) ? 0 : this.rowBatches.size();
}
public java.util.Iterator<BatchMutation> getRowBatchesIterator() {
return (this.rowBatches == null) ? null : this.rowBatches.iterator();
}
public void addToRowBatches(BatchMutation elem) {
if (this.rowBatches == null) {
this.rowBatches = new ArrayList<BatchMutation>();
}
this.rowBatches.add(elem);
}
/**
* list of row batches
*/
public List<BatchMutation> getRowBatches() {
return this.rowBatches;
}
/**
* list of row batches
*/
public mutateRowsTs_args setRowBatches(List<BatchMutation> rowBatches) {
this.rowBatches = rowBatches;
return this;
}
public void unsetRowBatches() {
this.rowBatches = null;
}
/** Returns true if field rowBatches is set (has been assigned a value) and false otherwise */
public boolean isSetRowBatches() {
return this.rowBatches != null;
}
public void setRowBatchesIsSet(boolean value) {
if (!value) {
this.rowBatches = null;
}
}
/**
* timestamp
*/
public long getTimestamp() {
return this.timestamp;
}
/**
* timestamp
*/
public mutateRowsTs_args setTimestamp(long timestamp) {
this.timestamp = timestamp;
setTimestampIsSet(true);
return this;
}
public void unsetTimestamp() {
__isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROW_BATCHES:
if (value == null) {
unsetRowBatches();
} else {
setRowBatches((List<BatchMutation>)value);
}
break;
case TIMESTAMP:
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROW_BATCHES:
return getRowBatches();
case TIMESTAMP:
return Long.valueOf(getTimestamp());
}
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_NAME:
return isSetTableName();
case ROW_BATCHES:
return isSetRowBatches();
case TIMESTAMP:
return isSetTimestamp();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof mutateRowsTs_args)
return this.equals((mutateRowsTs_args)that);
return false;
}
public boolean equals(mutateRowsTs_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_rowBatches = true && this.isSetRowBatches();
boolean that_present_rowBatches = true && that.isSetRowBatches();
if (this_present_rowBatches || that_present_rowBatches) {
if (!(this_present_rowBatches && that_present_rowBatches))
return false;
if (!this.rowBatches.equals(that.rowBatches))
return false;
}
boolean this_present_timestamp = true;
boolean that_present_timestamp = true;
if (this_present_timestamp || that_present_timestamp) {
if (!(this_present_timestamp && that_present_timestamp))
return false;
if (this.timestamp != that.timestamp)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(mutateRowsTs_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
mutateRowsTs_args typedOther = (mutateRowsTs_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRowBatches()).compareTo(typedOther.isSetRowBatches());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRowBatches()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rowBatches, typedOther.rowBatches);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
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("mutateRowsTs_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("rowBatches:");
if (this.rowBatches == null) {
sb.append("null");
} else {
sb.append(this.rowBatches);
}
first = false;
if (!first) sb.append(", ");
sb.append("timestamp:");
sb.append(this.timestamp);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 mutateRowsTs_argsStandardSchemeFactory implements SchemeFactory {
public mutateRowsTs_argsStandardScheme getScheme() {
return new mutateRowsTs_argsStandardScheme();
}
}
private static class mutateRowsTs_argsStandardScheme extends StandardScheme<mutateRowsTs_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRowsTs_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // ROW_BATCHES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list228 = iprot.readListBegin();
struct.rowBatches = new ArrayList<BatchMutation>(_list228.size);
for (int _i229 = 0; _i229 < _list228.size; ++_i229)
{
BatchMutation _elem230; // required
_elem230 = new BatchMutation();
_elem230.read(iprot);
struct.rowBatches.add(_elem230);
}
iprot.readListEnd();
}
struct.setRowBatchesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TIMESTAMP
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(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, mutateRowsTs_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.rowBatches != null) {
oprot.writeFieldBegin(ROW_BATCHES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.rowBatches.size()));
for (BatchMutation _iter231 : struct.rowBatches)
{
_iter231.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.timestamp);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class mutateRowsTs_argsTupleSchemeFactory implements SchemeFactory {
public mutateRowsTs_argsTupleScheme getScheme() {
return new mutateRowsTs_argsTupleScheme();
}
}
private static class mutateRowsTs_argsTupleScheme extends TupleScheme<mutateRowsTs_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, mutateRowsTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRowBatches()) {
optionals.set(1);
}
if (struct.isSetTimestamp()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRowBatches()) {
{
oprot.writeI32(struct.rowBatches.size());
for (BatchMutation _iter232 : struct.rowBatches)
{
_iter232.write(oprot);
}
}
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, mutateRowsTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list233 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.rowBatches = new ArrayList<BatchMutation>(_list233.size);
for (int _i234 = 0; _i234 < _list233.size; ++_i234)
{
BatchMutation _elem235; // required
_elem235 = new BatchMutation();
_elem235.read(iprot);
struct.rowBatches.add(_elem235);
}
}
struct.setRowBatchesIsSet(true);
}
if (incoming.get(2)) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
}
}
}
}
public static class mutateRowsTs_result implements org.apache.thrift.TBase<mutateRowsTs_result, mutateRowsTs_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRowsTs_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 mutateRowsTs_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new mutateRowsTs_resultTupleSchemeFactory());
}
public IOError io; // required
public IllegalArgument 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"),
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(mutateRowsTs_result.class, metaDataMap);
}
public mutateRowsTs_result() {
}
public mutateRowsTs_result(
IOError io,
IllegalArgument ia)
{
this();
this.io = io;
this.ia = ia;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public mutateRowsTs_result(mutateRowsTs_result other) {
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
if (other.isSetIa()) {
this.ia = new IllegalArgument(other.ia);
}
}
public mutateRowsTs_result deepCopy() {
return new mutateRowsTs_result(this);
}
@Override
public void clear() {
this.io = null;
this.ia = null;
}
public IOError getIo() {
return this.io;
}
public mutateRowsTs_result setIo(IOError 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 IllegalArgument getIa() {
return this.ia;
}
public mutateRowsTs_result setIa(IllegalArgument 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((IOError)value);
}
break;
case IA:
if (value == null) {
unsetIa();
} else {
setIa((IllegalArgument)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 mutateRowsTs_result)
return this.equals((mutateRowsTs_result)that);
return false;
}
public boolean equals(mutateRowsTs_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() {
return 0;
}
public int compareTo(mutateRowsTs_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
mutateRowsTs_result typedOther = (mutateRowsTs_result)other;
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;
}
}
lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIa()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, typedOther.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("mutateRowsTs_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
}
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 mutateRowsTs_resultStandardSchemeFactory implements SchemeFactory {
public mutateRowsTs_resultStandardScheme getScheme() {
return new mutateRowsTs_resultStandardScheme();
}
}
private static class mutateRowsTs_resultStandardScheme extends StandardScheme<mutateRowsTs_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRowsTs_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 IOError();
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 IllegalArgument();
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, mutateRowsTs_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 mutateRowsTs_resultTupleSchemeFactory implements SchemeFactory {
public mutateRowsTs_resultTupleScheme getScheme() {
return new mutateRowsTs_resultTupleScheme();
}
}
private static class mutateRowsTs_resultTupleScheme extends TupleScheme<mutateRowsTs_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, mutateRowsTs_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, mutateRowsTs_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
if (incoming.get(1)) {
struct.ia = new IllegalArgument();
struct.ia.read(iprot);
struct.setIaIsSet(true);
}
}
}
}
public static class atomicIncrement_args implements org.apache.thrift.TBase<atomicIncrement_args, atomicIncrement_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("atomicIncrement_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.I64, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new atomicIncrement_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new atomicIncrement_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* row to increment
*/
public ByteBuffer row; // required
/**
* name of column
*/
public ByteBuffer column; // required
/**
* amount to increment by
*/
public long value; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* row to increment
*/
ROW((short)2, "row"),
/**
* name of column
*/
COLUMN((short)3, "column"),
/**
* amount to increment by
*/
VALUE((short)4, "value");
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_NAME
return TABLE_NAME;
case 2: // ROW
return ROW;
case 3: // COLUMN
return COLUMN;
case 4: // VALUE
return VALUE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new 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 __VALUE_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
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.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(atomicIncrement_args.class, metaDataMap);
}
public atomicIncrement_args() {
}
public atomicIncrement_args(
ByteBuffer tableName,
ByteBuffer row,
ByteBuffer column,
long value)
{
this();
this.tableName = tableName;
this.row = row;
this.column = column;
this.value = value;
setValueIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public atomicIncrement_args(atomicIncrement_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRow()) {
this.row = other.row;
}
if (other.isSetColumn()) {
this.column = other.column;
}
this.value = other.value;
}
public atomicIncrement_args deepCopy() {
return new atomicIncrement_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.row = null;
this.column = null;
setValueIsSet(false);
this.value = 0;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public atomicIncrement_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public atomicIncrement_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* row to increment
*/
public byte[] getRow() {
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
return row;
}
/**
* row to increment
*/
public atomicIncrement_args setRow(byte[] row) {
setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
return this;
}
public atomicIncrement_args setRow(ByteBuffer row) {
this.row = 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;
}
}
/**
* name of column
*/
public byte[] getColumn() {
setColumn(org.apache.thrift.TBaseHelper.rightSize(column));
return column == null ? null : column.array();
}
public ByteBuffer bufferForColumn() {
return column;
}
/**
* name of column
*/
public atomicIncrement_args setColumn(byte[] column) {
setColumn(column == null ? (ByteBuffer)null : ByteBuffer.wrap(column));
return this;
}
public atomicIncrement_args setColumn(ByteBuffer column) {
this.column = column;
return this;
}
public void unsetColumn() {
this.column = null;
}
/** Returns true if field column is set (has been assigned a value) and false otherwise */
public boolean isSetColumn() {
return this.column != null;
}
public void setColumnIsSet(boolean value) {
if (!value) {
this.column = null;
}
}
/**
* amount to increment by
*/
public long getValue() {
return this.value;
}
/**
* amount to increment by
*/
public atomicIncrement_args setValue(long value) {
this.value = value;
setValueIsSet(true);
return this;
}
public void unsetValue() {
__isset_bit_vector.clear(__VALUE_ISSET_ID);
}
/** Returns true if field value is set (has been assigned a value) and false otherwise */
public boolean isSetValue() {
return __isset_bit_vector.get(__VALUE_ISSET_ID);
}
public void setValueIsSet(boolean value) {
__isset_bit_vector.set(__VALUE_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
}
break;
case COLUMN:
if (value == null) {
unsetColumn();
} else {
setColumn((ByteBuffer)value);
}
break;
case VALUE:
if (value == null) {
unsetValue();
} else {
setValue((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROW:
return getRow();
case COLUMN:
return getColumn();
case VALUE:
return Long.valueOf(getValue());
}
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_NAME:
return isSetTableName();
case ROW:
return isSetRow();
case COLUMN:
return isSetColumn();
case VALUE:
return isSetValue();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof atomicIncrement_args)
return this.equals((atomicIncrement_args)that);
return false;
}
public boolean equals(atomicIncrement_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
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_column = true && this.isSetColumn();
boolean that_present_column = true && that.isSetColumn();
if (this_present_column || that_present_column) {
if (!(this_present_column && that_present_column))
return false;
if (!this.column.equals(that.column))
return false;
}
boolean this_present_value = true;
boolean that_present_value = true;
if (this_present_value || that_present_value) {
if (!(this_present_value && that_present_value))
return false;
if (this.value != that.value)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(atomicIncrement_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
atomicIncrement_args typedOther = (atomicIncrement_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumn()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, typedOther.column);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetValue()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value);
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("atomicIncrement_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("row:");
if (this.row == null) {
sb.append("null");
} else {
sb.append(this.row);
}
first = false;
if (!first) sb.append(", ");
sb.append("column:");
if (this.column == null) {
sb.append("null");
} else {
sb.append(this.column);
}
first = false;
if (!first) sb.append(", ");
sb.append("value:");
sb.append(this.value);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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 atomicIncrement_argsStandardSchemeFactory implements SchemeFactory {
public atomicIncrement_argsStandardScheme getScheme() {
return new atomicIncrement_argsStandardScheme();
}
}
private static class atomicIncrement_argsStandardScheme extends StandardScheme<atomicIncrement_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, atomicIncrement_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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: // COLUMN
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.column = iprot.readBinary();
struct.setColumnIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // VALUE
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.value = iprot.readI64();
struct.setValueIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, atomicIncrement_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.row != null) {
oprot.writeFieldBegin(ROW_FIELD_DESC);
oprot.writeBinary(struct.row);
oprot.writeFieldEnd();
}
if (struct.column != null) {
oprot.writeFieldBegin(COLUMN_FIELD_DESC);
oprot.writeBinary(struct.column);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(VALUE_FIELD_DESC);
oprot.writeI64(struct.value);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class atomicIncrement_argsTupleSchemeFactory implements SchemeFactory {
public atomicIncrement_argsTupleScheme getScheme() {
return new atomicIncrement_argsTupleScheme();
}
}
private static class atomicIncrement_argsTupleScheme extends TupleScheme<atomicIncrement_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, atomicIncrement_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRow()) {
optionals.set(1);
}
if (struct.isSetColumn()) {
optionals.set(2);
}
if (struct.isSetValue()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
if (struct.isSetColumn()) {
oprot.writeBinary(struct.column);
}
if (struct.isSetValue()) {
oprot.writeI64(struct.value);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, atomicIncrement_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
}
if (incoming.get(2)) {
struct.column = iprot.readBinary();
struct.setColumnIsSet(true);
}
if (incoming.get(3)) {
struct.value = iprot.readI64();
struct.setValueIsSet(true);
}
}
}
}
public static class atomicIncrement_result implements org.apache.thrift.TBase<atomicIncrement_result, atomicIncrement_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("atomicIncrement_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
private static final org.apache.thrift.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 atomicIncrement_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new atomicIncrement_resultTupleSchemeFactory());
}
public long success; // required
public IOError io; // required
public IllegalArgument 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"),
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
private static final int __SUCCESS_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
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(atomicIncrement_result.class, metaDataMap);
}
public atomicIncrement_result() {
}
public atomicIncrement_result(
long success,
IOError io,
IllegalArgument ia)
{
this();
this.success = success;
setSuccessIsSet(true);
this.io = io;
this.ia = ia;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public atomicIncrement_result(atomicIncrement_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
if (other.isSetIa()) {
this.ia = new IllegalArgument(other.ia);
}
}
public atomicIncrement_result deepCopy() {
return new atomicIncrement_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = 0;
this.io = null;
this.ia = null;
}
public long getSuccess() {
return this.success;
}
public atomicIncrement_result setSuccess(long success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public IOError getIo() {
return this.io;
}
public atomicIncrement_result setIo(IOError 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 IllegalArgument getIa() {
return this.ia;
}
public atomicIncrement_result setIa(IllegalArgument 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((Long)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((IOError)value);
}
break;
case IA:
if (value == null) {
unsetIa();
} else {
setIa((IllegalArgument)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Long.valueOf(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 atomicIncrement_result)
return this.equals((atomicIncrement_result)that);
return false;
}
public boolean equals(atomicIncrement_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;
}
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() {
return 0;
}
public int compareTo(atomicIncrement_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
atomicIncrement_result typedOther = (atomicIncrement_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;
}
}
lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIa()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, typedOther.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("atomicIncrement_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;
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
}
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_bit_vector = new BitSet(1);
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 atomicIncrement_resultStandardSchemeFactory implements SchemeFactory {
public atomicIncrement_resultStandardScheme getScheme() {
return new atomicIncrement_resultStandardScheme();
}
}
private static class atomicIncrement_resultStandardScheme extends StandardScheme<atomicIncrement_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, atomicIncrement_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.success = iprot.readI64();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // IO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.io = new IOError();
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 IllegalArgument();
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, atomicIncrement_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeI64(struct.success);
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 atomicIncrement_resultTupleSchemeFactory implements SchemeFactory {
public atomicIncrement_resultTupleScheme getScheme() {
return new atomicIncrement_resultTupleScheme();
}
}
private static class atomicIncrement_resultTupleScheme extends TupleScheme<atomicIncrement_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, atomicIncrement_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.writeI64(struct.success);
}
if (struct.isSetIo()) {
struct.io.write(oprot);
}
if (struct.isSetIa()) {
struct.ia.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, atomicIncrement_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readI64();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
if (incoming.get(2)) {
struct.ia = new IllegalArgument();
struct.ia.read(iprot);
struct.setIaIsSet(true);
}
}
}
}
public static class deleteAll_args implements org.apache.thrift.TBase<deleteAll_args, deleteAll_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAll_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteAll_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteAll_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* Row to update
*/
public ByteBuffer row; // required
/**
* name of column whose value is to be deleted
*/
public ByteBuffer column; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* Row to update
*/
ROW((short)2, "row"),
/**
* name of column whose value is to be deleted
*/
COLUMN((short)3, "column");
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_NAME
return TABLE_NAME;
case 2: // ROW
return ROW;
case 3: // COLUMN
return COLUMN;
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteAll_args.class, metaDataMap);
}
public deleteAll_args() {
}
public deleteAll_args(
ByteBuffer tableName,
ByteBuffer row,
ByteBuffer column)
{
this();
this.tableName = tableName;
this.row = row;
this.column = column;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteAll_args(deleteAll_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRow()) {
this.row = other.row;
}
if (other.isSetColumn()) {
this.column = other.column;
}
}
public deleteAll_args deepCopy() {
return new deleteAll_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.row = null;
this.column = null;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public deleteAll_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public deleteAll_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* Row to update
*/
public byte[] getRow() {
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
return row;
}
/**
* Row to update
*/
public deleteAll_args setRow(byte[] row) {
setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
return this;
}
public deleteAll_args setRow(ByteBuffer row) {
this.row = 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;
}
}
/**
* name of column whose value is to be deleted
*/
public byte[] getColumn() {
setColumn(org.apache.thrift.TBaseHelper.rightSize(column));
return column == null ? null : column.array();
}
public ByteBuffer bufferForColumn() {
return column;
}
/**
* name of column whose value is to be deleted
*/
public deleteAll_args setColumn(byte[] column) {
setColumn(column == null ? (ByteBuffer)null : ByteBuffer.wrap(column));
return this;
}
public deleteAll_args setColumn(ByteBuffer column) {
this.column = column;
return this;
}
public void unsetColumn() {
this.column = null;
}
/** Returns true if field column is set (has been assigned a value) and false otherwise */
public boolean isSetColumn() {
return this.column != null;
}
public void setColumnIsSet(boolean value) {
if (!value) {
this.column = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
}
break;
case COLUMN:
if (value == null) {
unsetColumn();
} else {
setColumn((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROW:
return getRow();
case COLUMN:
return getColumn();
}
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_NAME:
return isSetTableName();
case ROW:
return isSetRow();
case COLUMN:
return isSetColumn();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteAll_args)
return this.equals((deleteAll_args)that);
return false;
}
public boolean equals(deleteAll_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
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_column = true && this.isSetColumn();
boolean that_present_column = true && that.isSetColumn();
if (this_present_column || that_present_column) {
if (!(this_present_column && that_present_column))
return false;
if (!this.column.equals(that.column))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(deleteAll_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
deleteAll_args typedOther = (deleteAll_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumn()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, typedOther.column);
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("deleteAll_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("row:");
if (this.row == null) {
sb.append("null");
} else {
sb.append(this.row);
}
first = false;
if (!first) sb.append(", ");
sb.append("column:");
if (this.column == null) {
sb.append("null");
} else {
sb.append(this.column);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 deleteAll_argsStandardSchemeFactory implements SchemeFactory {
public deleteAll_argsStandardScheme getScheme() {
return new deleteAll_argsStandardScheme();
}
}
private static class deleteAll_argsStandardScheme extends StandardScheme<deleteAll_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAll_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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: // COLUMN
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.column = iprot.readBinary();
struct.setColumnIsSet(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, deleteAll_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.row != null) {
oprot.writeFieldBegin(ROW_FIELD_DESC);
oprot.writeBinary(struct.row);
oprot.writeFieldEnd();
}
if (struct.column != null) {
oprot.writeFieldBegin(COLUMN_FIELD_DESC);
oprot.writeBinary(struct.column);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteAll_argsTupleSchemeFactory implements SchemeFactory {
public deleteAll_argsTupleScheme getScheme() {
return new deleteAll_argsTupleScheme();
}
}
private static class deleteAll_argsTupleScheme extends TupleScheme<deleteAll_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteAll_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRow()) {
optionals.set(1);
}
if (struct.isSetColumn()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
if (struct.isSetColumn()) {
oprot.writeBinary(struct.column);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteAll_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
}
if (incoming.get(2)) {
struct.column = iprot.readBinary();
struct.setColumnIsSet(true);
}
}
}
}
public static class deleteAll_result implements org.apache.thrift.TBase<deleteAll_result, deleteAll_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAll_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 deleteAll_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteAll_resultTupleSchemeFactory());
}
public IOError 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(deleteAll_result.class, metaDataMap);
}
public deleteAll_result() {
}
public deleteAll_result(
IOError io)
{
this();
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteAll_result(deleteAll_result other) {
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public deleteAll_result deepCopy() {
return new deleteAll_result(this);
}
@Override
public void clear() {
this.io = null;
}
public IOError getIo() {
return this.io;
}
public deleteAll_result setIo(IOError 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((IOError)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 deleteAll_result)
return this.equals((deleteAll_result)that);
return false;
}
public boolean equals(deleteAll_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() {
return 0;
}
public int compareTo(deleteAll_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
deleteAll_result typedOther = (deleteAll_result)other;
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("deleteAll_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
}
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 deleteAll_resultStandardSchemeFactory implements SchemeFactory {
public deleteAll_resultStandardScheme getScheme() {
return new deleteAll_resultStandardScheme();
}
}
private static class deleteAll_resultStandardScheme extends StandardScheme<deleteAll_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAll_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 IOError();
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, deleteAll_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 deleteAll_resultTupleSchemeFactory implements SchemeFactory {
public deleteAll_resultTupleScheme getScheme() {
return new deleteAll_resultTupleScheme();
}
}
private static class deleteAll_resultTupleScheme extends TupleScheme<deleteAll_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteAll_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, deleteAll_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class deleteAllTs_args implements org.apache.thrift.TBase<deleteAllTs_args, deleteAllTs_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAllTs_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteAllTs_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteAllTs_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* Row to update
*/
public ByteBuffer row; // required
/**
* name of column whose value is to be deleted
*/
public ByteBuffer column; // required
/**
* timestamp
*/
public long timestamp; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* Row to update
*/
ROW((short)2, "row"),
/**
* name of column whose value is to be deleted
*/
COLUMN((short)3, "column"),
/**
* timestamp
*/
TIMESTAMP((short)4, "timestamp");
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_NAME
return TABLE_NAME;
case 2: // ROW
return ROW;
case 3: // COLUMN
return COLUMN;
case 4: // TIMESTAMP
return TIMESTAMP;
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 __TIMESTAMP_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteAllTs_args.class, metaDataMap);
}
public deleteAllTs_args() {
}
public deleteAllTs_args(
ByteBuffer tableName,
ByteBuffer row,
ByteBuffer column,
long timestamp)
{
this();
this.tableName = tableName;
this.row = row;
this.column = column;
this.timestamp = timestamp;
setTimestampIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteAllTs_args(deleteAllTs_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRow()) {
this.row = other.row;
}
if (other.isSetColumn()) {
this.column = other.column;
}
this.timestamp = other.timestamp;
}
public deleteAllTs_args deepCopy() {
return new deleteAllTs_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.row = null;
this.column = null;
setTimestampIsSet(false);
this.timestamp = 0;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public deleteAllTs_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public deleteAllTs_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* Row to update
*/
public byte[] getRow() {
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
return row;
}
/**
* Row to update
*/
public deleteAllTs_args setRow(byte[] row) {
setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
return this;
}
public deleteAllTs_args setRow(ByteBuffer row) {
this.row = 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;
}
}
/**
* name of column whose value is to be deleted
*/
public byte[] getColumn() {
setColumn(org.apache.thrift.TBaseHelper.rightSize(column));
return column == null ? null : column.array();
}
public ByteBuffer bufferForColumn() {
return column;
}
/**
* name of column whose value is to be deleted
*/
public deleteAllTs_args setColumn(byte[] column) {
setColumn(column == null ? (ByteBuffer)null : ByteBuffer.wrap(column));
return this;
}
public deleteAllTs_args setColumn(ByteBuffer column) {
this.column = column;
return this;
}
public void unsetColumn() {
this.column = null;
}
/** Returns true if field column is set (has been assigned a value) and false otherwise */
public boolean isSetColumn() {
return this.column != null;
}
public void setColumnIsSet(boolean value) {
if (!value) {
this.column = null;
}
}
/**
* timestamp
*/
public long getTimestamp() {
return this.timestamp;
}
/**
* timestamp
*/
public deleteAllTs_args setTimestamp(long timestamp) {
this.timestamp = timestamp;
setTimestampIsSet(true);
return this;
}
public void unsetTimestamp() {
__isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
}
break;
case COLUMN:
if (value == null) {
unsetColumn();
} else {
setColumn((ByteBuffer)value);
}
break;
case TIMESTAMP:
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROW:
return getRow();
case COLUMN:
return getColumn();
case TIMESTAMP:
return Long.valueOf(getTimestamp());
}
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_NAME:
return isSetTableName();
case ROW:
return isSetRow();
case COLUMN:
return isSetColumn();
case TIMESTAMP:
return isSetTimestamp();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteAllTs_args)
return this.equals((deleteAllTs_args)that);
return false;
}
public boolean equals(deleteAllTs_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
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_column = true && this.isSetColumn();
boolean that_present_column = true && that.isSetColumn();
if (this_present_column || that_present_column) {
if (!(this_present_column && that_present_column))
return false;
if (!this.column.equals(that.column))
return false;
}
boolean this_present_timestamp = true;
boolean that_present_timestamp = true;
if (this_present_timestamp || that_present_timestamp) {
if (!(this_present_timestamp && that_present_timestamp))
return false;
if (this.timestamp != that.timestamp)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(deleteAllTs_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
deleteAllTs_args typedOther = (deleteAllTs_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumn()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, typedOther.column);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
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("deleteAllTs_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("row:");
if (this.row == null) {
sb.append("null");
} else {
sb.append(this.row);
}
first = false;
if (!first) sb.append(", ");
sb.append("column:");
if (this.column == null) {
sb.append("null");
} else {
sb.append(this.column);
}
first = false;
if (!first) sb.append(", ");
sb.append("timestamp:");
sb.append(this.timestamp);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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 deleteAllTs_argsStandardSchemeFactory implements SchemeFactory {
public deleteAllTs_argsStandardScheme getScheme() {
return new deleteAllTs_argsStandardScheme();
}
}
private static class deleteAllTs_argsStandardScheme extends StandardScheme<deleteAllTs_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllTs_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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: // COLUMN
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.column = iprot.readBinary();
struct.setColumnIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // TIMESTAMP
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(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, deleteAllTs_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.row != null) {
oprot.writeFieldBegin(ROW_FIELD_DESC);
oprot.writeBinary(struct.row);
oprot.writeFieldEnd();
}
if (struct.column != null) {
oprot.writeFieldBegin(COLUMN_FIELD_DESC);
oprot.writeBinary(struct.column);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.timestamp);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteAllTs_argsTupleSchemeFactory implements SchemeFactory {
public deleteAllTs_argsTupleScheme getScheme() {
return new deleteAllTs_argsTupleScheme();
}
}
private static class deleteAllTs_argsTupleScheme extends TupleScheme<deleteAllTs_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRow()) {
optionals.set(1);
}
if (struct.isSetColumn()) {
optionals.set(2);
}
if (struct.isSetTimestamp()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
if (struct.isSetColumn()) {
oprot.writeBinary(struct.column);
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
}
if (incoming.get(2)) {
struct.column = iprot.readBinary();
struct.setColumnIsSet(true);
}
if (incoming.get(3)) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
}
}
}
}
public static class deleteAllTs_result implements org.apache.thrift.TBase<deleteAllTs_result, deleteAllTs_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAllTs_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 deleteAllTs_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteAllTs_resultTupleSchemeFactory());
}
public IOError 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(deleteAllTs_result.class, metaDataMap);
}
public deleteAllTs_result() {
}
public deleteAllTs_result(
IOError io)
{
this();
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteAllTs_result(deleteAllTs_result other) {
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public deleteAllTs_result deepCopy() {
return new deleteAllTs_result(this);
}
@Override
public void clear() {
this.io = null;
}
public IOError getIo() {
return this.io;
}
public deleteAllTs_result setIo(IOError 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((IOError)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 deleteAllTs_result)
return this.equals((deleteAllTs_result)that);
return false;
}
public boolean equals(deleteAllTs_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() {
return 0;
}
public int compareTo(deleteAllTs_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
deleteAllTs_result typedOther = (deleteAllTs_result)other;
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("deleteAllTs_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
}
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 deleteAllTs_resultStandardSchemeFactory implements SchemeFactory {
public deleteAllTs_resultStandardScheme getScheme() {
return new deleteAllTs_resultStandardScheme();
}
}
private static class deleteAllTs_resultStandardScheme extends StandardScheme<deleteAllTs_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllTs_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 IOError();
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, deleteAllTs_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 deleteAllTs_resultTupleSchemeFactory implements SchemeFactory {
public deleteAllTs_resultTupleScheme getScheme() {
return new deleteAllTs_resultTupleScheme();
}
}
private static class deleteAllTs_resultTupleScheme extends TupleScheme<deleteAllTs_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllTs_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, deleteAllTs_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class deleteAllRow_args implements org.apache.thrift.TBase<deleteAllRow_args, deleteAllRow_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAllRow_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteAllRow_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteAllRow_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* key of the row to be completely deleted.
*/
public ByteBuffer row; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* key of the row to be completely deleted.
*/
ROW((short)2, "row");
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_NAME
return TABLE_NAME;
case 2: // ROW
return ROW;
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteAllRow_args.class, metaDataMap);
}
public deleteAllRow_args() {
}
public deleteAllRow_args(
ByteBuffer tableName,
ByteBuffer row)
{
this();
this.tableName = tableName;
this.row = row;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteAllRow_args(deleteAllRow_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRow()) {
this.row = other.row;
}
}
public deleteAllRow_args deepCopy() {
return new deleteAllRow_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.row = null;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public deleteAllRow_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public deleteAllRow_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* key of the row to be completely deleted.
*/
public byte[] getRow() {
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
return row;
}
/**
* key of the row to be completely deleted.
*/
public deleteAllRow_args setRow(byte[] row) {
setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
return this;
}
public deleteAllRow_args setRow(ByteBuffer row) {
this.row = 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 void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROW:
return getRow();
}
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_NAME:
return isSetTableName();
case ROW:
return isSetRow();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteAllRow_args)
return this.equals((deleteAllRow_args)that);
return false;
}
public boolean equals(deleteAllRow_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
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;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(deleteAllRow_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
deleteAllRow_args typedOther = (deleteAllRow_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
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("deleteAllRow_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("row:");
if (this.row == null) {
sb.append("null");
} else {
sb.append(this.row);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 deleteAllRow_argsStandardSchemeFactory implements SchemeFactory {
public deleteAllRow_argsStandardScheme getScheme() {
return new deleteAllRow_argsStandardScheme();
}
}
private static class deleteAllRow_argsStandardScheme extends StandardScheme<deleteAllRow_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllRow_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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;
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, deleteAllRow_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.row != null) {
oprot.writeFieldBegin(ROW_FIELD_DESC);
oprot.writeBinary(struct.row);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteAllRow_argsTupleSchemeFactory implements SchemeFactory {
public deleteAllRow_argsTupleScheme getScheme() {
return new deleteAllRow_argsTupleScheme();
}
}
private static class deleteAllRow_argsTupleScheme extends TupleScheme<deleteAllRow_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllRow_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRow()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllRow_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
}
}
}
}
public static class deleteAllRow_result implements org.apache.thrift.TBase<deleteAllRow_result, deleteAllRow_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAllRow_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 deleteAllRow_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteAllRow_resultTupleSchemeFactory());
}
public IOError 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(deleteAllRow_result.class, metaDataMap);
}
public deleteAllRow_result() {
}
public deleteAllRow_result(
IOError io)
{
this();
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteAllRow_result(deleteAllRow_result other) {
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public deleteAllRow_result deepCopy() {
return new deleteAllRow_result(this);
}
@Override
public void clear() {
this.io = null;
}
public IOError getIo() {
return this.io;
}
public deleteAllRow_result setIo(IOError 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((IOError)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 deleteAllRow_result)
return this.equals((deleteAllRow_result)that);
return false;
}
public boolean equals(deleteAllRow_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() {
return 0;
}
public int compareTo(deleteAllRow_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
deleteAllRow_result typedOther = (deleteAllRow_result)other;
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("deleteAllRow_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
}
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 deleteAllRow_resultStandardSchemeFactory implements SchemeFactory {
public deleteAllRow_resultStandardScheme getScheme() {
return new deleteAllRow_resultStandardScheme();
}
}
private static class deleteAllRow_resultStandardScheme extends StandardScheme<deleteAllRow_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllRow_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 IOError();
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, deleteAllRow_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 deleteAllRow_resultTupleSchemeFactory implements SchemeFactory {
public deleteAllRow_resultTupleScheme getScheme() {
return new deleteAllRow_resultTupleScheme();
}
}
private static class deleteAllRow_resultTupleScheme extends TupleScheme<deleteAllRow_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllRow_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, deleteAllRow_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class deleteAllRowTs_args implements org.apache.thrift.TBase<deleteAllRowTs_args, deleteAllRowTs_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAllRowTs_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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 TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteAllRowTs_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteAllRowTs_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* key of the row to be completely deleted.
*/
public ByteBuffer row; // required
/**
* timestamp
*/
public long timestamp; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* key of the row to be completely deleted.
*/
ROW((short)2, "row"),
/**
* timestamp
*/
TIMESTAMP((short)3, "timestamp");
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_NAME
return TABLE_NAME;
case 2: // ROW
return ROW;
case 3: // TIMESTAMP
return TIMESTAMP;
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 __TIMESTAMP_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteAllRowTs_args.class, metaDataMap);
}
public deleteAllRowTs_args() {
}
public deleteAllRowTs_args(
ByteBuffer tableName,
ByteBuffer row,
long timestamp)
{
this();
this.tableName = tableName;
this.row = row;
this.timestamp = timestamp;
setTimestampIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteAllRowTs_args(deleteAllRowTs_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetRow()) {
this.row = other.row;
}
this.timestamp = other.timestamp;
}
public deleteAllRowTs_args deepCopy() {
return new deleteAllRowTs_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.row = null;
setTimestampIsSet(false);
this.timestamp = 0;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public deleteAllRowTs_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public deleteAllRowTs_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* key of the row to be completely deleted.
*/
public byte[] getRow() {
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
return row;
}
/**
* key of the row to be completely deleted.
*/
public deleteAllRowTs_args setRow(byte[] row) {
setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
return this;
}
public deleteAllRowTs_args setRow(ByteBuffer row) {
this.row = 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;
}
}
/**
* timestamp
*/
public long getTimestamp() {
return this.timestamp;
}
/**
* timestamp
*/
public deleteAllRowTs_args setTimestamp(long timestamp) {
this.timestamp = timestamp;
setTimestampIsSet(true);
return this;
}
public void unsetTimestamp() {
__isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
}
break;
case TIMESTAMP:
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case ROW:
return getRow();
case TIMESTAMP:
return Long.valueOf(getTimestamp());
}
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_NAME:
return isSetTableName();
case ROW:
return isSetRow();
case TIMESTAMP:
return isSetTimestamp();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteAllRowTs_args)
return this.equals((deleteAllRowTs_args)that);
return false;
}
public boolean equals(deleteAllRowTs_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
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_timestamp = true;
boolean that_present_timestamp = true;
if (this_present_timestamp || that_present_timestamp) {
if (!(this_present_timestamp && that_present_timestamp))
return false;
if (this.timestamp != that.timestamp)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(deleteAllRowTs_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
deleteAllRowTs_args typedOther = (deleteAllRowTs_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
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("deleteAllRowTs_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("row:");
if (this.row == null) {
sb.append("null");
} else {
sb.append(this.row);
}
first = false;
if (!first) sb.append(", ");
sb.append("timestamp:");
sb.append(this.timestamp);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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 deleteAllRowTs_argsStandardSchemeFactory implements SchemeFactory {
public deleteAllRowTs_argsStandardScheme getScheme() {
return new deleteAllRowTs_argsStandardScheme();
}
}
private static class deleteAllRowTs_argsStandardScheme extends StandardScheme<deleteAllRowTs_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllRowTs_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(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: // TIMESTAMP
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(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, deleteAllRowTs_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.row != null) {
oprot.writeFieldBegin(ROW_FIELD_DESC);
oprot.writeBinary(struct.row);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.timestamp);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteAllRowTs_argsTupleSchemeFactory implements SchemeFactory {
public deleteAllRowTs_argsTupleScheme getScheme() {
return new deleteAllRowTs_argsTupleScheme();
}
}
private static class deleteAllRowTs_argsTupleScheme extends TupleScheme<deleteAllRowTs_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllRowTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetRow()) {
optionals.set(1);
}
if (struct.isSetTimestamp()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllRowTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
}
if (incoming.get(2)) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
}
}
}
}
public static class deleteAllRowTs_result implements org.apache.thrift.TBase<deleteAllRowTs_result, deleteAllRowTs_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAllRowTs_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 deleteAllRowTs_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteAllRowTs_resultTupleSchemeFactory());
}
public IOError 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(deleteAllRowTs_result.class, metaDataMap);
}
public deleteAllRowTs_result() {
}
public deleteAllRowTs_result(
IOError io)
{
this();
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteAllRowTs_result(deleteAllRowTs_result other) {
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public deleteAllRowTs_result deepCopy() {
return new deleteAllRowTs_result(this);
}
@Override
public void clear() {
this.io = null;
}
public IOError getIo() {
return this.io;
}
public deleteAllRowTs_result setIo(IOError 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((IOError)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 deleteAllRowTs_result)
return this.equals((deleteAllRowTs_result)that);
return false;
}
public boolean equals(deleteAllRowTs_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() {
return 0;
}
public int compareTo(deleteAllRowTs_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
deleteAllRowTs_result typedOther = (deleteAllRowTs_result)other;
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("deleteAllRowTs_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
}
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 deleteAllRowTs_resultStandardSchemeFactory implements SchemeFactory {
public deleteAllRowTs_resultStandardScheme getScheme() {
return new deleteAllRowTs_resultStandardScheme();
}
}
private static class deleteAllRowTs_resultStandardScheme extends StandardScheme<deleteAllRowTs_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllRowTs_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 IOError();
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, deleteAllRowTs_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 deleteAllRowTs_resultTupleSchemeFactory implements SchemeFactory {
public deleteAllRowTs_resultTupleScheme getScheme() {
return new deleteAllRowTs_resultTupleScheme();
}
}
private static class deleteAllRowTs_resultTupleScheme extends TupleScheme<deleteAllRowTs_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllRowTs_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, deleteAllRowTs_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class scannerOpen_args implements org.apache.thrift.TBase<scannerOpen_args, scannerOpen_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpen_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField START_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("startRow", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new scannerOpen_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new scannerOpen_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*/
public ByteBuffer startRow; // required
/**
* columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*/
public List<ByteBuffer> columns; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*/
START_ROW((short)2, "startRow"),
/**
* columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*/
COLUMNS((short)3, "columns");
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_NAME
return TABLE_NAME;
case 2: // START_ROW
return START_ROW;
case 3: // COLUMNS
return COLUMNS;
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.START_ROW, new org.apache.thrift.meta_data.FieldMetaData("startRow", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerOpen_args.class, metaDataMap);
}
public scannerOpen_args() {
}
public scannerOpen_args(
ByteBuffer tableName,
ByteBuffer startRow,
List<ByteBuffer> columns)
{
this();
this.tableName = tableName;
this.startRow = startRow;
this.columns = columns;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scannerOpen_args(scannerOpen_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetStartRow()) {
this.startRow = other.startRow;
}
if (other.isSetColumns()) {
List<ByteBuffer> __this__columns = new ArrayList<ByteBuffer>();
for (ByteBuffer other_element : other.columns) {
__this__columns.add(other_element);
}
this.columns = __this__columns;
}
}
public scannerOpen_args deepCopy() {
return new scannerOpen_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.startRow = null;
this.columns = null;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public scannerOpen_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public scannerOpen_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*/
public byte[] getStartRow() {
setStartRow(org.apache.thrift.TBaseHelper.rightSize(startRow));
return startRow == null ? null : startRow.array();
}
public ByteBuffer bufferForStartRow() {
return startRow;
}
/**
* Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*/
public scannerOpen_args setStartRow(byte[] startRow) {
setStartRow(startRow == null ? (ByteBuffer)null : ByteBuffer.wrap(startRow));
return this;
}
public scannerOpen_args setStartRow(ByteBuffer startRow) {
this.startRow = startRow;
return this;
}
public void unsetStartRow() {
this.startRow = null;
}
/** Returns true if field startRow is set (has been assigned a value) and false otherwise */
public boolean isSetStartRow() {
return this.startRow != null;
}
public void setStartRowIsSet(boolean value) {
if (!value) {
this.startRow = null;
}
}
public int getColumnsSize() {
return (this.columns == null) ? 0 : this.columns.size();
}
public java.util.Iterator<ByteBuffer> getColumnsIterator() {
return (this.columns == null) ? null : this.columns.iterator();
}
public void addToColumns(ByteBuffer elem) {
if (this.columns == null) {
this.columns = new ArrayList<ByteBuffer>();
}
this.columns.add(elem);
}
/**
* columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*/
public List<ByteBuffer> getColumns() {
return this.columns;
}
/**
* columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*/
public scannerOpen_args setColumns(List<ByteBuffer> columns) {
this.columns = columns;
return this;
}
public void unsetColumns() {
this.columns = null;
}
/** Returns true if field columns is set (has been assigned a value) and false otherwise */
public boolean isSetColumns() {
return this.columns != null;
}
public void setColumnsIsSet(boolean value) {
if (!value) {
this.columns = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case START_ROW:
if (value == null) {
unsetStartRow();
} else {
setStartRow((ByteBuffer)value);
}
break;
case COLUMNS:
if (value == null) {
unsetColumns();
} else {
setColumns((List<ByteBuffer>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case START_ROW:
return getStartRow();
case COLUMNS:
return getColumns();
}
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_NAME:
return isSetTableName();
case START_ROW:
return isSetStartRow();
case COLUMNS:
return isSetColumns();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof scannerOpen_args)
return this.equals((scannerOpen_args)that);
return false;
}
public boolean equals(scannerOpen_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_startRow = true && this.isSetStartRow();
boolean that_present_startRow = true && that.isSetStartRow();
if (this_present_startRow || that_present_startRow) {
if (!(this_present_startRow && that_present_startRow))
return false;
if (!this.startRow.equals(that.startRow))
return false;
}
boolean this_present_columns = true && this.isSetColumns();
boolean that_present_columns = true && that.isSetColumns();
if (this_present_columns || that_present_columns) {
if (!(this_present_columns && that_present_columns))
return false;
if (!this.columns.equals(that.columns))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(scannerOpen_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
scannerOpen_args typedOther = (scannerOpen_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(typedOther.isSetStartRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStartRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRow, typedOther.startRow);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumns()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
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("scannerOpen_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("startRow:");
if (this.startRow == null) {
sb.append("null");
} else {
sb.append(this.startRow);
}
first = false;
if (!first) sb.append(", ");
sb.append("columns:");
if (this.columns == null) {
sb.append("null");
} else {
sb.append(this.columns);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 scannerOpen_argsStandardSchemeFactory implements SchemeFactory {
public scannerOpen_argsStandardScheme getScheme() {
return new scannerOpen_argsStandardScheme();
}
}
private static class scannerOpen_argsStandardScheme extends StandardScheme<scannerOpen_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpen_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // START_ROW
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.startRow = iprot.readBinary();
struct.setStartRowIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // COLUMNS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list236 = iprot.readListBegin();
struct.columns = new ArrayList<ByteBuffer>(_list236.size);
for (int _i237 = 0; _i237 < _list236.size; ++_i237)
{
ByteBuffer _elem238; // required
_elem238 = iprot.readBinary();
struct.columns.add(_elem238);
}
iprot.readListEnd();
}
struct.setColumnsIsSet(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, scannerOpen_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.startRow != null) {
oprot.writeFieldBegin(START_ROW_FIELD_DESC);
oprot.writeBinary(struct.startRow);
oprot.writeFieldEnd();
}
if (struct.columns != null) {
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size()));
for (ByteBuffer _iter239 : struct.columns)
{
oprot.writeBinary(_iter239);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class scannerOpen_argsTupleSchemeFactory implements SchemeFactory {
public scannerOpen_argsTupleScheme getScheme() {
return new scannerOpen_argsTupleScheme();
}
}
private static class scannerOpen_argsTupleScheme extends TupleScheme<scannerOpen_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpen_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetStartRow()) {
optionals.set(1);
}
if (struct.isSetColumns()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetStartRow()) {
oprot.writeBinary(struct.startRow);
}
if (struct.isSetColumns()) {
{
oprot.writeI32(struct.columns.size());
for (ByteBuffer _iter240 : struct.columns)
{
oprot.writeBinary(_iter240);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, scannerOpen_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.startRow = iprot.readBinary();
struct.setStartRowIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list241 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.columns = new ArrayList<ByteBuffer>(_list241.size);
for (int _i242 = 0; _i242 < _list241.size; ++_i242)
{
ByteBuffer _elem243; // required
_elem243 = iprot.readBinary();
struct.columns.add(_elem243);
}
}
struct.setColumnsIsSet(true);
}
}
}
}
public static class scannerOpen_result implements org.apache.thrift.TBase<scannerOpen_result, scannerOpen_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpen_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 scannerOpen_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new scannerOpen_resultTupleSchemeFactory());
}
public int success; // required
public IOError 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 BitSet __isset_bit_vector = new BitSet(1);
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 , "ScannerID")));
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(scannerOpen_result.class, metaDataMap);
}
public scannerOpen_result() {
}
public scannerOpen_result(
int success,
IOError io)
{
this();
this.success = success;
setSuccessIsSet(true);
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scannerOpen_result(scannerOpen_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public scannerOpen_result deepCopy() {
return new scannerOpen_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = 0;
this.io = null;
}
public int getSuccess() {
return this.success;
}
public scannerOpen_result setSuccess(int success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public IOError getIo() {
return this.io;
}
public scannerOpen_result setIo(IOError 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((IOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Integer.valueOf(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 scannerOpen_result)
return this.equals((scannerOpen_result)that);
return false;
}
public boolean equals(scannerOpen_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() {
return 0;
}
public int compareTo(scannerOpen_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
scannerOpen_result typedOther = (scannerOpen_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("scannerOpen_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
}
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_bit_vector = new BitSet(1);
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 scannerOpen_resultStandardSchemeFactory implements SchemeFactory {
public scannerOpen_resultStandardScheme getScheme() {
return new scannerOpen_resultStandardScheme();
}
}
private static class scannerOpen_resultStandardScheme extends StandardScheme<scannerOpen_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpen_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 IOError();
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, scannerOpen_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
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 scannerOpen_resultTupleSchemeFactory implements SchemeFactory {
public scannerOpen_resultTupleScheme getScheme() {
return new scannerOpen_resultTupleScheme();
}
}
private static class scannerOpen_resultTupleScheme extends TupleScheme<scannerOpen_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpen_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, scannerOpen_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 IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class scannerOpenWithStop_args implements org.apache.thrift.TBase<scannerOpenWithStop_args, scannerOpenWithStop_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpenWithStop_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField START_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("startRow", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField STOP_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("stopRow", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new scannerOpenWithStop_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new scannerOpenWithStop_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*/
public ByteBuffer startRow; // required
/**
* row to stop scanning on. This row is *not* included in the
* scanner's results
*/
public ByteBuffer stopRow; // required
/**
* columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*/
public List<ByteBuffer> columns; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*/
START_ROW((short)2, "startRow"),
/**
* row to stop scanning on. This row is *not* included in the
* scanner's results
*/
STOP_ROW((short)3, "stopRow"),
/**
* columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*/
COLUMNS((short)4, "columns");
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_NAME
return TABLE_NAME;
case 2: // START_ROW
return START_ROW;
case 3: // STOP_ROW
return STOP_ROW;
case 4: // COLUMNS
return COLUMNS;
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.START_ROW, new org.apache.thrift.meta_data.FieldMetaData("startRow", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.STOP_ROW, new org.apache.thrift.meta_data.FieldMetaData("stopRow", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerOpenWithStop_args.class, metaDataMap);
}
public scannerOpenWithStop_args() {
}
public scannerOpenWithStop_args(
ByteBuffer tableName,
ByteBuffer startRow,
ByteBuffer stopRow,
List<ByteBuffer> columns)
{
this();
this.tableName = tableName;
this.startRow = startRow;
this.stopRow = stopRow;
this.columns = columns;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scannerOpenWithStop_args(scannerOpenWithStop_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetStartRow()) {
this.startRow = other.startRow;
}
if (other.isSetStopRow()) {
this.stopRow = other.stopRow;
}
if (other.isSetColumns()) {
List<ByteBuffer> __this__columns = new ArrayList<ByteBuffer>();
for (ByteBuffer other_element : other.columns) {
__this__columns.add(other_element);
}
this.columns = __this__columns;
}
}
public scannerOpenWithStop_args deepCopy() {
return new scannerOpenWithStop_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.startRow = null;
this.stopRow = null;
this.columns = null;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public scannerOpenWithStop_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public scannerOpenWithStop_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*/
public byte[] getStartRow() {
setStartRow(org.apache.thrift.TBaseHelper.rightSize(startRow));
return startRow == null ? null : startRow.array();
}
public ByteBuffer bufferForStartRow() {
return startRow;
}
/**
* Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*/
public scannerOpenWithStop_args setStartRow(byte[] startRow) {
setStartRow(startRow == null ? (ByteBuffer)null : ByteBuffer.wrap(startRow));
return this;
}
public scannerOpenWithStop_args setStartRow(ByteBuffer startRow) {
this.startRow = startRow;
return this;
}
public void unsetStartRow() {
this.startRow = null;
}
/** Returns true if field startRow is set (has been assigned a value) and false otherwise */
public boolean isSetStartRow() {
return this.startRow != null;
}
public void setStartRowIsSet(boolean value) {
if (!value) {
this.startRow = null;
}
}
/**
* row to stop scanning on. This row is *not* included in the
* scanner's results
*/
public byte[] getStopRow() {
setStopRow(org.apache.thrift.TBaseHelper.rightSize(stopRow));
return stopRow == null ? null : stopRow.array();
}
public ByteBuffer bufferForStopRow() {
return stopRow;
}
/**
* row to stop scanning on. This row is *not* included in the
* scanner's results
*/
public scannerOpenWithStop_args setStopRow(byte[] stopRow) {
setStopRow(stopRow == null ? (ByteBuffer)null : ByteBuffer.wrap(stopRow));
return this;
}
public scannerOpenWithStop_args setStopRow(ByteBuffer stopRow) {
this.stopRow = stopRow;
return this;
}
public void unsetStopRow() {
this.stopRow = null;
}
/** Returns true if field stopRow is set (has been assigned a value) and false otherwise */
public boolean isSetStopRow() {
return this.stopRow != null;
}
public void setStopRowIsSet(boolean value) {
if (!value) {
this.stopRow = null;
}
}
public int getColumnsSize() {
return (this.columns == null) ? 0 : this.columns.size();
}
public java.util.Iterator<ByteBuffer> getColumnsIterator() {
return (this.columns == null) ? null : this.columns.iterator();
}
public void addToColumns(ByteBuffer elem) {
if (this.columns == null) {
this.columns = new ArrayList<ByteBuffer>();
}
this.columns.add(elem);
}
/**
* columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*/
public List<ByteBuffer> getColumns() {
return this.columns;
}
/**
* columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*/
public scannerOpenWithStop_args setColumns(List<ByteBuffer> columns) {
this.columns = columns;
return this;
}
public void unsetColumns() {
this.columns = null;
}
/** Returns true if field columns is set (has been assigned a value) and false otherwise */
public boolean isSetColumns() {
return this.columns != null;
}
public void setColumnsIsSet(boolean value) {
if (!value) {
this.columns = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case START_ROW:
if (value == null) {
unsetStartRow();
} else {
setStartRow((ByteBuffer)value);
}
break;
case STOP_ROW:
if (value == null) {
unsetStopRow();
} else {
setStopRow((ByteBuffer)value);
}
break;
case COLUMNS:
if (value == null) {
unsetColumns();
} else {
setColumns((List<ByteBuffer>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case START_ROW:
return getStartRow();
case STOP_ROW:
return getStopRow();
case COLUMNS:
return getColumns();
}
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_NAME:
return isSetTableName();
case START_ROW:
return isSetStartRow();
case STOP_ROW:
return isSetStopRow();
case COLUMNS:
return isSetColumns();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof scannerOpenWithStop_args)
return this.equals((scannerOpenWithStop_args)that);
return false;
}
public boolean equals(scannerOpenWithStop_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_startRow = true && this.isSetStartRow();
boolean that_present_startRow = true && that.isSetStartRow();
if (this_present_startRow || that_present_startRow) {
if (!(this_present_startRow && that_present_startRow))
return false;
if (!this.startRow.equals(that.startRow))
return false;
}
boolean this_present_stopRow = true && this.isSetStopRow();
boolean that_present_stopRow = true && that.isSetStopRow();
if (this_present_stopRow || that_present_stopRow) {
if (!(this_present_stopRow && that_present_stopRow))
return false;
if (!this.stopRow.equals(that.stopRow))
return false;
}
boolean this_present_columns = true && this.isSetColumns();
boolean that_present_columns = true && that.isSetColumns();
if (this_present_columns || that_present_columns) {
if (!(this_present_columns && that_present_columns))
return false;
if (!this.columns.equals(that.columns))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(scannerOpenWithStop_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
scannerOpenWithStop_args typedOther = (scannerOpenWithStop_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(typedOther.isSetStartRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStartRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRow, typedOther.startRow);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStopRow()).compareTo(typedOther.isSetStopRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStopRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stopRow, typedOther.stopRow);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumns()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
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("scannerOpenWithStop_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("startRow:");
if (this.startRow == null) {
sb.append("null");
} else {
sb.append(this.startRow);
}
first = false;
if (!first) sb.append(", ");
sb.append("stopRow:");
if (this.stopRow == null) {
sb.append("null");
} else {
sb.append(this.stopRow);
}
first = false;
if (!first) sb.append(", ");
sb.append("columns:");
if (this.columns == null) {
sb.append("null");
} else {
sb.append(this.columns);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 scannerOpenWithStop_argsStandardSchemeFactory implements SchemeFactory {
public scannerOpenWithStop_argsStandardScheme getScheme() {
return new scannerOpenWithStop_argsStandardScheme();
}
}
private static class scannerOpenWithStop_argsStandardScheme extends StandardScheme<scannerOpenWithStop_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpenWithStop_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // START_ROW
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.startRow = iprot.readBinary();
struct.setStartRowIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // STOP_ROW
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.stopRow = iprot.readBinary();
struct.setStopRowIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // COLUMNS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list244 = iprot.readListBegin();
struct.columns = new ArrayList<ByteBuffer>(_list244.size);
for (int _i245 = 0; _i245 < _list244.size; ++_i245)
{
ByteBuffer _elem246; // required
_elem246 = iprot.readBinary();
struct.columns.add(_elem246);
}
iprot.readListEnd();
}
struct.setColumnsIsSet(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, scannerOpenWithStop_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.startRow != null) {
oprot.writeFieldBegin(START_ROW_FIELD_DESC);
oprot.writeBinary(struct.startRow);
oprot.writeFieldEnd();
}
if (struct.stopRow != null) {
oprot.writeFieldBegin(STOP_ROW_FIELD_DESC);
oprot.writeBinary(struct.stopRow);
oprot.writeFieldEnd();
}
if (struct.columns != null) {
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size()));
for (ByteBuffer _iter247 : struct.columns)
{
oprot.writeBinary(_iter247);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class scannerOpenWithStop_argsTupleSchemeFactory implements SchemeFactory {
public scannerOpenWithStop_argsTupleScheme getScheme() {
return new scannerOpenWithStop_argsTupleScheme();
}
}
private static class scannerOpenWithStop_argsTupleScheme extends TupleScheme<scannerOpenWithStop_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithStop_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetStartRow()) {
optionals.set(1);
}
if (struct.isSetStopRow()) {
optionals.set(2);
}
if (struct.isSetColumns()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetStartRow()) {
oprot.writeBinary(struct.startRow);
}
if (struct.isSetStopRow()) {
oprot.writeBinary(struct.stopRow);
}
if (struct.isSetColumns()) {
{
oprot.writeI32(struct.columns.size());
for (ByteBuffer _iter248 : struct.columns)
{
oprot.writeBinary(_iter248);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithStop_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.startRow = iprot.readBinary();
struct.setStartRowIsSet(true);
}
if (incoming.get(2)) {
struct.stopRow = iprot.readBinary();
struct.setStopRowIsSet(true);
}
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TList _list249 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.columns = new ArrayList<ByteBuffer>(_list249.size);
for (int _i250 = 0; _i250 < _list249.size; ++_i250)
{
ByteBuffer _elem251; // required
_elem251 = iprot.readBinary();
struct.columns.add(_elem251);
}
}
struct.setColumnsIsSet(true);
}
}
}
}
public static class scannerOpenWithStop_result implements org.apache.thrift.TBase<scannerOpenWithStop_result, scannerOpenWithStop_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpenWithStop_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 scannerOpenWithStop_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new scannerOpenWithStop_resultTupleSchemeFactory());
}
public int success; // required
public IOError 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 BitSet __isset_bit_vector = new BitSet(1);
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 , "ScannerID")));
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(scannerOpenWithStop_result.class, metaDataMap);
}
public scannerOpenWithStop_result() {
}
public scannerOpenWithStop_result(
int success,
IOError io)
{
this();
this.success = success;
setSuccessIsSet(true);
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scannerOpenWithStop_result(scannerOpenWithStop_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public scannerOpenWithStop_result deepCopy() {
return new scannerOpenWithStop_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = 0;
this.io = null;
}
public int getSuccess() {
return this.success;
}
public scannerOpenWithStop_result setSuccess(int success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public IOError getIo() {
return this.io;
}
public scannerOpenWithStop_result setIo(IOError 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((IOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Integer.valueOf(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 scannerOpenWithStop_result)
return this.equals((scannerOpenWithStop_result)that);
return false;
}
public boolean equals(scannerOpenWithStop_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() {
return 0;
}
public int compareTo(scannerOpenWithStop_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
scannerOpenWithStop_result typedOther = (scannerOpenWithStop_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("scannerOpenWithStop_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
}
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_bit_vector = new BitSet(1);
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 scannerOpenWithStop_resultStandardSchemeFactory implements SchemeFactory {
public scannerOpenWithStop_resultStandardScheme getScheme() {
return new scannerOpenWithStop_resultStandardScheme();
}
}
private static class scannerOpenWithStop_resultStandardScheme extends StandardScheme<scannerOpenWithStop_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpenWithStop_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 IOError();
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, scannerOpenWithStop_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
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 scannerOpenWithStop_resultTupleSchemeFactory implements SchemeFactory {
public scannerOpenWithStop_resultTupleScheme getScheme() {
return new scannerOpenWithStop_resultTupleScheme();
}
}
private static class scannerOpenWithStop_resultTupleScheme extends TupleScheme<scannerOpenWithStop_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithStop_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, scannerOpenWithStop_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 IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class scannerOpenWithPrefix_args implements org.apache.thrift.TBase<scannerOpenWithPrefix_args, scannerOpenWithPrefix_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpenWithPrefix_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField START_AND_PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("startAndPrefix", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new scannerOpenWithPrefix_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new scannerOpenWithPrefix_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* the prefix (and thus start row) of the keys you want
*/
public ByteBuffer startAndPrefix; // required
/**
* the columns you want returned
*/
public List<ByteBuffer> columns; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* the prefix (and thus start row) of the keys you want
*/
START_AND_PREFIX((short)2, "startAndPrefix"),
/**
* the columns you want returned
*/
COLUMNS((short)3, "columns");
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_NAME
return TABLE_NAME;
case 2: // START_AND_PREFIX
return START_AND_PREFIX;
case 3: // COLUMNS
return COLUMNS;
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.START_AND_PREFIX, new org.apache.thrift.meta_data.FieldMetaData("startAndPrefix", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerOpenWithPrefix_args.class, metaDataMap);
}
public scannerOpenWithPrefix_args() {
}
public scannerOpenWithPrefix_args(
ByteBuffer tableName,
ByteBuffer startAndPrefix,
List<ByteBuffer> columns)
{
this();
this.tableName = tableName;
this.startAndPrefix = startAndPrefix;
this.columns = columns;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scannerOpenWithPrefix_args(scannerOpenWithPrefix_args other) {
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetStartAndPrefix()) {
this.startAndPrefix = other.startAndPrefix;
}
if (other.isSetColumns()) {
List<ByteBuffer> __this__columns = new ArrayList<ByteBuffer>();
for (ByteBuffer other_element : other.columns) {
__this__columns.add(other_element);
}
this.columns = __this__columns;
}
}
public scannerOpenWithPrefix_args deepCopy() {
return new scannerOpenWithPrefix_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.startAndPrefix = null;
this.columns = null;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public scannerOpenWithPrefix_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public scannerOpenWithPrefix_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* the prefix (and thus start row) of the keys you want
*/
public byte[] getStartAndPrefix() {
setStartAndPrefix(org.apache.thrift.TBaseHelper.rightSize(startAndPrefix));
return startAndPrefix == null ? null : startAndPrefix.array();
}
public ByteBuffer bufferForStartAndPrefix() {
return startAndPrefix;
}
/**
* the prefix (and thus start row) of the keys you want
*/
public scannerOpenWithPrefix_args setStartAndPrefix(byte[] startAndPrefix) {
setStartAndPrefix(startAndPrefix == null ? (ByteBuffer)null : ByteBuffer.wrap(startAndPrefix));
return this;
}
public scannerOpenWithPrefix_args setStartAndPrefix(ByteBuffer startAndPrefix) {
this.startAndPrefix = startAndPrefix;
return this;
}
public void unsetStartAndPrefix() {
this.startAndPrefix = null;
}
/** Returns true if field startAndPrefix is set (has been assigned a value) and false otherwise */
public boolean isSetStartAndPrefix() {
return this.startAndPrefix != null;
}
public void setStartAndPrefixIsSet(boolean value) {
if (!value) {
this.startAndPrefix = null;
}
}
public int getColumnsSize() {
return (this.columns == null) ? 0 : this.columns.size();
}
public java.util.Iterator<ByteBuffer> getColumnsIterator() {
return (this.columns == null) ? null : this.columns.iterator();
}
public void addToColumns(ByteBuffer elem) {
if (this.columns == null) {
this.columns = new ArrayList<ByteBuffer>();
}
this.columns.add(elem);
}
/**
* the columns you want returned
*/
public List<ByteBuffer> getColumns() {
return this.columns;
}
/**
* the columns you want returned
*/
public scannerOpenWithPrefix_args setColumns(List<ByteBuffer> columns) {
this.columns = columns;
return this;
}
public void unsetColumns() {
this.columns = null;
}
/** Returns true if field columns is set (has been assigned a value) and false otherwise */
public boolean isSetColumns() {
return this.columns != null;
}
public void setColumnsIsSet(boolean value) {
if (!value) {
this.columns = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case START_AND_PREFIX:
if (value == null) {
unsetStartAndPrefix();
} else {
setStartAndPrefix((ByteBuffer)value);
}
break;
case COLUMNS:
if (value == null) {
unsetColumns();
} else {
setColumns((List<ByteBuffer>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case START_AND_PREFIX:
return getStartAndPrefix();
case COLUMNS:
return getColumns();
}
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_NAME:
return isSetTableName();
case START_AND_PREFIX:
return isSetStartAndPrefix();
case COLUMNS:
return isSetColumns();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof scannerOpenWithPrefix_args)
return this.equals((scannerOpenWithPrefix_args)that);
return false;
}
public boolean equals(scannerOpenWithPrefix_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_startAndPrefix = true && this.isSetStartAndPrefix();
boolean that_present_startAndPrefix = true && that.isSetStartAndPrefix();
if (this_present_startAndPrefix || that_present_startAndPrefix) {
if (!(this_present_startAndPrefix && that_present_startAndPrefix))
return false;
if (!this.startAndPrefix.equals(that.startAndPrefix))
return false;
}
boolean this_present_columns = true && this.isSetColumns();
boolean that_present_columns = true && that.isSetColumns();
if (this_present_columns || that_present_columns) {
if (!(this_present_columns && that_present_columns))
return false;
if (!this.columns.equals(that.columns))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(scannerOpenWithPrefix_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
scannerOpenWithPrefix_args typedOther = (scannerOpenWithPrefix_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStartAndPrefix()).compareTo(typedOther.isSetStartAndPrefix());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStartAndPrefix()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startAndPrefix, typedOther.startAndPrefix);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumns()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
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("scannerOpenWithPrefix_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("startAndPrefix:");
if (this.startAndPrefix == null) {
sb.append("null");
} else {
sb.append(this.startAndPrefix);
}
first = false;
if (!first) sb.append(", ");
sb.append("columns:");
if (this.columns == null) {
sb.append("null");
} else {
sb.append(this.columns);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 scannerOpenWithPrefix_argsStandardSchemeFactory implements SchemeFactory {
public scannerOpenWithPrefix_argsStandardScheme getScheme() {
return new scannerOpenWithPrefix_argsStandardScheme();
}
}
private static class scannerOpenWithPrefix_argsStandardScheme extends StandardScheme<scannerOpenWithPrefix_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpenWithPrefix_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // START_AND_PREFIX
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.startAndPrefix = iprot.readBinary();
struct.setStartAndPrefixIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // COLUMNS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list252 = iprot.readListBegin();
struct.columns = new ArrayList<ByteBuffer>(_list252.size);
for (int _i253 = 0; _i253 < _list252.size; ++_i253)
{
ByteBuffer _elem254; // required
_elem254 = iprot.readBinary();
struct.columns.add(_elem254);
}
iprot.readListEnd();
}
struct.setColumnsIsSet(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, scannerOpenWithPrefix_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.startAndPrefix != null) {
oprot.writeFieldBegin(START_AND_PREFIX_FIELD_DESC);
oprot.writeBinary(struct.startAndPrefix);
oprot.writeFieldEnd();
}
if (struct.columns != null) {
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size()));
for (ByteBuffer _iter255 : struct.columns)
{
oprot.writeBinary(_iter255);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class scannerOpenWithPrefix_argsTupleSchemeFactory implements SchemeFactory {
public scannerOpenWithPrefix_argsTupleScheme getScheme() {
return new scannerOpenWithPrefix_argsTupleScheme();
}
}
private static class scannerOpenWithPrefix_argsTupleScheme extends TupleScheme<scannerOpenWithPrefix_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithPrefix_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetStartAndPrefix()) {
optionals.set(1);
}
if (struct.isSetColumns()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetStartAndPrefix()) {
oprot.writeBinary(struct.startAndPrefix);
}
if (struct.isSetColumns()) {
{
oprot.writeI32(struct.columns.size());
for (ByteBuffer _iter256 : struct.columns)
{
oprot.writeBinary(_iter256);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithPrefix_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.startAndPrefix = iprot.readBinary();
struct.setStartAndPrefixIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list257 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.columns = new ArrayList<ByteBuffer>(_list257.size);
for (int _i258 = 0; _i258 < _list257.size; ++_i258)
{
ByteBuffer _elem259; // required
_elem259 = iprot.readBinary();
struct.columns.add(_elem259);
}
}
struct.setColumnsIsSet(true);
}
}
}
}
public static class scannerOpenWithPrefix_result implements org.apache.thrift.TBase<scannerOpenWithPrefix_result, scannerOpenWithPrefix_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpenWithPrefix_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 scannerOpenWithPrefix_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new scannerOpenWithPrefix_resultTupleSchemeFactory());
}
public int success; // required
public IOError 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 BitSet __isset_bit_vector = new BitSet(1);
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 , "ScannerID")));
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(scannerOpenWithPrefix_result.class, metaDataMap);
}
public scannerOpenWithPrefix_result() {
}
public scannerOpenWithPrefix_result(
int success,
IOError io)
{
this();
this.success = success;
setSuccessIsSet(true);
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scannerOpenWithPrefix_result(scannerOpenWithPrefix_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public scannerOpenWithPrefix_result deepCopy() {
return new scannerOpenWithPrefix_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = 0;
this.io = null;
}
public int getSuccess() {
return this.success;
}
public scannerOpenWithPrefix_result setSuccess(int success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public IOError getIo() {
return this.io;
}
public scannerOpenWithPrefix_result setIo(IOError 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((IOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Integer.valueOf(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 scannerOpenWithPrefix_result)
return this.equals((scannerOpenWithPrefix_result)that);
return false;
}
public boolean equals(scannerOpenWithPrefix_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() {
return 0;
}
public int compareTo(scannerOpenWithPrefix_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
scannerOpenWithPrefix_result typedOther = (scannerOpenWithPrefix_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("scannerOpenWithPrefix_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
}
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_bit_vector = new BitSet(1);
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 scannerOpenWithPrefix_resultStandardSchemeFactory implements SchemeFactory {
public scannerOpenWithPrefix_resultStandardScheme getScheme() {
return new scannerOpenWithPrefix_resultStandardScheme();
}
}
private static class scannerOpenWithPrefix_resultStandardScheme extends StandardScheme<scannerOpenWithPrefix_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpenWithPrefix_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 IOError();
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, scannerOpenWithPrefix_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
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 scannerOpenWithPrefix_resultTupleSchemeFactory implements SchemeFactory {
public scannerOpenWithPrefix_resultTupleScheme getScheme() {
return new scannerOpenWithPrefix_resultTupleScheme();
}
}
private static class scannerOpenWithPrefix_resultTupleScheme extends TupleScheme<scannerOpenWithPrefix_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithPrefix_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, scannerOpenWithPrefix_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 IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class scannerOpenTs_args implements org.apache.thrift.TBase<scannerOpenTs_args, scannerOpenTs_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpenTs_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField START_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("startRow", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new scannerOpenTs_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new scannerOpenTs_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*/
public ByteBuffer startRow; // required
/**
* columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*/
public List<ByteBuffer> columns; // required
/**
* timestamp
*/
public long timestamp; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*/
START_ROW((short)2, "startRow"),
/**
* columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*/
COLUMNS((short)3, "columns"),
/**
* timestamp
*/
TIMESTAMP((short)4, "timestamp");
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_NAME
return TABLE_NAME;
case 2: // START_ROW
return START_ROW;
case 3: // COLUMNS
return COLUMNS;
case 4: // TIMESTAMP
return TIMESTAMP;
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 __TIMESTAMP_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.START_ROW, new org.apache.thrift.meta_data.FieldMetaData("startRow", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerOpenTs_args.class, metaDataMap);
}
public scannerOpenTs_args() {
}
public scannerOpenTs_args(
ByteBuffer tableName,
ByteBuffer startRow,
List<ByteBuffer> columns,
long timestamp)
{
this();
this.tableName = tableName;
this.startRow = startRow;
this.columns = columns;
this.timestamp = timestamp;
setTimestampIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scannerOpenTs_args(scannerOpenTs_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetStartRow()) {
this.startRow = other.startRow;
}
if (other.isSetColumns()) {
List<ByteBuffer> __this__columns = new ArrayList<ByteBuffer>();
for (ByteBuffer other_element : other.columns) {
__this__columns.add(other_element);
}
this.columns = __this__columns;
}
this.timestamp = other.timestamp;
}
public scannerOpenTs_args deepCopy() {
return new scannerOpenTs_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.startRow = null;
this.columns = null;
setTimestampIsSet(false);
this.timestamp = 0;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public scannerOpenTs_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public scannerOpenTs_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*/
public byte[] getStartRow() {
setStartRow(org.apache.thrift.TBaseHelper.rightSize(startRow));
return startRow == null ? null : startRow.array();
}
public ByteBuffer bufferForStartRow() {
return startRow;
}
/**
* Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*/
public scannerOpenTs_args setStartRow(byte[] startRow) {
setStartRow(startRow == null ? (ByteBuffer)null : ByteBuffer.wrap(startRow));
return this;
}
public scannerOpenTs_args setStartRow(ByteBuffer startRow) {
this.startRow = startRow;
return this;
}
public void unsetStartRow() {
this.startRow = null;
}
/** Returns true if field startRow is set (has been assigned a value) and false otherwise */
public boolean isSetStartRow() {
return this.startRow != null;
}
public void setStartRowIsSet(boolean value) {
if (!value) {
this.startRow = null;
}
}
public int getColumnsSize() {
return (this.columns == null) ? 0 : this.columns.size();
}
public java.util.Iterator<ByteBuffer> getColumnsIterator() {
return (this.columns == null) ? null : this.columns.iterator();
}
public void addToColumns(ByteBuffer elem) {
if (this.columns == null) {
this.columns = new ArrayList<ByteBuffer>();
}
this.columns.add(elem);
}
/**
* columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*/
public List<ByteBuffer> getColumns() {
return this.columns;
}
/**
* columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*/
public scannerOpenTs_args setColumns(List<ByteBuffer> columns) {
this.columns = columns;
return this;
}
public void unsetColumns() {
this.columns = null;
}
/** Returns true if field columns is set (has been assigned a value) and false otherwise */
public boolean isSetColumns() {
return this.columns != null;
}
public void setColumnsIsSet(boolean value) {
if (!value) {
this.columns = null;
}
}
/**
* timestamp
*/
public long getTimestamp() {
return this.timestamp;
}
/**
* timestamp
*/
public scannerOpenTs_args setTimestamp(long timestamp) {
this.timestamp = timestamp;
setTimestampIsSet(true);
return this;
}
public void unsetTimestamp() {
__isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case START_ROW:
if (value == null) {
unsetStartRow();
} else {
setStartRow((ByteBuffer)value);
}
break;
case COLUMNS:
if (value == null) {
unsetColumns();
} else {
setColumns((List<ByteBuffer>)value);
}
break;
case TIMESTAMP:
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case START_ROW:
return getStartRow();
case COLUMNS:
return getColumns();
case TIMESTAMP:
return Long.valueOf(getTimestamp());
}
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_NAME:
return isSetTableName();
case START_ROW:
return isSetStartRow();
case COLUMNS:
return isSetColumns();
case TIMESTAMP:
return isSetTimestamp();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof scannerOpenTs_args)
return this.equals((scannerOpenTs_args)that);
return false;
}
public boolean equals(scannerOpenTs_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_startRow = true && this.isSetStartRow();
boolean that_present_startRow = true && that.isSetStartRow();
if (this_present_startRow || that_present_startRow) {
if (!(this_present_startRow && that_present_startRow))
return false;
if (!this.startRow.equals(that.startRow))
return false;
}
boolean this_present_columns = true && this.isSetColumns();
boolean that_present_columns = true && that.isSetColumns();
if (this_present_columns || that_present_columns) {
if (!(this_present_columns && that_present_columns))
return false;
if (!this.columns.equals(that.columns))
return false;
}
boolean this_present_timestamp = true;
boolean that_present_timestamp = true;
if (this_present_timestamp || that_present_timestamp) {
if (!(this_present_timestamp && that_present_timestamp))
return false;
if (this.timestamp != that.timestamp)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(scannerOpenTs_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
scannerOpenTs_args typedOther = (scannerOpenTs_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(typedOther.isSetStartRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStartRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRow, typedOther.startRow);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumns()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
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("scannerOpenTs_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("startRow:");
if (this.startRow == null) {
sb.append("null");
} else {
sb.append(this.startRow);
}
first = false;
if (!first) sb.append(", ");
sb.append("columns:");
if (this.columns == null) {
sb.append("null");
} else {
sb.append(this.columns);
}
first = false;
if (!first) sb.append(", ");
sb.append("timestamp:");
sb.append(this.timestamp);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 scannerOpenTs_argsStandardSchemeFactory implements SchemeFactory {
public scannerOpenTs_argsStandardScheme getScheme() {
return new scannerOpenTs_argsStandardScheme();
}
}
private static class scannerOpenTs_argsStandardScheme extends StandardScheme<scannerOpenTs_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpenTs_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // START_ROW
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.startRow = iprot.readBinary();
struct.setStartRowIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // COLUMNS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list260 = iprot.readListBegin();
struct.columns = new ArrayList<ByteBuffer>(_list260.size);
for (int _i261 = 0; _i261 < _list260.size; ++_i261)
{
ByteBuffer _elem262; // required
_elem262 = iprot.readBinary();
struct.columns.add(_elem262);
}
iprot.readListEnd();
}
struct.setColumnsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // TIMESTAMP
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(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, scannerOpenTs_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.startRow != null) {
oprot.writeFieldBegin(START_ROW_FIELD_DESC);
oprot.writeBinary(struct.startRow);
oprot.writeFieldEnd();
}
if (struct.columns != null) {
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size()));
for (ByteBuffer _iter263 : struct.columns)
{
oprot.writeBinary(_iter263);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.timestamp);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class scannerOpenTs_argsTupleSchemeFactory implements SchemeFactory {
public scannerOpenTs_argsTupleScheme getScheme() {
return new scannerOpenTs_argsTupleScheme();
}
}
private static class scannerOpenTs_argsTupleScheme extends TupleScheme<scannerOpenTs_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetStartRow()) {
optionals.set(1);
}
if (struct.isSetColumns()) {
optionals.set(2);
}
if (struct.isSetTimestamp()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetStartRow()) {
oprot.writeBinary(struct.startRow);
}
if (struct.isSetColumns()) {
{
oprot.writeI32(struct.columns.size());
for (ByteBuffer _iter264 : struct.columns)
{
oprot.writeBinary(_iter264);
}
}
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, scannerOpenTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.startRow = iprot.readBinary();
struct.setStartRowIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list265 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.columns = new ArrayList<ByteBuffer>(_list265.size);
for (int _i266 = 0; _i266 < _list265.size; ++_i266)
{
ByteBuffer _elem267; // required
_elem267 = iprot.readBinary();
struct.columns.add(_elem267);
}
}
struct.setColumnsIsSet(true);
}
if (incoming.get(3)) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
}
}
}
}
public static class scannerOpenTs_result implements org.apache.thrift.TBase<scannerOpenTs_result, scannerOpenTs_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpenTs_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 scannerOpenTs_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new scannerOpenTs_resultTupleSchemeFactory());
}
public int success; // required
public IOError 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 BitSet __isset_bit_vector = new BitSet(1);
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 , "ScannerID")));
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(scannerOpenTs_result.class, metaDataMap);
}
public scannerOpenTs_result() {
}
public scannerOpenTs_result(
int success,
IOError io)
{
this();
this.success = success;
setSuccessIsSet(true);
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scannerOpenTs_result(scannerOpenTs_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public scannerOpenTs_result deepCopy() {
return new scannerOpenTs_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = 0;
this.io = null;
}
public int getSuccess() {
return this.success;
}
public scannerOpenTs_result setSuccess(int success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public IOError getIo() {
return this.io;
}
public scannerOpenTs_result setIo(IOError 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((IOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Integer.valueOf(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 scannerOpenTs_result)
return this.equals((scannerOpenTs_result)that);
return false;
}
public boolean equals(scannerOpenTs_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() {
return 0;
}
public int compareTo(scannerOpenTs_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
scannerOpenTs_result typedOther = (scannerOpenTs_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("scannerOpenTs_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
}
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_bit_vector = new BitSet(1);
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 scannerOpenTs_resultStandardSchemeFactory implements SchemeFactory {
public scannerOpenTs_resultStandardScheme getScheme() {
return new scannerOpenTs_resultStandardScheme();
}
}
private static class scannerOpenTs_resultStandardScheme extends StandardScheme<scannerOpenTs_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpenTs_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 IOError();
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, scannerOpenTs_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
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 scannerOpenTs_resultTupleSchemeFactory implements SchemeFactory {
public scannerOpenTs_resultTupleScheme getScheme() {
return new scannerOpenTs_resultTupleScheme();
}
}
private static class scannerOpenTs_resultTupleScheme extends TupleScheme<scannerOpenTs_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenTs_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, scannerOpenTs_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 IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class scannerOpenWithStopTs_args implements org.apache.thrift.TBase<scannerOpenWithStopTs_args, scannerOpenWithStopTs_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpenWithStopTs_args");
private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField START_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("startRow", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField STOP_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("stopRow", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)5);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new scannerOpenWithStopTs_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new scannerOpenWithStopTs_argsTupleSchemeFactory());
}
/**
* name of table
*/
public ByteBuffer tableName; // required
/**
* Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*/
public ByteBuffer startRow; // required
/**
* row to stop scanning on. This row is *not* included in the
* scanner's results
*/
public ByteBuffer stopRow; // required
/**
* columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*/
public List<ByteBuffer> columns; // required
/**
* timestamp
*/
public long timestamp; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* name of table
*/
TABLE_NAME((short)1, "tableName"),
/**
* Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*/
START_ROW((short)2, "startRow"),
/**
* row to stop scanning on. This row is *not* included in the
* scanner's results
*/
STOP_ROW((short)3, "stopRow"),
/**
* columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*/
COLUMNS((short)4, "columns"),
/**
* timestamp
*/
TIMESTAMP((short)5, "timestamp");
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_NAME
return TABLE_NAME;
case 2: // START_ROW
return START_ROW;
case 3: // STOP_ROW
return STOP_ROW;
case 4: // COLUMNS
return COLUMNS;
case 5: // TIMESTAMP
return TIMESTAMP;
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 __TIMESTAMP_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.START_ROW, new org.apache.thrift.meta_data.FieldMetaData("startRow", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.STOP_ROW, new org.apache.thrift.meta_data.FieldMetaData("stopRow", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerOpenWithStopTs_args.class, metaDataMap);
}
public scannerOpenWithStopTs_args() {
}
public scannerOpenWithStopTs_args(
ByteBuffer tableName,
ByteBuffer startRow,
ByteBuffer stopRow,
List<ByteBuffer> columns,
long timestamp)
{
this();
this.tableName = tableName;
this.startRow = startRow;
this.stopRow = stopRow;
this.columns = columns;
this.timestamp = timestamp;
setTimestampIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scannerOpenWithStopTs_args(scannerOpenWithStopTs_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetTableName()) {
this.tableName = other.tableName;
}
if (other.isSetStartRow()) {
this.startRow = other.startRow;
}
if (other.isSetStopRow()) {
this.stopRow = other.stopRow;
}
if (other.isSetColumns()) {
List<ByteBuffer> __this__columns = new ArrayList<ByteBuffer>();
for (ByteBuffer other_element : other.columns) {
__this__columns.add(other_element);
}
this.columns = __this__columns;
}
this.timestamp = other.timestamp;
}
public scannerOpenWithStopTs_args deepCopy() {
return new scannerOpenWithStopTs_args(this);
}
@Override
public void clear() {
this.tableName = null;
this.startRow = null;
this.stopRow = null;
this.columns = null;
setTimestampIsSet(false);
this.timestamp = 0;
}
/**
* name of table
*/
public byte[] getTableName() {
setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
return tableName;
}
/**
* name of table
*/
public scannerOpenWithStopTs_args setTableName(byte[] tableName) {
setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
return this;
}
public scannerOpenWithStopTs_args setTableName(ByteBuffer tableName) {
this.tableName = tableName;
return this;
}
public void unsetTableName() {
this.tableName = null;
}
/** Returns true if field tableName is set (has been assigned a value) and false otherwise */
public boolean isSetTableName() {
return this.tableName != null;
}
public void setTableNameIsSet(boolean value) {
if (!value) {
this.tableName = null;
}
}
/**
* Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*/
public byte[] getStartRow() {
setStartRow(org.apache.thrift.TBaseHelper.rightSize(startRow));
return startRow == null ? null : startRow.array();
}
public ByteBuffer bufferForStartRow() {
return startRow;
}
/**
* Starting row in table to scan.
* Send "" (empty string) to start at the first row.
*/
public scannerOpenWithStopTs_args setStartRow(byte[] startRow) {
setStartRow(startRow == null ? (ByteBuffer)null : ByteBuffer.wrap(startRow));
return this;
}
public scannerOpenWithStopTs_args setStartRow(ByteBuffer startRow) {
this.startRow = startRow;
return this;
}
public void unsetStartRow() {
this.startRow = null;
}
/** Returns true if field startRow is set (has been assigned a value) and false otherwise */
public boolean isSetStartRow() {
return this.startRow != null;
}
public void setStartRowIsSet(boolean value) {
if (!value) {
this.startRow = null;
}
}
/**
* row to stop scanning on. This row is *not* included in the
* scanner's results
*/
public byte[] getStopRow() {
setStopRow(org.apache.thrift.TBaseHelper.rightSize(stopRow));
return stopRow == null ? null : stopRow.array();
}
public ByteBuffer bufferForStopRow() {
return stopRow;
}
/**
* row to stop scanning on. This row is *not* included in the
* scanner's results
*/
public scannerOpenWithStopTs_args setStopRow(byte[] stopRow) {
setStopRow(stopRow == null ? (ByteBuffer)null : ByteBuffer.wrap(stopRow));
return this;
}
public scannerOpenWithStopTs_args setStopRow(ByteBuffer stopRow) {
this.stopRow = stopRow;
return this;
}
public void unsetStopRow() {
this.stopRow = null;
}
/** Returns true if field stopRow is set (has been assigned a value) and false otherwise */
public boolean isSetStopRow() {
return this.stopRow != null;
}
public void setStopRowIsSet(boolean value) {
if (!value) {
this.stopRow = null;
}
}
public int getColumnsSize() {
return (this.columns == null) ? 0 : this.columns.size();
}
public java.util.Iterator<ByteBuffer> getColumnsIterator() {
return (this.columns == null) ? null : this.columns.iterator();
}
public void addToColumns(ByteBuffer elem) {
if (this.columns == null) {
this.columns = new ArrayList<ByteBuffer>();
}
this.columns.add(elem);
}
/**
* columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*/
public List<ByteBuffer> getColumns() {
return this.columns;
}
/**
* columns to scan. If column name is a column family, all
* columns of the specified column family are returned. It's also possible
* to pass a regex in the column qualifier.
*/
public scannerOpenWithStopTs_args setColumns(List<ByteBuffer> columns) {
this.columns = columns;
return this;
}
public void unsetColumns() {
this.columns = null;
}
/** Returns true if field columns is set (has been assigned a value) and false otherwise */
public boolean isSetColumns() {
return this.columns != null;
}
public void setColumnsIsSet(boolean value) {
if (!value) {
this.columns = null;
}
}
/**
* timestamp
*/
public long getTimestamp() {
return this.timestamp;
}
/**
* timestamp
*/
public scannerOpenWithStopTs_args setTimestamp(long timestamp) {
this.timestamp = timestamp;
setTimestampIsSet(true);
return this;
}
public void unsetTimestamp() {
__isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
}
break;
case START_ROW:
if (value == null) {
unsetStartRow();
} else {
setStartRow((ByteBuffer)value);
}
break;
case STOP_ROW:
if (value == null) {
unsetStopRow();
} else {
setStopRow((ByteBuffer)value);
}
break;
case COLUMNS:
if (value == null) {
unsetColumns();
} else {
setColumns((List<ByteBuffer>)value);
}
break;
case TIMESTAMP:
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
case START_ROW:
return getStartRow();
case STOP_ROW:
return getStopRow();
case COLUMNS:
return getColumns();
case TIMESTAMP:
return Long.valueOf(getTimestamp());
}
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_NAME:
return isSetTableName();
case START_ROW:
return isSetStartRow();
case STOP_ROW:
return isSetStopRow();
case COLUMNS:
return isSetColumns();
case TIMESTAMP:
return isSetTimestamp();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof scannerOpenWithStopTs_args)
return this.equals((scannerOpenWithStopTs_args)that);
return false;
}
public boolean equals(scannerOpenWithStopTs_args that) {
if (that == null)
return false;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
if (!(this_present_tableName && that_present_tableName))
return false;
if (!this.tableName.equals(that.tableName))
return false;
}
boolean this_present_startRow = true && this.isSetStartRow();
boolean that_present_startRow = true && that.isSetStartRow();
if (this_present_startRow || that_present_startRow) {
if (!(this_present_startRow && that_present_startRow))
return false;
if (!this.startRow.equals(that.startRow))
return false;
}
boolean this_present_stopRow = true && this.isSetStopRow();
boolean that_present_stopRow = true && that.isSetStopRow();
if (this_present_stopRow || that_present_stopRow) {
if (!(this_present_stopRow && that_present_stopRow))
return false;
if (!this.stopRow.equals(that.stopRow))
return false;
}
boolean this_present_columns = true && this.isSetColumns();
boolean that_present_columns = true && that.isSetColumns();
if (this_present_columns || that_present_columns) {
if (!(this_present_columns && that_present_columns))
return false;
if (!this.columns.equals(that.columns))
return false;
}
boolean this_present_timestamp = true;
boolean that_present_timestamp = true;
if (this_present_timestamp || that_present_timestamp) {
if (!(this_present_timestamp && that_present_timestamp))
return false;
if (this.timestamp != that.timestamp)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(scannerOpenWithStopTs_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
scannerOpenWithStopTs_args typedOther = (scannerOpenWithStopTs_args)other;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(typedOther.isSetStartRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStartRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRow, typedOther.startRow);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStopRow()).compareTo(typedOther.isSetStopRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStopRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stopRow, typedOther.stopRow);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumns()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
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("scannerOpenWithStopTs_args(");
boolean first = true;
sb.append("tableName:");
if (this.tableName == null) {
sb.append("null");
} else {
sb.append(this.tableName);
}
first = false;
if (!first) sb.append(", ");
sb.append("startRow:");
if (this.startRow == null) {
sb.append("null");
} else {
sb.append(this.startRow);
}
first = false;
if (!first) sb.append(", ");
sb.append("stopRow:");
if (this.stopRow == null) {
sb.append("null");
} else {
sb.append(this.stopRow);
}
first = false;
if (!first) sb.append(", ");
sb.append("columns:");
if (this.columns == null) {
sb.append("null");
} else {
sb.append(this.columns);
}
first = false;
if (!first) sb.append(", ");
sb.append("timestamp:");
sb.append(this.timestamp);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 scannerOpenWithStopTs_argsStandardSchemeFactory implements SchemeFactory {
public scannerOpenWithStopTs_argsStandardScheme getScheme() {
return new scannerOpenWithStopTs_argsStandardScheme();
}
}
private static class scannerOpenWithStopTs_argsStandardScheme extends StandardScheme<scannerOpenWithStopTs_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpenWithStopTs_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_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // START_ROW
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.startRow = iprot.readBinary();
struct.setStartRowIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // STOP_ROW
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.stopRow = iprot.readBinary();
struct.setStopRowIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // COLUMNS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list268 = iprot.readListBegin();
struct.columns = new ArrayList<ByteBuffer>(_list268.size);
for (int _i269 = 0; _i269 < _list268.size; ++_i269)
{
ByteBuffer _elem270; // required
_elem270 = iprot.readBinary();
struct.columns.add(_elem270);
}
iprot.readListEnd();
}
struct.setColumnsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // TIMESTAMP
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(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, scannerOpenWithStopTs_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.tableName != null) {
oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
oprot.writeBinary(struct.tableName);
oprot.writeFieldEnd();
}
if (struct.startRow != null) {
oprot.writeFieldBegin(START_ROW_FIELD_DESC);
oprot.writeBinary(struct.startRow);
oprot.writeFieldEnd();
}
if (struct.stopRow != null) {
oprot.writeFieldBegin(STOP_ROW_FIELD_DESC);
oprot.writeBinary(struct.stopRow);
oprot.writeFieldEnd();
}
if (struct.columns != null) {
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size()));
for (ByteBuffer _iter271 : struct.columns)
{
oprot.writeBinary(_iter271);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.timestamp);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class scannerOpenWithStopTs_argsTupleSchemeFactory implements SchemeFactory {
public scannerOpenWithStopTs_argsTupleScheme getScheme() {
return new scannerOpenWithStopTs_argsTupleScheme();
}
}
private static class scannerOpenWithStopTs_argsTupleScheme extends TupleScheme<scannerOpenWithStopTs_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithStopTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
if (struct.isSetStartRow()) {
optionals.set(1);
}
if (struct.isSetStopRow()) {
optionals.set(2);
}
if (struct.isSetColumns()) {
optionals.set(3);
}
if (struct.isSetTimestamp()) {
optionals.set(4);
}
oprot.writeBitSet(optionals, 5);
if (struct.isSetTableName()) {
oprot.writeBinary(struct.tableName);
}
if (struct.isSetStartRow()) {
oprot.writeBinary(struct.startRow);
}
if (struct.isSetStopRow()) {
oprot.writeBinary(struct.stopRow);
}
if (struct.isSetColumns()) {
{
oprot.writeI32(struct.columns.size());
for (ByteBuffer _iter272 : struct.columns)
{
oprot.writeBinary(_iter272);
}
}
}
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithStopTs_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
}
if (incoming.get(1)) {
struct.startRow = iprot.readBinary();
struct.setStartRowIsSet(true);
}
if (incoming.get(2)) {
struct.stopRow = iprot.readBinary();
struct.setStopRowIsSet(true);
}
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TList _list273 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.columns = new ArrayList<ByteBuffer>(_list273.size);
for (int _i274 = 0; _i274 < _list273.size; ++_i274)
{
ByteBuffer _elem275; // required
_elem275 = iprot.readBinary();
struct.columns.add(_elem275);
}
}
struct.setColumnsIsSet(true);
}
if (incoming.get(4)) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
}
}
}
}
public static class scannerOpenWithStopTs_result implements org.apache.thrift.TBase<scannerOpenWithStopTs_result, scannerOpenWithStopTs_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpenWithStopTs_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 scannerOpenWithStopTs_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new scannerOpenWithStopTs_resultTupleSchemeFactory());
}
public int success; // required
public IOError 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 BitSet __isset_bit_vector = new BitSet(1);
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 , "ScannerID")));
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(scannerOpenWithStopTs_result.class, metaDataMap);
}
public scannerOpenWithStopTs_result() {
}
public scannerOpenWithStopTs_result(
int success,
IOError io)
{
this();
this.success = success;
setSuccessIsSet(true);
this.io = io;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scannerOpenWithStopTs_result(scannerOpenWithStopTs_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
}
public scannerOpenWithStopTs_result deepCopy() {
return new scannerOpenWithStopTs_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = 0;
this.io = null;
}
public int getSuccess() {
return this.success;
}
public scannerOpenWithStopTs_result setSuccess(int success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public IOError getIo() {
return this.io;
}
public scannerOpenWithStopTs_result setIo(IOError 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((IOError)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Integer.valueOf(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 scannerOpenWithStopTs_result)
return this.equals((scannerOpenWithStopTs_result)that);
return false;
}
public boolean equals(scannerOpenWithStopTs_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() {
return 0;
}
public int compareTo(scannerOpenWithStopTs_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
scannerOpenWithStopTs_result typedOther = (scannerOpenWithStopTs_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("scannerOpenWithStopTs_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
}
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_bit_vector = new BitSet(1);
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 scannerOpenWithStopTs_resultStandardSchemeFactory implements SchemeFactory {
public scannerOpenWithStopTs_resultStandardScheme getScheme() {
return new scannerOpenWithStopTs_resultStandardScheme();
}
}
private static class scannerOpenWithStopTs_resultStandardScheme extends StandardScheme<scannerOpenWithStopTs_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpenWithStopTs_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 IOError();
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, scannerOpenWithStopTs_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
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 scannerOpenWithStopTs_resultTupleSchemeFactory implements SchemeFactory {
public scannerOpenWithStopTs_resultTupleScheme getScheme() {
return new scannerOpenWithStopTs_resultTupleScheme();
}
}
private static class scannerOpenWithStopTs_resultTupleScheme extends TupleScheme<scannerOpenWithStopTs_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithStopTs_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, scannerOpenWithStopTs_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 IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
}
}
}
public static class scannerGet_args implements org.apache.thrift.TBase<scannerGet_args, scannerGet_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerGet_args");
private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", 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 scannerGet_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new scannerGet_argsTupleSchemeFactory());
}
/**
* id of a scanner returned by scannerOpen
*/
public int id; // 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 {
/**
* id of a scanner returned by scannerOpen
*/
ID((short)1, "id");
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: // ID
return 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 __ID_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "ScannerID")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerGet_args.class, metaDataMap);
}
public scannerGet_args() {
}
public scannerGet_args(
int id)
{
this();
this.id = id;
setIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scannerGet_args(scannerGet_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.id = other.id;
}
public scannerGet_args deepCopy() {
return new scannerGet_args(this);
}
@Override
public void clear() {
setIdIsSet(false);
this.id = 0;
}
/**
* id of a scanner returned by scannerOpen
*/
public int getId() {
return this.id;
}
/**
* id of a scanner returned by scannerOpen
*/
public scannerGet_args setId(int id) {
this.id = id;
setIdIsSet(true);
return this;
}
public void unsetId() {
__isset_bit_vector.clear(__ID_ISSET_ID);
}
/** Returns true if field id is set (has been assigned a value) and false otherwise */
public boolean isSetId() {
return __isset_bit_vector.get(__ID_ISSET_ID);
}
public void setIdIsSet(boolean value) {
__isset_bit_vector.set(__ID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ID:
if (value == null) {
unsetId();
} else {
setId((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case ID:
return Integer.valueOf(getId());
}
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 ID:
return isSetId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof scannerGet_args)
return this.equals((scannerGet_args)that);
return false;
}
public boolean equals(scannerGet_args that) {
if (that == null)
return false;
boolean this_present_id = true;
boolean that_present_id = true;
if (this_present_id || that_present_id) {
if (!(this_present_id && that_present_id))
return false;
if (this.id != that.id)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(scannerGet_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
scannerGet_args typedOther = (scannerGet_args)other;
lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
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("scannerGet_args(");
boolean first = true;
sb.append("id:");
sb.append(this.id);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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 scannerGet_argsStandardSchemeFactory implements SchemeFactory {
public scannerGet_argsStandardScheme getScheme() {
return new scannerGet_argsStandardScheme();
}
}
private static class scannerGet_argsStandardScheme extends StandardScheme<scannerGet_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scannerGet_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: // ID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.id = iprot.readI32();
struct.setIdIsSet(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, scannerGet_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(ID_FIELD_DESC);
oprot.writeI32(struct.id);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class scannerGet_argsTupleSchemeFactory implements SchemeFactory {
public scannerGet_argsTupleScheme getScheme() {
return new scannerGet_argsTupleScheme();
}
}
private static class scannerGet_argsTupleScheme extends TupleScheme<scannerGet_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scannerGet_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetId()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetId()) {
oprot.writeI32(struct.id);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, scannerGet_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.id = iprot.readI32();
struct.setIdIsSet(true);
}
}
}
}
public static class scannerGet_result implements org.apache.thrift.TBase<scannerGet_result, scannerGet_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerGet_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 scannerGet_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new scannerGet_resultTupleSchemeFactory());
}
public List<TRowResult> success; // required
public IOError io; // required
public IllegalArgument 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"),
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, TRowResult.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(scannerGet_result.class, metaDataMap);
}
public scannerGet_result() {
}
public scannerGet_result(
List<TRowResult> success,
IOError io,
IllegalArgument ia)
{
this();
this.success = success;
this.io = io;
this.ia = ia;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scannerGet_result(scannerGet_result other) {
if (other.isSetSuccess()) {
List<TRowResult> __this__success = new ArrayList<TRowResult>();
for (TRowResult other_element : other.success) {
__this__success.add(new TRowResult(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
if (other.isSetIa()) {
this.ia = new IllegalArgument(other.ia);
}
}
public scannerGet_result deepCopy() {
return new scannerGet_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<TRowResult> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TRowResult elem) {
if (this.success == null) {
this.success = new ArrayList<TRowResult>();
}
this.success.add(elem);
}
public List<TRowResult> getSuccess() {
return this.success;
}
public scannerGet_result setSuccess(List<TRowResult> 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 IOError getIo() {
return this.io;
}
public scannerGet_result setIo(IOError 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 IllegalArgument getIa() {
return this.ia;
}
public scannerGet_result setIa(IllegalArgument 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<TRowResult>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((IOError)value);
}
break;
case IA:
if (value == null) {
unsetIa();
} else {
setIa((IllegalArgument)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 scannerGet_result)
return this.equals((scannerGet_result)that);
return false;
}
public boolean equals(scannerGet_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() {
return 0;
}
public int compareTo(scannerGet_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
scannerGet_result typedOther = (scannerGet_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;
}
}
lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIa()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, typedOther.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("scannerGet_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
}
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 scannerGet_resultStandardSchemeFactory implements SchemeFactory {
public scannerGet_resultStandardScheme getScheme() {
return new scannerGet_resultStandardScheme();
}
}
private static class scannerGet_resultStandardScheme extends StandardScheme<scannerGet_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scannerGet_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 _list276 = iprot.readListBegin();
struct.success = new ArrayList<TRowResult>(_list276.size);
for (int _i277 = 0; _i277 < _list276.size; ++_i277)
{
TRowResult _elem278; // required
_elem278 = new TRowResult();
_elem278.read(iprot);
struct.success.add(_elem278);
}
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 IOError();
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 IllegalArgument();
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, scannerGet_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 (TRowResult _iter279 : struct.success)
{
_iter279.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 scannerGet_resultTupleSchemeFactory implements SchemeFactory {
public scannerGet_resultTupleScheme getScheme() {
return new scannerGet_resultTupleScheme();
}
}
private static class scannerGet_resultTupleScheme extends TupleScheme<scannerGet_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scannerGet_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 (TRowResult _iter280 : struct.success)
{
_iter280.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, scannerGet_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 _list281 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TRowResult>(_list281.size);
for (int _i282 = 0; _i282 < _list281.size; ++_i282)
{
TRowResult _elem283; // required
_elem283 = new TRowResult();
_elem283.read(iprot);
struct.success.add(_elem283);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
if (incoming.get(2)) {
struct.ia = new IllegalArgument();
struct.ia.read(iprot);
struct.setIaIsSet(true);
}
}
}
}
public static class scannerGetList_args implements org.apache.thrift.TBase<scannerGetList_args, scannerGetList_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerGetList_args");
private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField NB_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("nbRows", 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 scannerGetList_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new scannerGetList_argsTupleSchemeFactory());
}
/**
* id of a scanner returned by scannerOpen
*/
public int id; // required
/**
* number of results to return
*/
public int nbRows; // 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 {
/**
* id of a scanner returned by scannerOpen
*/
ID((short)1, "id"),
/**
* number of results to return
*/
NB_ROWS((short)2, "nbRows");
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: // ID
return ID;
case 2: // NB_ROWS
return NB_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 __ID_ISSET_ID = 0;
private static final int __NBROWS_ISSET_ID = 1;
private BitSet __isset_bit_vector = new BitSet(2);
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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "ScannerID")));
tmpMap.put(_Fields.NB_ROWS, new org.apache.thrift.meta_data.FieldMetaData("nbRows", 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(scannerGetList_args.class, metaDataMap);
}
public scannerGetList_args() {
}
public scannerGetList_args(
int id,
int nbRows)
{
this();
this.id = id;
setIdIsSet(true);
this.nbRows = nbRows;
setNbRowsIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scannerGetList_args(scannerGetList_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.id = other.id;
this.nbRows = other.nbRows;
}
public scannerGetList_args deepCopy() {
return new scannerGetList_args(this);
}
@Override
public void clear() {
setIdIsSet(false);
this.id = 0;
setNbRowsIsSet(false);
this.nbRows = 0;
}
/**
* id of a scanner returned by scannerOpen
*/
public int getId() {
return this.id;
}
/**
* id of a scanner returned by scannerOpen
*/
public scannerGetList_args setId(int id) {
this.id = id;
setIdIsSet(true);
return this;
}
public void unsetId() {
__isset_bit_vector.clear(__ID_ISSET_ID);
}
/** Returns true if field id is set (has been assigned a value) and false otherwise */
public boolean isSetId() {
return __isset_bit_vector.get(__ID_ISSET_ID);
}
public void setIdIsSet(boolean value) {
__isset_bit_vector.set(__ID_ISSET_ID, value);
}
/**
* number of results to return
*/
public int getNbRows() {
return this.nbRows;
}
/**
* number of results to return
*/
public scannerGetList_args setNbRows(int nbRows) {
this.nbRows = nbRows;
setNbRowsIsSet(true);
return this;
}
public void unsetNbRows() {
__isset_bit_vector.clear(__NBROWS_ISSET_ID);
}
/** Returns true if field nbRows is set (has been assigned a value) and false otherwise */
public boolean isSetNbRows() {
return __isset_bit_vector.get(__NBROWS_ISSET_ID);
}
public void setNbRowsIsSet(boolean value) {
__isset_bit_vector.set(__NBROWS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ID:
if (value == null) {
unsetId();
} else {
setId((Integer)value);
}
break;
case NB_ROWS:
if (value == null) {
unsetNbRows();
} else {
setNbRows((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case ID:
return Integer.valueOf(getId());
case NB_ROWS:
return Integer.valueOf(getNbRows());
}
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 ID:
return isSetId();
case NB_ROWS:
return isSetNbRows();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof scannerGetList_args)
return this.equals((scannerGetList_args)that);
return false;
}
public boolean equals(scannerGetList_args that) {
if (that == null)
return false;
boolean this_present_id = true;
boolean that_present_id = true;
if (this_present_id || that_present_id) {
if (!(this_present_id && that_present_id))
return false;
if (this.id != that.id)
return false;
}
boolean this_present_nbRows = true;
boolean that_present_nbRows = true;
if (this_present_nbRows || that_present_nbRows) {
if (!(this_present_nbRows && that_present_nbRows))
return false;
if (this.nbRows != that.nbRows)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(scannerGetList_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
scannerGetList_args typedOther = (scannerGetList_args)other;
lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetNbRows()).compareTo(typedOther.isSetNbRows());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNbRows()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nbRows, typedOther.nbRows);
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("scannerGetList_args(");
boolean first = true;
sb.append("id:");
sb.append(this.id);
first = false;
if (!first) sb.append(", ");
sb.append("nbRows:");
sb.append(this.nbRows);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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 scannerGetList_argsStandardSchemeFactory implements SchemeFactory {
public scannerGetList_argsStandardScheme getScheme() {
return new scannerGetList_argsStandardScheme();
}
}
private static class scannerGetList_argsStandardScheme extends StandardScheme<scannerGetList_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scannerGetList_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: // ID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.id = iprot.readI32();
struct.setIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // NB_ROWS
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.nbRows = iprot.readI32();
struct.setNbRowsIsSet(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, scannerGetList_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(ID_FIELD_DESC);
oprot.writeI32(struct.id);
oprot.writeFieldEnd();
oprot.writeFieldBegin(NB_ROWS_FIELD_DESC);
oprot.writeI32(struct.nbRows);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class scannerGetList_argsTupleSchemeFactory implements SchemeFactory {
public scannerGetList_argsTupleScheme getScheme() {
return new scannerGetList_argsTupleScheme();
}
}
private static class scannerGetList_argsTupleScheme extends TupleScheme<scannerGetList_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scannerGetList_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetId()) {
optionals.set(0);
}
if (struct.isSetNbRows()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetId()) {
oprot.writeI32(struct.id);
}
if (struct.isSetNbRows()) {
oprot.writeI32(struct.nbRows);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, scannerGetList_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.id = iprot.readI32();
struct.setIdIsSet(true);
}
if (incoming.get(1)) {
struct.nbRows = iprot.readI32();
struct.setNbRowsIsSet(true);
}
}
}
}
public static class scannerGetList_result implements org.apache.thrift.TBase<scannerGetList_result, scannerGetList_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerGetList_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 scannerGetList_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new scannerGetList_resultTupleSchemeFactory());
}
public List<TRowResult> success; // required
public IOError io; // required
public IllegalArgument 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"),
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, TRowResult.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(scannerGetList_result.class, metaDataMap);
}
public scannerGetList_result() {
}
public scannerGetList_result(
List<TRowResult> success,
IOError io,
IllegalArgument ia)
{
this();
this.success = success;
this.io = io;
this.ia = ia;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scannerGetList_result(scannerGetList_result other) {
if (other.isSetSuccess()) {
List<TRowResult> __this__success = new ArrayList<TRowResult>();
for (TRowResult other_element : other.success) {
__this__success.add(new TRowResult(other_element));
}
this.success = __this__success;
}
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
if (other.isSetIa()) {
this.ia = new IllegalArgument(other.ia);
}
}
public scannerGetList_result deepCopy() {
return new scannerGetList_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<TRowResult> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(TRowResult elem) {
if (this.success == null) {
this.success = new ArrayList<TRowResult>();
}
this.success.add(elem);
}
public List<TRowResult> getSuccess() {
return this.success;
}
public scannerGetList_result setSuccess(List<TRowResult> 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 IOError getIo() {
return this.io;
}
public scannerGetList_result setIo(IOError 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 IllegalArgument getIa() {
return this.ia;
}
public scannerGetList_result setIa(IllegalArgument 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<TRowResult>)value);
}
break;
case IO:
if (value == null) {
unsetIo();
} else {
setIo((IOError)value);
}
break;
case IA:
if (value == null) {
unsetIa();
} else {
setIa((IllegalArgument)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 scannerGetList_result)
return this.equals((scannerGetList_result)that);
return false;
}
public boolean equals(scannerGetList_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() {
return 0;
}
public int compareTo(scannerGetList_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
scannerGetList_result typedOther = (scannerGetList_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;
}
}
lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIa()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, typedOther.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("scannerGetList_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
}
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 scannerGetList_resultStandardSchemeFactory implements SchemeFactory {
public scannerGetList_resultStandardScheme getScheme() {
return new scannerGetList_resultStandardScheme();
}
}
private static class scannerGetList_resultStandardScheme extends StandardScheme<scannerGetList_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scannerGetList_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 _list284 = iprot.readListBegin();
struct.success = new ArrayList<TRowResult>(_list284.size);
for (int _i285 = 0; _i285 < _list284.size; ++_i285)
{
TRowResult _elem286; // required
_elem286 = new TRowResult();
_elem286.read(iprot);
struct.success.add(_elem286);
}
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 IOError();
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 IllegalArgument();
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, scannerGetList_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 (TRowResult _iter287 : struct.success)
{
_iter287.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 scannerGetList_resultTupleSchemeFactory implements SchemeFactory {
public scannerGetList_resultTupleScheme getScheme() {
return new scannerGetList_resultTupleScheme();
}
}
private static class scannerGetList_resultTupleScheme extends TupleScheme<scannerGetList_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scannerGetList_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 (TRowResult _iter288 : struct.success)
{
_iter288.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, scannerGetList_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 _list289 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<TRowResult>(_list289.size);
for (int _i290 = 0; _i290 < _list289.size; ++_i290)
{
TRowResult _elem291; // required
_elem291 = new TRowResult();
_elem291.read(iprot);
struct.success.add(_elem291);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
if (incoming.get(2)) {
struct.ia = new IllegalArgument();
struct.ia.read(iprot);
struct.setIaIsSet(true);
}
}
}
}
public static class scannerClose_args implements org.apache.thrift.TBase<scannerClose_args, scannerClose_args._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerClose_args");
private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", 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 scannerClose_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new scannerClose_argsTupleSchemeFactory());
}
/**
* id of a scanner returned by scannerOpen
*/
public int id; // 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 {
/**
* id of a scanner returned by scannerOpen
*/
ID((short)1, "id");
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: // ID
return 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 __ID_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "ScannerID")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerClose_args.class, metaDataMap);
}
public scannerClose_args() {
}
public scannerClose_args(
int id)
{
this();
this.id = id;
setIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scannerClose_args(scannerClose_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.id = other.id;
}
public scannerClose_args deepCopy() {
return new scannerClose_args(this);
}
@Override
public void clear() {
setIdIsSet(false);
this.id = 0;
}
/**
* id of a scanner returned by scannerOpen
*/
public int getId() {
return this.id;
}
/**
* id of a scanner returned by scannerOpen
*/
public scannerClose_args setId(int id) {
this.id = id;
setIdIsSet(true);
return this;
}
public void unsetId() {
__isset_bit_vector.clear(__ID_ISSET_ID);
}
/** Returns true if field id is set (has been assigned a value) and false otherwise */
public boolean isSetId() {
return __isset_bit_vector.get(__ID_ISSET_ID);
}
public void setIdIsSet(boolean value) {
__isset_bit_vector.set(__ID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ID:
if (value == null) {
unsetId();
} else {
setId((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case ID:
return Integer.valueOf(getId());
}
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 ID:
return isSetId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof scannerClose_args)
return this.equals((scannerClose_args)that);
return false;
}
public boolean equals(scannerClose_args that) {
if (that == null)
return false;
boolean this_present_id = true;
boolean that_present_id = true;
if (this_present_id || that_present_id) {
if (!(this_present_id && that_present_id))
return false;
if (this.id != that.id)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(scannerClose_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
scannerClose_args typedOther = (scannerClose_args)other;
lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
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("scannerClose_args(");
boolean first = true;
sb.append("id:");
sb.append(this.id);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
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_bit_vector = new BitSet(1);
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 scannerClose_argsStandardSchemeFactory implements SchemeFactory {
public scannerClose_argsStandardScheme getScheme() {
return new scannerClose_argsStandardScheme();
}
}
private static class scannerClose_argsStandardScheme extends StandardScheme<scannerClose_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scannerClose_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: // ID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.id = iprot.readI32();
struct.setIdIsSet(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, scannerClose_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(ID_FIELD_DESC);
oprot.writeI32(struct.id);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class scannerClose_argsTupleSchemeFactory implements SchemeFactory {
public scannerClose_argsTupleScheme getScheme() {
return new scannerClose_argsTupleScheme();
}
}
private static class scannerClose_argsTupleScheme extends TupleScheme<scannerClose_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scannerClose_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetId()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetId()) {
oprot.writeI32(struct.id);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, scannerClose_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.id = iprot.readI32();
struct.setIdIsSet(true);
}
}
}
}
public static class scannerClose_result implements org.apache.thrift.TBase<scannerClose_result, scannerClose_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerClose_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 scannerClose_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new scannerClose_resultTupleSchemeFactory());
}
public IOError io; // required
public IllegalArgument 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"),
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(scannerClose_result.class, metaDataMap);
}
public scannerClose_result() {
}
public scannerClose_result(
IOError io,
IllegalArgument ia)
{
this();
this.io = io;
this.ia = ia;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scannerClose_result(scannerClose_result other) {
if (other.isSetIo()) {
this.io = new IOError(other.io);
}
if (other.isSetIa()) {
this.ia = new IllegalArgument(other.ia);
}
}
public scannerClose_result deepCopy() {
return new scannerClose_result(this);
}
@Override
public void clear() {
this.io = null;
this.ia = null;
}
public IOError getIo() {
return this.io;
}
public scannerClose_result setIo(IOError 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 IllegalArgument getIa() {
return this.ia;
}
public scannerClose_result setIa(IllegalArgument 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((IOError)value);
}
break;
case IA:
if (value == null) {
unsetIa();
} else {
setIa((IllegalArgument)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 scannerClose_result)
return this.equals((scannerClose_result)that);
return false;
}
public boolean equals(scannerClose_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() {
return 0;
}
public int compareTo(scannerClose_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
scannerClose_result typedOther = (scannerClose_result)other;
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;
}
}
lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIa()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, typedOther.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("scannerClose_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
}
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 scannerClose_resultStandardSchemeFactory implements SchemeFactory {
public scannerClose_resultStandardScheme getScheme() {
return new scannerClose_resultStandardScheme();
}
}
private static class scannerClose_resultStandardScheme extends StandardScheme<scannerClose_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scannerClose_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 IOError();
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 IllegalArgument();
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, scannerClose_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 scannerClose_resultTupleSchemeFactory implements SchemeFactory {
public scannerClose_resultTupleScheme getScheme() {
return new scannerClose_resultTupleScheme();
}
}
private static class scannerClose_resultTupleScheme extends TupleScheme<scannerClose_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scannerClose_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, scannerClose_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.io = new IOError();
struct.io.read(iprot);
struct.setIoIsSet(true);
}
if (incoming.get(1)) {
struct.ia = new IllegalArgument();
struct.ia.read(iprot);
struct.setIaIsSet(true);
}
}
}
}
}