com.netflix.astyanax.query
Interface ColumnFamilyQuery<K,C>

Type Parameters:
K -
C -

public interface ColumnFamilyQuery<K,C>

Top level column family query lets you choose the type of query being performed at the key level. Single key, key range or a key slice.


Method Summary
 AllRowsQuery<K,C> getAllRows()
          Query to get an iterator to all rows in the column family
 RowQuery<K,C> getKey(K rowKey)
          Query a single key
 RowSliceQuery<K,C> getKeyRange(K startKey, K endKey, java.lang.String startToken, java.lang.String endToken, int count)
          Query a range of keys.
 RowSliceQuery<K,C> getKeySlice(java.util.Collection<K> keys)
          Query a non-contiguous set of keys.
 RowSliceQuery<K,C> getKeySlice(java.lang.Iterable<K> keys)
          Query a non-contiguous set of keys.
 RowSliceQuery<K,C> getKeySlice(K... keys)
          Query a non-contiguous set of keys.
 RowQuery<K,C> getRow(K rowKey)
          Query a single row
 RowSliceQuery<K,C> getRowRange(K startKey, K endKey, java.lang.String startToken, java.lang.String endToken, int count)
          Query a range of rows.
 RowSliceQuery<K,C> getRowSlice(java.util.Collection<K> keys)
          Query a non-contiguous set of rows.
 RowSliceQuery<K,C> getRowSlice(java.lang.Iterable<K> keys)
          Query a non-contiguous set of rows.
 RowSliceQuery<K,C> getRowSlice(K... keys)
          Query a non-contiguous set of rows.
 ColumnFamilyQuery<K,C> pinToHost(com.netflix.astyanax.connectionpool.Host host)
          Run the query on the specified host
 IndexQuery<K,C> searchWithIndex()
          Search for keys matching the provided index clause
 ColumnFamilyQuery<K,C> setConsistencyLevel(ConsistencyLevel consistencyLevel)
          Set the consistency level for this operations.
 CqlQuery<K,C> withCql(java.lang.String cql)
          Execute a CQL statement.
 ColumnFamilyQuery<K,C> withRetryPolicy(com.netflix.astyanax.retry.RetryPolicy retry)
          Set the retry policy to use instead of the default
 

Method Detail

setConsistencyLevel

ColumnFamilyQuery<K,C> setConsistencyLevel(ConsistencyLevel consistencyLevel)
Set the consistency level for this operations.

Parameters:
consistencyLevel -

withRetryPolicy

ColumnFamilyQuery<K,C> withRetryPolicy(com.netflix.astyanax.retry.RetryPolicy retry)
Set the retry policy to use instead of the default

Parameters:
consistencyLevel -

pinToHost

ColumnFamilyQuery<K,C> pinToHost(com.netflix.astyanax.connectionpool.Host host)
Run the query on the specified host

Parameters:
host -

getKey

RowQuery<K,C> getKey(K rowKey)
Query a single key

Parameters:
rowKey -

getRow

RowQuery<K,C> getRow(K rowKey)
Query a single row

Parameters:
rowKey -

getKeyRange

RowSliceQuery<K,C> getKeyRange(K startKey,
                               K endKey,
                               java.lang.String startToken,
                               java.lang.String endToken,
                               int count)
Query a range of keys. startKey and endKey cannot not be used with the RandomPartitioner.

Parameters:
startKey -
endKey -
startToken -
endToken -
count - Max number of keys to return

getRowRange

RowSliceQuery<K,C> getRowRange(K startKey,
                               K endKey,
                               java.lang.String startToken,
                               java.lang.String endToken,
                               int count)
Query a range of rows. startKey and endKey cannot not be used with the RandomPartitioner.

Parameters:
startKey -
endKey -
startToken -
endToken -
count - Max number of keys to return

getKeySlice

RowSliceQuery<K,C> getKeySlice(K... keys)
Query a non-contiguous set of keys.

Parameters:
keys -

getRowSlice

RowSliceQuery<K,C> getRowSlice(K... keys)
Query a non-contiguous set of rows.

Parameters:
keys -

getKeySlice

RowSliceQuery<K,C> getKeySlice(java.util.Collection<K> keys)
Query a non-contiguous set of keys.

Parameters:
keys -

getRowSlice

RowSliceQuery<K,C> getRowSlice(java.util.Collection<K> keys)
Query a non-contiguous set of rows.

Parameters:
keys -

getKeySlice

RowSliceQuery<K,C> getKeySlice(java.lang.Iterable<K> keys)
Query a non-contiguous set of keys.

Parameters:
keys -

getRowSlice

RowSliceQuery<K,C> getRowSlice(java.lang.Iterable<K> keys)
Query a non-contiguous set of rows.

Parameters:
keys -

getAllRows

AllRowsQuery<K,C> getAllRows()
Query to get an iterator to all rows in the column family


withCql

CqlQuery<K,C> withCql(java.lang.String cql)
Execute a CQL statement. Call this for creating a prepared CQL statements. withCql("...").prepareStatement().execute()

Parameters:
cql -

searchWithIndex

IndexQuery<K,C> searchWithIndex()
Search for keys matching the provided index clause

Parameters:
indexClause -