me.prettyprint.cassandra.service
Class KeyspaceServiceImpl

java.lang.Object
  extended by me.prettyprint.cassandra.service.KeyspaceServiceImpl
All Implemented Interfaces:
KeyspaceService
Direct Known Subclasses:
VirtualKeyspaceServiceImpl

public class KeyspaceServiceImpl
extends Object
implements KeyspaceService

Implementation of a Keyspace

Author:
Ran Tavory (rantav@gmail.com)

Field Summary
 
Fields inherited from interface me.prettyprint.cassandra.service.KeyspaceService
CF_TYPE, CF_TYPE_STANDARD, CF_TYPE_SUPER
 
Constructor Summary
KeyspaceServiceImpl(String keyspaceName, ConsistencyLevelPolicy consistencyLevel, HConnectionManager connectionManager, FailoverPolicy failoverPolicy)
           
KeyspaceServiceImpl(String keyspaceName, ConsistencyLevelPolicy consistencyLevel, HConnectionManager connectionManager, FailoverPolicy failoverPolicy, Map<String,String> credentials)
           
 
Method Summary
 void addCounter(ByteBuffer key, org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.CounterColumn counterColumn)
          Add a counter with CL.ONE
 void addCounter(String key, org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.CounterColumn counterColumn)
          Add a counter with CL.ONE
 void batchMutate(BatchMutation batchMutate)
          Call batch mutate with the BatchMutation object which encapsulates some of the complexity of the batch_mutate API signature
 void batchMutate(Map<ByteBuffer,Map<String,List<org.apache.cassandra.thrift.Mutation>>> mutationMap)
          Call batch mutate with the assembled mutationMap.
 CassandraHost getCassandraHost()
           
 org.apache.cassandra.thrift.Column getColumn(ByteBuffer key, org.apache.cassandra.thrift.ColumnPath columnPath)
          Get the Column at the given columnPath.
 org.apache.cassandra.thrift.Column getColumn(String key, org.apache.cassandra.thrift.ColumnPath columnPath)
           
 HConsistencyLevel getConsistencyLevel(OperationType operationType)
           
 int getCount(ByteBuffer key, org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.SlicePredicate predicate)
          Counts the columns present in columnParent.
 org.apache.cassandra.thrift.CounterColumn getCounter(ByteBuffer key, org.apache.cassandra.thrift.ColumnPath columnPath)
          Get the Counter at the given columnPath.
 org.apache.cassandra.thrift.CounterColumn getCounter(String key, org.apache.cassandra.thrift.ColumnPath columnPath)
           
 List<org.apache.cassandra.thrift.CounterColumn> getCounterSlice(ByteBuffer key, org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.SlicePredicate predicate)
          Get the group of counter columns contained by columnParent.
 List<org.apache.cassandra.thrift.CounterColumn> getCounterSlice(String key, org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.SlicePredicate predicate)
           
 List<org.apache.cassandra.thrift.CounterSuperColumn> getCounterSuperSlice(ByteBuffer key, org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.SlicePredicate predicate)
          Get the group of superColumn contained by columnParent.
 List<org.apache.cassandra.thrift.CounterSuperColumn> getCounterSuperSlice(String key, org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.SlicePredicate predicate)
           
 Map<ByteBuffer,List<org.apache.cassandra.thrift.Column>> getIndexedSlices(org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.IndexClause indexClause, org.apache.cassandra.thrift.SlicePredicate predicate)
          returns a subset of columns for a range of keys.
 String getName()
           
 Map<ByteBuffer,List<org.apache.cassandra.thrift.CounterColumn>> getRangeCounterSlices(org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.SlicePredicate predicate, org.apache.cassandra.thrift.KeyRange keyRange)
          returns a subset of counter columns for a range of keys
 Map<ByteBuffer,List<org.apache.cassandra.thrift.Column>> getRangeSlices(org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.SlicePredicate predicate, org.apache.cassandra.thrift.KeyRange keyRange)
          returns a subset of columns for a range of keys.
 List<org.apache.cassandra.thrift.Column> getSlice(ByteBuffer key, org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.SlicePredicate predicate)
          Get the group of columns contained by columnParent.
 List<org.apache.cassandra.thrift.Column> getSlice(String key, org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.SlicePredicate predicate)
           
 org.apache.cassandra.thrift.SuperColumn getSuperColumn(ByteBuffer key, org.apache.cassandra.thrift.ColumnPath columnPath)
          Get the SuperColumn at the given columnPath.
 org.apache.cassandra.thrift.SuperColumn getSuperColumn(ByteBuffer key, org.apache.cassandra.thrift.ColumnPath columnPath, boolean reversed, int size)
          Get the SuperColumn at the given columnPath.
 org.apache.cassandra.thrift.SuperColumn getSuperColumn(String key, org.apache.cassandra.thrift.ColumnPath columnPath)
           
 Map<ByteBuffer,List<org.apache.cassandra.thrift.CounterSuperColumn>> getSuperRangeCounterSlices(org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.SlicePredicate predicate, org.apache.cassandra.thrift.KeyRange keyRange)
          returns a subset of counter super columns for a range of keys
 Map<ByteBuffer,List<org.apache.cassandra.thrift.SuperColumn>> getSuperRangeSlices(org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.SlicePredicate predicate, org.apache.cassandra.thrift.KeyRange keyRange)
          returns a subset of super columns for a range of keys.
 List<org.apache.cassandra.thrift.SuperColumn> getSuperSlice(ByteBuffer key, org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.SlicePredicate predicate)
          Get the group of superColumn contained by columnParent.
 List<org.apache.cassandra.thrift.SuperColumn> getSuperSlice(String key, org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.SlicePredicate predicate)
           
 void insert(ByteBuffer key, org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.Column column)
          Inserts a column.
 void insert(String key, org.apache.cassandra.thrift.ColumnPath columnPath, ByteBuffer value)
           
 void insert(String key, org.apache.cassandra.thrift.ColumnPath columnPath, ByteBuffer value, long timestamp)
           
 Map<ByteBuffer,Integer> multigetCount(List<ByteBuffer> keys, org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.SlicePredicate slicePredicate)
          Returns a map of key to column count
 Map<ByteBuffer,List<org.apache.cassandra.thrift.CounterColumn>> multigetCounterSlice(List<ByteBuffer> keys, org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.SlicePredicate predicate)
          Performs a get_slice for columnParent and predicate for the given keys in parallel.
 Map<ByteBuffer,List<org.apache.cassandra.thrift.CounterSuperColumn>> multigetCounterSuperSlice(List<ByteBuffer> keys, org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.SlicePredicate predicate)
          Performs a get_slice for a superColumn columnParent and predicate for the given keys in parallel.
 Map<ByteBuffer,List<org.apache.cassandra.thrift.Column>> multigetSlice(List<ByteBuffer> keys, org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.SlicePredicate predicate)
          Performs a get_slice for columnParent and predicate for the given keys in parallel.
 Map<ByteBuffer,org.apache.cassandra.thrift.SuperColumn> multigetSuperColumn(List<ByteBuffer> keys, org.apache.cassandra.thrift.ColumnPath columnPath)
          Performs a get for columnPath in parallel on the given list of keys.
 Map<ByteBuffer,org.apache.cassandra.thrift.SuperColumn> multigetSuperColumn(List<ByteBuffer> keys, org.apache.cassandra.thrift.ColumnPath columnPath, boolean reversed, int size)
          Perform a get for columnPath in parallel on the given list of keys.
 Map<ByteBuffer,List<org.apache.cassandra.thrift.SuperColumn>> multigetSuperSlice(List<ByteBuffer> keys, org.apache.cassandra.thrift.ColumnParent columnParent, org.apache.cassandra.thrift.SlicePredicate predicate)
          Performs a get_slice for a superColumn columnParent and predicate for the given keys in parallel.
 void remove(ByteBuffer key, org.apache.cassandra.thrift.ColumnPath columnPath)
           
 void remove(ByteBuffer key, org.apache.cassandra.thrift.ColumnPath columnPath, long timestamp)
          Same as two argument version, but the caller must specify their own clock
 void remove(String key, org.apache.cassandra.thrift.ColumnPath columnPath)
           
 void remove(String key, org.apache.cassandra.thrift.ColumnPath columnPath, long timestamp)
          Same as two argument version, but the caller must specify their own timestamp
 void removeCounter(ByteBuffer key, org.apache.cassandra.thrift.ColumnPath columnPath)
           
 void removeCounter(String key, org.apache.cassandra.thrift.ColumnPath columnPath)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeyspaceServiceImpl

public KeyspaceServiceImpl(String keyspaceName,
                           ConsistencyLevelPolicy consistencyLevel,
                           HConnectionManager connectionManager,
                           FailoverPolicy failoverPolicy)
                    throws HectorTransportException
Throws:
HectorTransportException

KeyspaceServiceImpl

public KeyspaceServiceImpl(String keyspaceName,
                           ConsistencyLevelPolicy consistencyLevel,
                           HConnectionManager connectionManager,
                           FailoverPolicy failoverPolicy,
                           Map<String,String> credentials)
                    throws HectorTransportException
Throws:
HectorTransportException
Method Detail

batchMutate

public void batchMutate(Map<ByteBuffer,Map<String,List<org.apache.cassandra.thrift.Mutation>>> mutationMap)
                 throws HectorException
Description copied from interface: KeyspaceService
Call batch mutate with the assembled mutationMap. This method is a direct pass-through to the underlying Thrift API

Specified by:
batchMutate in interface KeyspaceService
Throws:
HectorException

batchMutate

public void batchMutate(BatchMutation batchMutate)
                 throws HectorException
Description copied from interface: KeyspaceService
Call batch mutate with the BatchMutation object which encapsulates some of the complexity of the batch_mutate API signature

Specified by:
batchMutate in interface KeyspaceService
Throws:
HectorException

getCount

public int getCount(ByteBuffer key,
                    org.apache.cassandra.thrift.ColumnParent columnParent,
                    org.apache.cassandra.thrift.SlicePredicate predicate)
             throws HectorException
Description copied from interface: KeyspaceService
Counts the columns present in columnParent.

Specified by:
getCount in interface KeyspaceService
Throws:
HectorException

getCassandraHost

public CassandraHost getCassandraHost()
Specified by:
getCassandraHost in interface KeyspaceService

getRangeSlices

public Map<ByteBuffer,List<org.apache.cassandra.thrift.Column>> getRangeSlices(org.apache.cassandra.thrift.ColumnParent columnParent,
                                                                               org.apache.cassandra.thrift.SlicePredicate predicate,
                                                                               org.apache.cassandra.thrift.KeyRange keyRange)
                                                                        throws HectorException
Description copied from interface: KeyspaceService
returns a subset of columns for a range of keys.

Specified by:
getRangeSlices in interface KeyspaceService
Throws:
HectorException

getRangeCounterSlices

public Map<ByteBuffer,List<org.apache.cassandra.thrift.CounterColumn>> getRangeCounterSlices(org.apache.cassandra.thrift.ColumnParent columnParent,
                                                                                             org.apache.cassandra.thrift.SlicePredicate predicate,
                                                                                             org.apache.cassandra.thrift.KeyRange keyRange)
                                                                                      throws HectorException
Description copied from interface: KeyspaceService
returns a subset of counter columns for a range of keys

Specified by:
getRangeCounterSlices in interface KeyspaceService
Throws:
HectorException

getSuperRangeSlices

public Map<ByteBuffer,List<org.apache.cassandra.thrift.SuperColumn>> getSuperRangeSlices(org.apache.cassandra.thrift.ColumnParent columnParent,
                                                                                         org.apache.cassandra.thrift.SlicePredicate predicate,
                                                                                         org.apache.cassandra.thrift.KeyRange keyRange)
                                                                                  throws HectorException
Description copied from interface: KeyspaceService
returns a subset of super columns for a range of keys.

Specified by:
getSuperRangeSlices in interface KeyspaceService
Throws:
HectorException

getSuperRangeCounterSlices

public Map<ByteBuffer,List<org.apache.cassandra.thrift.CounterSuperColumn>> getSuperRangeCounterSlices(org.apache.cassandra.thrift.ColumnParent columnParent,
                                                                                                       org.apache.cassandra.thrift.SlicePredicate predicate,
                                                                                                       org.apache.cassandra.thrift.KeyRange keyRange)
                                                                                                throws HectorException
Description copied from interface: KeyspaceService
returns a subset of counter super columns for a range of keys

Specified by:
getSuperRangeCounterSlices in interface KeyspaceService
Throws:
HectorException

getSlice

public List<org.apache.cassandra.thrift.Column> getSlice(ByteBuffer key,
                                                         org.apache.cassandra.thrift.ColumnParent columnParent,
                                                         org.apache.cassandra.thrift.SlicePredicate predicate)
                                                  throws HectorException
Description copied from interface: KeyspaceService
Get the group of columns contained by columnParent. Returns Either a ColumnFamily name or a ColumnFamily/SuperColumn specified by the given predicate. If no matching values are found, an empty list is returned.

Specified by:
getSlice in interface KeyspaceService
Throws:
HectorException

getSlice

public List<org.apache.cassandra.thrift.Column> getSlice(String key,
                                                         org.apache.cassandra.thrift.ColumnParent columnParent,
                                                         org.apache.cassandra.thrift.SlicePredicate predicate)
                                                  throws HectorException
Specified by:
getSlice in interface KeyspaceService
Throws:
HectorException

getCounterSlice

public List<org.apache.cassandra.thrift.CounterColumn> getCounterSlice(ByteBuffer key,
                                                                       org.apache.cassandra.thrift.ColumnParent columnParent,
                                                                       org.apache.cassandra.thrift.SlicePredicate predicate)
                                                                throws HectorException
Description copied from interface: KeyspaceService
Get the group of counter columns contained by columnParent. Returns Either a ColumnFamily name or a ColumnFamily/SuperColumn specified by the given predicate. If no matching values are found, an empty list is returned.

Specified by:
getCounterSlice in interface KeyspaceService
Throws:
HectorException

getCounterSlice

public List<org.apache.cassandra.thrift.CounterColumn> getCounterSlice(String key,
                                                                       org.apache.cassandra.thrift.ColumnParent columnParent,
                                                                       org.apache.cassandra.thrift.SlicePredicate predicate)
                                                                throws HectorException
Specified by:
getCounterSlice in interface KeyspaceService
Throws:
HectorException

getSuperColumn

public org.apache.cassandra.thrift.SuperColumn getSuperColumn(ByteBuffer key,
                                                              org.apache.cassandra.thrift.ColumnPath columnPath)
                                                       throws HectorException
Description copied from interface: KeyspaceService
Get the SuperColumn at the given columnPath. If no value is present, NotFoundException is thrown. by default will return column with native order and the size of the list is unlimited (so be careful...)

Specified by:
getSuperColumn in interface KeyspaceService
Throws:
HNotFoundException - when a supercolumn is not found
HectorException

getSuperSlice

public List<org.apache.cassandra.thrift.SuperColumn> getSuperSlice(String key,
                                                                   org.apache.cassandra.thrift.ColumnParent columnParent,
                                                                   org.apache.cassandra.thrift.SlicePredicate predicate)
                                                            throws HectorException
Specified by:
getSuperSlice in interface KeyspaceService
Throws:
HectorException

getSuperColumn

public org.apache.cassandra.thrift.SuperColumn getSuperColumn(ByteBuffer key,
                                                              org.apache.cassandra.thrift.ColumnPath columnPath,
                                                              boolean reversed,
                                                              int size)
                                                       throws HectorException
Description copied from interface: KeyspaceService
Get the SuperColumn at the given columnPath. If no value is present, NotFoundException is thrown. by default will return column with native order and the size of the list is unlimited (so be careful...)

Specified by:
getSuperColumn in interface KeyspaceService
reversed - the result Column sort
size - the result column size
Throws:
HNotFoundException - when a supercolumn is not found
HectorException

getSuperColumn

public org.apache.cassandra.thrift.SuperColumn getSuperColumn(String key,
                                                              org.apache.cassandra.thrift.ColumnPath columnPath)
                                                       throws HectorException
Specified by:
getSuperColumn in interface KeyspaceService
Throws:
HectorException

getSuperSlice

public List<org.apache.cassandra.thrift.SuperColumn> getSuperSlice(ByteBuffer key,
                                                                   org.apache.cassandra.thrift.ColumnParent columnParent,
                                                                   org.apache.cassandra.thrift.SlicePredicate predicate)
                                                            throws HectorException
Description copied from interface: KeyspaceService
Get the group of superColumn contained by columnParent.

Specified by:
getSuperSlice in interface KeyspaceService
Throws:
HectorException

getCounterSuperSlice

public List<org.apache.cassandra.thrift.CounterSuperColumn> getCounterSuperSlice(String key,
                                                                                 org.apache.cassandra.thrift.ColumnParent columnParent,
                                                                                 org.apache.cassandra.thrift.SlicePredicate predicate)
                                                                          throws HectorException
Specified by:
getCounterSuperSlice in interface KeyspaceService
Throws:
HectorException

getCounterSuperSlice

public List<org.apache.cassandra.thrift.CounterSuperColumn> getCounterSuperSlice(ByteBuffer key,
                                                                                 org.apache.cassandra.thrift.ColumnParent columnParent,
                                                                                 org.apache.cassandra.thrift.SlicePredicate predicate)
                                                                          throws HectorException
Description copied from interface: KeyspaceService
Get the group of superColumn contained by columnParent.

Specified by:
getCounterSuperSlice in interface KeyspaceService
Throws:
HectorException

insert

public void insert(ByteBuffer key,
                   org.apache.cassandra.thrift.ColumnParent columnParent,
                   org.apache.cassandra.thrift.Column column)
            throws HectorException
Description copied from interface: KeyspaceService
Inserts a column.

Specified by:
insert in interface KeyspaceService
Throws:
HectorException

addCounter

public void addCounter(ByteBuffer key,
                       org.apache.cassandra.thrift.ColumnParent columnParent,
                       org.apache.cassandra.thrift.CounterColumn counterColumn)
                throws HectorException
Description copied from interface: KeyspaceService
Add a counter with CL.ONE

Specified by:
addCounter in interface KeyspaceService
Throws:
HectorException

addCounter

public void addCounter(String key,
                       org.apache.cassandra.thrift.ColumnParent columnParent,
                       org.apache.cassandra.thrift.CounterColumn counterColumn)
                throws HectorException
Description copied from interface: KeyspaceService
Add a counter with CL.ONE

Specified by:
addCounter in interface KeyspaceService
Throws:
HectorException

insert

public void insert(String key,
                   org.apache.cassandra.thrift.ColumnPath columnPath,
                   ByteBuffer value)
            throws HectorException
Specified by:
insert in interface KeyspaceService
Throws:
HectorException

insert

public void insert(String key,
                   org.apache.cassandra.thrift.ColumnPath columnPath,
                   ByteBuffer value,
                   long timestamp)
            throws HectorException
Specified by:
insert in interface KeyspaceService
Throws:
HectorException

multigetSlice

public Map<ByteBuffer,List<org.apache.cassandra.thrift.Column>> multigetSlice(List<ByteBuffer> keys,
                                                                              org.apache.cassandra.thrift.ColumnParent columnParent,
                                                                              org.apache.cassandra.thrift.SlicePredicate predicate)
                                                                       throws HectorException
Description copied from interface: KeyspaceService
Performs a get_slice for columnParent and predicate for the given keys in parallel.

Specified by:
multigetSlice in interface KeyspaceService
Throws:
HectorException

multigetCounterSlice

public Map<ByteBuffer,List<org.apache.cassandra.thrift.CounterColumn>> multigetCounterSlice(List<ByteBuffer> keys,
                                                                                            org.apache.cassandra.thrift.ColumnParent columnParent,
                                                                                            org.apache.cassandra.thrift.SlicePredicate predicate)
                                                                                     throws HectorException
Description copied from interface: KeyspaceService
Performs a get_slice for columnParent and predicate for the given keys in parallel.

Specified by:
multigetCounterSlice in interface KeyspaceService
Throws:
HectorException

multigetSuperColumn

public Map<ByteBuffer,org.apache.cassandra.thrift.SuperColumn> multigetSuperColumn(List<ByteBuffer> keys,
                                                                                   org.apache.cassandra.thrift.ColumnPath columnPath)
                                                                            throws HectorException
Description copied from interface: KeyspaceService
Performs a get for columnPath in parallel on the given list of keys. The return value maps keys to the ColumnOrSuperColumn found. If no value corresponding to a key is present, the key will still be in the map, but both the column and superColumn references of the ColumnOrSuperColumn object it maps to will be null.

Specified by:
multigetSuperColumn in interface KeyspaceService
Throws:
HectorException

multigetSuperColumn

public Map<ByteBuffer,org.apache.cassandra.thrift.SuperColumn> multigetSuperColumn(List<ByteBuffer> keys,
                                                                                   org.apache.cassandra.thrift.ColumnPath columnPath,
                                                                                   boolean reversed,
                                                                                   int size)
                                                                            throws HectorException
Description copied from interface: KeyspaceService
Perform a get for columnPath in parallel on the given list of keys. The return value maps keys to the ColumnOrSuperColumn found. If no value corresponding to a key is present, the key will still be in the map, but both the column and superColumn references of the ColumnOrSuperColumn object it maps to will be null.

Specified by:
multigetSuperColumn in interface KeyspaceService
Throws:
HectorException

multigetSuperSlice

public Map<ByteBuffer,List<org.apache.cassandra.thrift.SuperColumn>> multigetSuperSlice(List<ByteBuffer> keys,
                                                                                        org.apache.cassandra.thrift.ColumnParent columnParent,
                                                                                        org.apache.cassandra.thrift.SlicePredicate predicate)
                                                                                 throws HectorException
Description copied from interface: KeyspaceService
Performs a get_slice for a superColumn columnParent and predicate for the given keys in parallel.

Specified by:
multigetSuperSlice in interface KeyspaceService
Throws:
HectorException

multigetCounterSuperSlice

public Map<ByteBuffer,List<org.apache.cassandra.thrift.CounterSuperColumn>> multigetCounterSuperSlice(List<ByteBuffer> keys,
                                                                                                      org.apache.cassandra.thrift.ColumnParent columnParent,
                                                                                                      org.apache.cassandra.thrift.SlicePredicate predicate)
                                                                                               throws HectorException
Description copied from interface: KeyspaceService
Performs a get_slice for a superColumn columnParent and predicate for the given keys in parallel.

Specified by:
multigetCounterSuperSlice in interface KeyspaceService
Throws:
HectorException

getIndexedSlices

public Map<ByteBuffer,List<org.apache.cassandra.thrift.Column>> getIndexedSlices(org.apache.cassandra.thrift.ColumnParent columnParent,
                                                                                 org.apache.cassandra.thrift.IndexClause indexClause,
                                                                                 org.apache.cassandra.thrift.SlicePredicate predicate)
                                                                          throws HectorException
Description copied from interface: KeyspaceService
returns a subset of columns for a range of keys.

Specified by:
getIndexedSlices in interface KeyspaceService
Throws:
HectorException

remove

public void remove(ByteBuffer key,
                   org.apache.cassandra.thrift.ColumnPath columnPath)
Specified by:
remove in interface KeyspaceService

multigetCount

public Map<ByteBuffer,Integer> multigetCount(List<ByteBuffer> keys,
                                             org.apache.cassandra.thrift.ColumnParent columnParent,
                                             org.apache.cassandra.thrift.SlicePredicate slicePredicate)
                                      throws HectorException
Description copied from interface: KeyspaceService
Returns a map of key to column count

Specified by:
multigetCount in interface KeyspaceService
Throws:
HectorException

remove

public void remove(ByteBuffer key,
                   org.apache.cassandra.thrift.ColumnPath columnPath,
                   long timestamp)
            throws HectorException
Description copied from interface: KeyspaceService
Same as two argument version, but the caller must specify their own clock

Specified by:
remove in interface KeyspaceService
Throws:
HectorException

removeCounter

public void removeCounter(ByteBuffer key,
                          org.apache.cassandra.thrift.ColumnPath columnPath)
                   throws HectorException
Specified by:
removeCounter in interface KeyspaceService
Throws:
HectorException

removeCounter

public void removeCounter(String key,
                          org.apache.cassandra.thrift.ColumnPath columnPath)
                   throws HectorException
Specified by:
removeCounter in interface KeyspaceService
Throws:
HectorException

remove

public void remove(String key,
                   org.apache.cassandra.thrift.ColumnPath columnPath)
            throws HectorException
Specified by:
remove in interface KeyspaceService
Throws:
HectorException

remove

public void remove(String key,
                   org.apache.cassandra.thrift.ColumnPath columnPath,
                   long timestamp)
            throws HectorException
Same as two argument version, but the caller must specify their own timestamp

Specified by:
remove in interface KeyspaceService
Throws:
HectorException

getName

public String getName()
Specified by:
getName in interface KeyspaceService

getColumn

public org.apache.cassandra.thrift.Column getColumn(ByteBuffer key,
                                                    org.apache.cassandra.thrift.ColumnPath columnPath)
                                             throws HectorException
Description copied from interface: KeyspaceService
Get the Column at the given columnPath. If no value is present, NotFoundException is thrown.

Specified by:
getColumn in interface KeyspaceService
Throws:
HNotFoundException - if no value exists for the column
HectorException

getCounter

public org.apache.cassandra.thrift.CounterColumn getCounter(ByteBuffer key,
                                                            org.apache.cassandra.thrift.ColumnPath columnPath)
                                                     throws HectorException
Description copied from interface: KeyspaceService
Get the Counter at the given columnPath. If no value is present, NotFoundException is thrown.

Specified by:
getCounter in interface KeyspaceService
Throws:
HNotFoundException - if no value exists for the counter
HectorException

getCounter

public org.apache.cassandra.thrift.CounterColumn getCounter(String key,
                                                            org.apache.cassandra.thrift.ColumnPath columnPath)
                                                     throws HectorException
Specified by:
getCounter in interface KeyspaceService
Throws:
HectorException

getColumn

public org.apache.cassandra.thrift.Column getColumn(String key,
                                                    org.apache.cassandra.thrift.ColumnPath columnPath)
                                             throws HectorException
Specified by:
getColumn in interface KeyspaceService
Throws:
HectorException

getConsistencyLevel

public HConsistencyLevel getConsistencyLevel(OperationType operationType)
Specified by:
getConsistencyLevel in interface KeyspaceService
Returns:
The consistency level held by this keyspace instance.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.