public abstract class

AbstractThriftAllRowsQueryImpl

extends Object
implements AllRowsQuery<K, C>
java.lang.Object
   ↳ com.netflix.astyanax.thrift.AbstractThriftAllRowsQueryImpl<K, C>

Summary

Fields
protected SlicePredicate predicate
Public Constructors
AbstractThriftAllRowsQueryImpl(ColumnFamily<K, C> columnFamily)
Public Methods
int getBlockSize()
boolean getRepeatLastToken()
AllRowsQuery<K, C> setBlockSize(int blockSize)
AllRowsQuery<K, C> setConcurrencyLevel(int numberOfThreads)
Split the query into N threads with each thread processing an equal size chunk from the token range.
AllRowsQuery<K, C> setExceptionCallback(ExceptionCallback cb)
Sets the exception handler to use when handling exceptions inside Iterator.next().
AllRowsQuery<K, C> setRepeatLastToken(boolean repeatLastToken)
If true will repeat the last token in the previous block.
AllRowsQuery<K, C> setRowLimit(int rowLimit)
Maximum number of rows to return for each incremental query to Cassandra.
AllRowsQuery<K, C> setThreadCount(int numberOfThreads)
AllRowsQuery<K, C> withColumnRange(C startColumn, C endColumn, boolean reversed, int count)
Specify a range of columns to return.
AllRowsQuery<K, C> withColumnRange(ByteBufferRange range)
Specify a range of composite columns.
AllRowsQuery<K, C> withColumnRange(ByteBuffer startColumn, ByteBuffer endColumn, boolean reversed, int count)
Specify a range and provide pre-constructed start and end columns.
AllRowsQuery<K, C> withColumnSlice(C... columns)
Specify a non-contiguous set of columns to retrieve.
AllRowsQuery<K, C> withColumnSlice(Collection<C> columns)
Specify a non-contiguous set of columns to retrieve.
AllRowsQuery<K, C> withColumnSlice(ColumnSlice<C> slice)
Use this when your application caches the column slice.
Protected Methods
Integer getConcurrencyLevel()
ExceptionCallback getExceptionCallback()
abstract List<KeySlice> getNextBlock(KeyRange range)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.netflix.astyanax.Execution
From interface com.netflix.astyanax.query.AllRowsQuery

Fields

protected SlicePredicate predicate

Public Constructors

public AbstractThriftAllRowsQueryImpl (ColumnFamily<K, C> columnFamily)

Public Methods

public int getBlockSize ()

public boolean getRepeatLastToken ()

public AllRowsQuery<K, C> setBlockSize (int blockSize)

public AllRowsQuery<K, C> setConcurrencyLevel (int numberOfThreads)

Split the query into N threads with each thread processing an equal size chunk from the token range. Note that the actual number of threads is still limited by the available threads in the thread pool that was set with the AstyanaxConfiguration.

public AllRowsQuery<K, C> setExceptionCallback (ExceptionCallback cb)

Sets the exception handler to use when handling exceptions inside Iterator.next(). This gives the caller a chance to implement a backoff strategy or stop the iteration.

public AllRowsQuery<K, C> setRepeatLastToken (boolean repeatLastToken)

If true will repeat the last token in the previous block.

public AllRowsQuery<K, C> setRowLimit (int rowLimit)

Maximum number of rows to return for each incremental query to Cassandra. This limit also represents the page size when paginating.

public AllRowsQuery<K, C> setThreadCount (int numberOfThreads)

public AllRowsQuery<K, C> withColumnRange (C startColumn, C endColumn, boolean reversed, int count)

Specify a range of columns to return.

Parameters
startColumn First column in the range
endColumn Last column in the range
reversed True if the order should be reversed. Note that for reversed, startColumn should be greater than endColumn.
count Maximum number of columns to return (similar to SQL LIMIT)

public AllRowsQuery<K, C> withColumnRange (ByteBufferRange range)

Specify a range of composite columns. Use this in conjunction with the AnnotatedCompositeSerializer.buildRange().

public AllRowsQuery<K, C> withColumnRange (ByteBuffer startColumn, ByteBuffer endColumn, boolean reversed, int count)

Specify a range and provide pre-constructed start and end columns. Use this with Composite columns

public AllRowsQuery<K, C> withColumnSlice (C... columns)

Specify a non-contiguous set of columns to retrieve.

public AllRowsQuery<K, C> withColumnSlice (Collection<C> columns)

Specify a non-contiguous set of columns to retrieve.

public AllRowsQuery<K, C> withColumnSlice (ColumnSlice<C> slice)

Use this when your application caches the column slice.

Protected Methods

protected Integer getConcurrencyLevel ()

protected ExceptionCallback getExceptionCallback ()

protected abstract List<KeySlice> getNextBlock (KeyRange range)