public static class AllRowsReader.Builder<K,C>
extends java.lang.Object
| Constructor and Description |
|---|
AllRowsReader.Builder(com.netflix.astyanax.Keyspace ks,
com.netflix.astyanax.model.ColumnFamily<K,C> columnFamily) |
| Modifier and Type | Method and Description |
|---|---|
AllRowsReader<K,C> |
build() |
AllRowsReader.Builder<K,C> |
forEachPage(com.google.common.base.Function<com.netflix.astyanax.model.Rows<K,C>,java.lang.Boolean> rowsFunction) |
AllRowsReader.Builder<K,C> |
forEachRow(com.google.common.base.Function<com.netflix.astyanax.model.Row<K,C>,java.lang.Boolean> rowFunction)
Specify the callback function for each row being read.
|
AllRowsReader.Builder<K,C> |
withCheckpointManager(com.netflix.astyanax.query.CheckpointManager checkpointManager)
Use this checkpoint manager to keep track of progress as all rows are being iterated
|
AllRowsReader.Builder<K,C> |
withColumnRange(C startColumn,
C endColumn,
boolean reversed,
int count)
Specify a range of columns to return.
|
AllRowsReader.Builder<K,C> |
withColumnSlice(C... columns)
Specify a non-contiguous set of columns to retrieve.
|
AllRowsReader.Builder<K,C> |
withColumnSlice(java.util.Collection<C> columns)
Specify a non-contiguous set of columns to retrieve.
|
AllRowsReader.Builder<K,C> |
withColumnSlice(com.netflix.astyanax.model.ColumnSlice<C> columns)
Use this when your application caches the column slice.
|
AllRowsReader.Builder<K,C> |
withConcurrencyLevel(int concurrencyLevel)
Split the query into N threads with each thread processing an equal size chunk from the token range.
|
AllRowsReader.Builder<K,C> |
withConsistencyLevel(com.netflix.astyanax.model.ConsistencyLevel consistencyLevel) |
AllRowsReader.Builder<K,C> |
withDc(java.lang.String dc)
Specify dc to use when auto determining the token ranges to ensure that only ranges
in the current dc are used.
|
AllRowsReader.Builder<K,C> |
withExecutor(java.util.concurrent.ExecutorService executor)
Use the specific executor for executing the tasks.
|
AllRowsReader.Builder<K,C> |
withIncludeEmptyRows(java.lang.Boolean flag)
The default behavior is to exclude empty rows, other than when specifically asking
for no columns back.
|
AllRowsReader.Builder<K,C> |
withPageSize(int pageSize)
Maximum number of rows to return for each incremental query to Cassandra.
|
AllRowsReader.Builder<K,C> |
withPartitioner(com.netflix.astyanax.partitioner.Partitioner partitioner)
Partitioner used to determine token ranges and how to break token ranges
into sub parts.
|
AllRowsReader.Builder<K,C> |
withRack(java.lang.String rack)
Specify rack to use when auto determining the token ranges to ensure that only ranges
in the current rack are used.
|
AllRowsReader.Builder<K,C> |
withRepeatLastToken(boolean repeatLastToken)
If true will repeat the last token in the previous block when calling cassandra.
|
AllRowsReader.Builder<K,C> |
withRetryPolicy(com.netflix.astyanax.retry.RetryPolicy policy) |
AllRowsReader.Builder<K,C> |
withTokenRange(java.math.BigInteger startToken,
java.math.BigInteger endToken)
Execute the operation on a specific token range, instead of the entire range.
|
AllRowsReader.Builder<K,C> |
withTokenRange(java.lang.String startToken,
java.lang.String endToken) |
public AllRowsReader.Builder<K,C> withPageSize(int pageSize)
blockSize - public AllRowsReader.Builder<K,C> withCheckpointManager(com.netflix.astyanax.query.CheckpointManager checkpointManager)
manager - public AllRowsReader.Builder<K,C> withRepeatLastToken(boolean repeatLastToken)
repeatLastToken - public AllRowsReader.Builder<K,C> withColumnSlice(C... columns)
columns - public AllRowsReader.Builder<K,C> withColumnSlice(java.util.Collection<C> columns)
columns - public AllRowsReader.Builder<K,C> withColumnSlice(com.netflix.astyanax.model.ColumnSlice<C> columns)
slice - public AllRowsReader.Builder<K,C> withColumnRange(C startColumn, C endColumn, boolean reversed, int count)
startColumn - First column in the rangeendColumn - Last column in the rangereversed - 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 AllRowsReader.Builder<K,C> withConcurrencyLevel(int concurrencyLevel)
numberOfThreads - public AllRowsReader.Builder<K,C> withExecutor(java.util.concurrent.ExecutorService executor)
executor - public AllRowsReader.Builder<K,C> withTokenRange(java.math.BigInteger startToken, java.math.BigInteger endToken)
startToken - endToken - public AllRowsReader.Builder<K,C> withTokenRange(java.lang.String startToken, java.lang.String endToken)
public AllRowsReader.Builder<K,C> withPartitioner(com.netflix.astyanax.partitioner.Partitioner partitioner)
partitioner - public AllRowsReader.Builder<K,C> withIncludeEmptyRows(java.lang.Boolean flag)
flag - public AllRowsReader.Builder<K,C> forEachRow(com.google.common.base.Function<com.netflix.astyanax.model.Row<K,C>,java.lang.Boolean> rowFunction)
rowFunction - public AllRowsReader.Builder<K,C> forEachPage(com.google.common.base.Function<com.netflix.astyanax.model.Rows<K,C>,java.lang.Boolean> rowsFunction)
public AllRowsReader.Builder<K,C> withConsistencyLevel(com.netflix.astyanax.model.ConsistencyLevel consistencyLevel)
public AllRowsReader.Builder<K,C> withDc(java.lang.String dc)
rack - public AllRowsReader.Builder<K,C> withRack(java.lang.String rack)
rack - public AllRowsReader.Builder<K,C> withRetryPolicy(com.netflix.astyanax.retry.RetryPolicy policy)
public AllRowsReader<K,C> build()