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

Type Parameters:
K -
C -
All Known Implementing Classes:
ThriftColumnFamilyQueryImpl

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.

Author:
elandau

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, String startToken, String endToken, int count)
          Query a range of keys.
 RowSliceQuery<K,C> getKeySlice(Collection<K> keys)
          Query a non-contiguous set of keys.
 RowSliceQuery<K,C> getKeySlice(K... keys)
          Query a non-contiguous set of keys.
 ColumnFamilyQuery<K,C> pinToHost(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(String cql)
          Prepare a CQL Query
 ColumnFamilyQuery<K,C> withRetryPolicy(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 -
Returns:

withRetryPolicy

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

Parameters:
consistencyLevel -
Returns:

pinToHost

ColumnFamilyQuery<K,C> pinToHost(Host host)
Run the query on the specified host

Parameters:
host -
Returns:

getKey

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

Parameters:
rowKey -
Returns:

getKeyRange

RowSliceQuery<K,C> getKeyRange(K startKey,
                               K endKey,
                               String startToken,
                               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
Returns:

getKeySlice

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

Parameters:
keys -
Returns:

getKeySlice

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

Parameters:
keys -
Returns:

getAllRows

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

Returns:

withCql

CqlQuery<K,C> withCql(String cql)
Prepare a CQL Query

Parameters:
cql -
Returns:

searchWithIndex

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

Parameters:
indexClause -
Returns:


Copyright © 2012. All Rights Reserved.