org.apache.cassandra.service
Interface Cassandra.Iface

All Known Implementing Classes:
Cassandra.Client, CassandraServer
Enclosing class:
Cassandra

public static interface Cassandra.Iface


Method Summary
 void batch_insert(java.lang.String keyspace, java.lang.String key, java.util.Map<java.lang.String,java.util.List<ColumnOrSuperColumn>> cfmap, int consistency_level)
          Insert Columns or SuperColumns across different Column Families for the same row key.
 java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> describe_keyspace(java.lang.String keyspace)
          describe specified keyspace
 int get_count(java.lang.String keyspace, java.lang.String key, ColumnParent column_parent, int consistency_level)
          returns the number of columns for a particular key and ColumnFamily or SuperColumn.
 java.util.List<java.lang.String> get_key_range(java.lang.String keyspace, java.lang.String column_family, java.lang.String start, java.lang.String finish, int count, int consistency_level)
           
 java.util.List<KeySlice> get_range_slice(java.lang.String keyspace, ColumnParent column_parent, SlicePredicate predicate, java.lang.String start_key, java.lang.String finish_key, int row_count, int consistency_level)
          returns a subset of columns for a range of keys.
 java.util.List<ColumnOrSuperColumn> get_slice(java.lang.String keyspace, java.lang.String key, ColumnParent column_parent, SlicePredicate predicate, int consistency_level)
          Get the group of columns contained by column_parent (either a ColumnFamily name or a ColumnFamily/SuperColumn name pair) specified by the given SlicePredicate.
 java.util.List<java.lang.String> get_string_list_property(java.lang.String property)
          get property whose value is list of strings.
 java.lang.String get_string_property(java.lang.String property)
          get property whose value is of type string.
 ColumnOrSuperColumn get(java.lang.String keyspace, java.lang.String key, ColumnPath column_path, int consistency_level)
          Get the Column or SuperColumn at the given column_path.
 void insert(java.lang.String keyspace, java.lang.String key, ColumnPath column_path, byte[] value, long timestamp, int consistency_level)
          Insert a Column consisting of (column_path.column, value, timestamp) at the given column_path.column_family and optional column_path.super_column.
 java.util.Map<java.lang.String,java.util.List<ColumnOrSuperColumn>> multiget_slice(java.lang.String keyspace, java.util.List<java.lang.String> keys, ColumnParent column_parent, SlicePredicate predicate, int consistency_level)
          Performs a get_slice for column_parent and predicate for the given keys in parallel.
 java.util.Map<java.lang.String,ColumnOrSuperColumn> multiget(java.lang.String keyspace, java.util.List<java.lang.String> keys, ColumnPath column_path, int consistency_level)
          Perform a get for column_path in parallel on the given list keys.
 void remove(java.lang.String keyspace, java.lang.String key, ColumnPath column_path, long timestamp, int consistency_level)
          Remove data from the row specified by key at the granularity specified by column_path, and the given timestamp.
 

Method Detail

get

ColumnOrSuperColumn get(java.lang.String keyspace,
                        java.lang.String key,
                        ColumnPath column_path,
                        int consistency_level)
                        throws InvalidRequestException,
                               NotFoundException,
                               UnavailableException,
                               TimedOutException,
                               org.apache.thrift.TException
Get the Column or SuperColumn at the given column_path. If no value is present, NotFoundException is thrown. (This is the only method that can throw an exception under non-failure conditions.)

Parameters:
keyspace -
key -
column_path -
consistency_level -
Throws:
InvalidRequestException
NotFoundException
UnavailableException
TimedOutException
org.apache.thrift.TException

get_slice

java.util.List<ColumnOrSuperColumn> get_slice(java.lang.String keyspace,
                                              java.lang.String key,
                                              ColumnParent column_parent,
                                              SlicePredicate predicate,
                                              int consistency_level)
                                              throws InvalidRequestException,
                                                     UnavailableException,
                                                     TimedOutException,
                                                     org.apache.thrift.TException
Get the group of columns contained by column_parent (either a ColumnFamily name or a ColumnFamily/SuperColumn name pair) specified by the given SlicePredicate. If no matching values are found, an empty list is returned.

Parameters:
keyspace -
key -
column_parent -
predicate -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

multiget

java.util.Map<java.lang.String,ColumnOrSuperColumn> multiget(java.lang.String keyspace,
                                                             java.util.List<java.lang.String> keys,
                                                             ColumnPath column_path,
                                                             int consistency_level)
                                                             throws InvalidRequestException,
                                                                    UnavailableException,
                                                                    TimedOutException,
                                                                    org.apache.thrift.TException
Perform a get for column_path in parallel on the given list 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 super_column references of the ColumnOrSuperColumn object it maps to will be null.

Parameters:
keyspace -
keys -
column_path -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

multiget_slice

java.util.Map<java.lang.String,java.util.List<ColumnOrSuperColumn>> multiget_slice(java.lang.String keyspace,
                                                                                   java.util.List<java.lang.String> keys,
                                                                                   ColumnParent column_parent,
                                                                                   SlicePredicate predicate,
                                                                                   int consistency_level)
                                                                                   throws InvalidRequestException,
                                                                                          UnavailableException,
                                                                                          TimedOutException,
                                                                                          org.apache.thrift.TException
Performs a get_slice for column_parent and predicate for the given keys in parallel.

Parameters:
keyspace -
keys -
column_parent -
predicate -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

get_count

int get_count(java.lang.String keyspace,
              java.lang.String key,
              ColumnParent column_parent,
              int consistency_level)
              throws InvalidRequestException,
                     UnavailableException,
                     TimedOutException,
                     org.apache.thrift.TException
returns the number of columns for a particular key and ColumnFamily or SuperColumn.

Parameters:
keyspace -
key -
column_parent -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

get_key_range

java.util.List<java.lang.String> get_key_range(java.lang.String keyspace,
                                               java.lang.String column_family,
                                               java.lang.String start,
                                               java.lang.String finish,
                                               int count,
                                               int consistency_level)
                                               throws InvalidRequestException,
                                                      UnavailableException,
                                                      TimedOutException,
                                                      org.apache.thrift.TException
Parameters:
keyspace -
column_family -
start -
finish -
count -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

get_range_slice

java.util.List<KeySlice> get_range_slice(java.lang.String keyspace,
                                         ColumnParent column_parent,
                                         SlicePredicate predicate,
                                         java.lang.String start_key,
                                         java.lang.String finish_key,
                                         int row_count,
                                         int consistency_level)
                                         throws InvalidRequestException,
                                                UnavailableException,
                                                TimedOutException,
                                                org.apache.thrift.TException
returns a subset of columns for a range of keys.

Parameters:
keyspace -
column_parent -
predicate -
start_key -
finish_key -
row_count -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

insert

void insert(java.lang.String keyspace,
            java.lang.String key,
            ColumnPath column_path,
            byte[] value,
            long timestamp,
            int consistency_level)
            throws InvalidRequestException,
                   UnavailableException,
                   TimedOutException,
                   org.apache.thrift.TException
Insert a Column consisting of (column_path.column, value, timestamp) at the given column_path.column_family and optional column_path.super_column. Note that column_path.column is here required, since a SuperColumn cannot directly contain binary values -- it can only contain sub-Columns.

Parameters:
keyspace -
key -
column_path -
value -
timestamp -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

batch_insert

void batch_insert(java.lang.String keyspace,
                  java.lang.String key,
                  java.util.Map<java.lang.String,java.util.List<ColumnOrSuperColumn>> cfmap,
                  int consistency_level)
                  throws InvalidRequestException,
                         UnavailableException,
                         TimedOutException,
                         org.apache.thrift.TException
Insert Columns or SuperColumns across different Column Families for the same row key. batch_mutation is a map> -- a map which pairs column family names with the relevant ColumnOrSuperColumn objects to insert.

Parameters:
keyspace -
key -
cfmap -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

remove

void remove(java.lang.String keyspace,
            java.lang.String key,
            ColumnPath column_path,
            long timestamp,
            int consistency_level)
            throws InvalidRequestException,
                   UnavailableException,
                   TimedOutException,
                   org.apache.thrift.TException
Remove data from the row specified by key at the granularity specified by column_path, and the given timestamp. Note that all the values in column_path besides column_path.column_family are truly optional: you can remove the entire row by just specifying the ColumnFamily, or you can remove a SuperColumn or a single Column by specifying those levels too.

Parameters:
keyspace -
key -
column_path -
timestamp -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

get_string_property

java.lang.String get_string_property(java.lang.String property)
                                     throws org.apache.thrift.TException
get property whose value is of type string.

Parameters:
property -
Throws:
org.apache.thrift.TException

get_string_list_property

java.util.List<java.lang.String> get_string_list_property(java.lang.String property)
                                                          throws org.apache.thrift.TException
get property whose value is list of strings.

Parameters:
property -
Throws:
org.apache.thrift.TException

describe_keyspace

java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> describe_keyspace(java.lang.String keyspace)
                                                                                                   throws NotFoundException,
                                                                                                          org.apache.thrift.TException
describe specified keyspace

Parameters:
keyspace -
Throws:
NotFoundException
org.apache.thrift.TException


Copyright © 2010 The Apache Software Foundation