public interface

ColumnFamilyQuery

com.netflix.astyanax.query.ColumnFamilyQuery<K, C>
Known Indirect Subclasses

Class Overview

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.

Summary

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

Public Methods

public abstract AllRowsQuery<K, C> getAllRows ()

Query to get an iterator to all rows in the column family

public abstract RowQuery<K, C> getKey (K rowKey)

Query a single key

public abstract 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
count Max number of keys to return

public abstract RowSliceQuery<K, C> getKeySlice (K... keys)

Query a non-contiguous set of keys.

public abstract RowSliceQuery<K, C> getKeySlice (Collection<K> keys)

Query a non-contiguous set of keys.

public abstract RowSliceQuery<K, C> getKeySlice (Iterable<K> keys)

Query a non-contiguous set of keys.

public abstract ColumnFamilyQuery<K, C> pinToHost (Host host)

Run the query on the specified host

public abstract IndexQuery<K, C> searchWithIndex ()

Search for keys matching the provided index clause

public abstract ColumnFamilyQuery<K, C> setConsistencyLevel (ConsistencyLevel consistencyLevel)

Set the consistency level for this operations.

public abstract CqlQuery<K, C> withCql (String cql)

Prepare a CQL Query

public abstract ColumnFamilyQuery<K, C> withRetryPolicy (RetryPolicy retry)

Set the retry policy to use instead of the default