org.apache.cassandra.service
Class CassandraServer

java.lang.Object
  extended by org.apache.cassandra.service.CassandraServer
All Implemented Interfaces:
org.apache.cassandra.service.Cassandra.Iface

public class CassandraServer
extends java.lang.Object
implements org.apache.cassandra.service.Cassandra.Iface

Author : Avinash Lakshman ( alakshman@facebook.com) & Prashant Malik ( pmalik@facebook.com )


Field Summary
protected  StorageService storageService
           
 
Constructor Summary
CassandraServer()
           
 
Method Summary
 void batch_insert_superColumn(org.apache.cassandra.service.batch_mutation_super_t batchMutationSuper, boolean block)
           
 void batch_insert(org.apache.cassandra.service.batch_mutation_t batchMutation, boolean block)
           
 java.lang.String describeTable(java.lang.String tableName)
           
 org.apache.cassandra.service.CqlResult_t executeQuery(java.lang.String query)
           
 int get_column_count(java.lang.String tablename, java.lang.String key, java.lang.String columnParent)
           
 org.apache.cassandra.service.column_t get_column(java.lang.String tablename, java.lang.String key, java.lang.String columnPath)
           
 java.util.List<org.apache.cassandra.service.column_t> get_columns_since(java.lang.String tablename, java.lang.String key, java.lang.String columnParent, long timeStamp)
           
 java.util.List<java.lang.String> get_key_range(java.lang.String tablename, java.lang.String startWith, java.lang.String stopAt, int maxResults)
           
 java.util.List<org.apache.cassandra.service.column_t> get_slice_by_names(java.lang.String tablename, java.lang.String key, java.lang.String columnParent, java.util.List<java.lang.String> columnNames)
           
 java.util.List<org.apache.cassandra.service.superColumn_t> get_slice_super_by_names(java.lang.String tablename, java.lang.String key, java.lang.String columnFamily, java.util.List<java.lang.String> superColumnNames)
           
 java.util.List<org.apache.cassandra.service.superColumn_t> get_slice_super(java.lang.String tablename, java.lang.String key, java.lang.String columnFamily, int start, int count)
           
 java.util.List<org.apache.cassandra.service.column_t> get_slice(java.lang.String tablename, java.lang.String key, java.lang.String columnParent, int start, int count)
           
 org.apache.cassandra.service.superColumn_t get_superColumn(java.lang.String tablename, java.lang.String key, java.lang.String superColumnPath)
           
 java.util.List<java.lang.String> getStringListProperty(java.lang.String propertyName)
           
 java.lang.String getStringProperty(java.lang.String propertyName)
           
 void insert(java.lang.String tablename, java.lang.String key, java.lang.String columnPath, byte[] cellData, long timestamp, boolean block)
           
protected  ColumnFamily readColumnFamily(ReadCommand command)
           
 void remove(java.lang.String tablename, java.lang.String key, java.lang.String columnPathOrParent, long timestamp, boolean block)
           
 void start()
           
 java.util.List<org.apache.cassandra.service.column_t> thriftifyColumns(java.util.Collection<IColumn> columns)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

storageService

protected StorageService storageService
Constructor Detail

CassandraServer

public CassandraServer()
Method Detail

start

public void start()
           throws java.io.IOException
Throws:
java.io.IOException

readColumnFamily

protected ColumnFamily readColumnFamily(ReadCommand command)
                                 throws org.apache.cassandra.service.InvalidRequestException
Throws:
org.apache.cassandra.service.InvalidRequestException

thriftifyColumns

public java.util.List<org.apache.cassandra.service.column_t> thriftifyColumns(java.util.Collection<IColumn> columns)

get_columns_since

public java.util.List<org.apache.cassandra.service.column_t> get_columns_since(java.lang.String tablename,
                                                                               java.lang.String key,
                                                                               java.lang.String columnParent,
                                                                               long timeStamp)
                                                                        throws org.apache.cassandra.service.InvalidRequestException
Specified by:
get_columns_since in interface org.apache.cassandra.service.Cassandra.Iface
Throws:
org.apache.cassandra.service.InvalidRequestException

get_slice_by_names

public java.util.List<org.apache.cassandra.service.column_t> get_slice_by_names(java.lang.String tablename,
                                                                                java.lang.String key,
                                                                                java.lang.String columnParent,
                                                                                java.util.List<java.lang.String> columnNames)
                                                                         throws org.apache.cassandra.service.InvalidRequestException
Specified by:
get_slice_by_names in interface org.apache.cassandra.service.Cassandra.Iface
Throws:
org.apache.cassandra.service.InvalidRequestException

get_slice

public java.util.List<org.apache.cassandra.service.column_t> get_slice(java.lang.String tablename,
                                                                       java.lang.String key,
                                                                       java.lang.String columnParent,
                                                                       int start,
                                                                       int count)
                                                                throws org.apache.cassandra.service.InvalidRequestException
Specified by:
get_slice in interface org.apache.cassandra.service.Cassandra.Iface
Throws:
org.apache.cassandra.service.InvalidRequestException

get_column

public org.apache.cassandra.service.column_t get_column(java.lang.String tablename,
                                                        java.lang.String key,
                                                        java.lang.String columnPath)
                                                 throws org.apache.cassandra.service.NotFoundException,
                                                        org.apache.cassandra.service.InvalidRequestException
Specified by:
get_column in interface org.apache.cassandra.service.Cassandra.Iface
Throws:
org.apache.cassandra.service.NotFoundException
org.apache.cassandra.service.InvalidRequestException

get_column_count

public int get_column_count(java.lang.String tablename,
                            java.lang.String key,
                            java.lang.String columnParent)
                     throws org.apache.cassandra.service.InvalidRequestException
Specified by:
get_column_count in interface org.apache.cassandra.service.Cassandra.Iface
Throws:
org.apache.cassandra.service.InvalidRequestException

insert

public void insert(java.lang.String tablename,
                   java.lang.String key,
                   java.lang.String columnPath,
                   byte[] cellData,
                   long timestamp,
                   boolean block)
            throws org.apache.cassandra.service.InvalidRequestException,
                   org.apache.cassandra.service.UnavailableException
Specified by:
insert in interface org.apache.cassandra.service.Cassandra.Iface
Throws:
org.apache.cassandra.service.InvalidRequestException
org.apache.cassandra.service.UnavailableException

batch_insert

public void batch_insert(org.apache.cassandra.service.batch_mutation_t batchMutation,
                         boolean block)
                  throws org.apache.cassandra.service.InvalidRequestException,
                         org.apache.cassandra.service.UnavailableException
Specified by:
batch_insert in interface org.apache.cassandra.service.Cassandra.Iface
Throws:
org.apache.cassandra.service.InvalidRequestException
org.apache.cassandra.service.UnavailableException

remove

public void remove(java.lang.String tablename,
                   java.lang.String key,
                   java.lang.String columnPathOrParent,
                   long timestamp,
                   boolean block)
            throws org.apache.cassandra.service.InvalidRequestException,
                   org.apache.cassandra.service.UnavailableException
Specified by:
remove in interface org.apache.cassandra.service.Cassandra.Iface
Throws:
org.apache.cassandra.service.InvalidRequestException
org.apache.cassandra.service.UnavailableException

get_slice_super_by_names

public java.util.List<org.apache.cassandra.service.superColumn_t> get_slice_super_by_names(java.lang.String tablename,
                                                                                           java.lang.String key,
                                                                                           java.lang.String columnFamily,
                                                                                           java.util.List<java.lang.String> superColumnNames)
                                                                                    throws org.apache.cassandra.service.InvalidRequestException
Specified by:
get_slice_super_by_names in interface org.apache.cassandra.service.Cassandra.Iface
Throws:
org.apache.cassandra.service.InvalidRequestException

get_slice_super

public java.util.List<org.apache.cassandra.service.superColumn_t> get_slice_super(java.lang.String tablename,
                                                                                  java.lang.String key,
                                                                                  java.lang.String columnFamily,
                                                                                  int start,
                                                                                  int count)
                                                                           throws org.apache.cassandra.service.InvalidRequestException
Specified by:
get_slice_super in interface org.apache.cassandra.service.Cassandra.Iface
Throws:
org.apache.cassandra.service.InvalidRequestException

get_superColumn

public org.apache.cassandra.service.superColumn_t get_superColumn(java.lang.String tablename,
                                                                  java.lang.String key,
                                                                  java.lang.String superColumnPath)
                                                           throws org.apache.cassandra.service.InvalidRequestException,
                                                                  org.apache.cassandra.service.NotFoundException
Specified by:
get_superColumn in interface org.apache.cassandra.service.Cassandra.Iface
Throws:
org.apache.cassandra.service.InvalidRequestException
org.apache.cassandra.service.NotFoundException

batch_insert_superColumn

public void batch_insert_superColumn(org.apache.cassandra.service.batch_mutation_super_t batchMutationSuper,
                                     boolean block)
                              throws org.apache.cassandra.service.InvalidRequestException,
                                     org.apache.cassandra.service.UnavailableException
Specified by:
batch_insert_superColumn in interface org.apache.cassandra.service.Cassandra.Iface
Throws:
org.apache.cassandra.service.InvalidRequestException
org.apache.cassandra.service.UnavailableException

getStringProperty

public java.lang.String getStringProperty(java.lang.String propertyName)
Specified by:
getStringProperty in interface org.apache.cassandra.service.Cassandra.Iface

getStringListProperty

public java.util.List<java.lang.String> getStringListProperty(java.lang.String propertyName)
Specified by:
getStringListProperty in interface org.apache.cassandra.service.Cassandra.Iface

describeTable

public java.lang.String describeTable(java.lang.String tableName)
Specified by:
describeTable in interface org.apache.cassandra.service.Cassandra.Iface

executeQuery

public org.apache.cassandra.service.CqlResult_t executeQuery(java.lang.String query)
                                                      throws org.apache.thrift.TException
Specified by:
executeQuery in interface org.apache.cassandra.service.Cassandra.Iface
Throws:
org.apache.thrift.TException

get_key_range

public java.util.List<java.lang.String> get_key_range(java.lang.String tablename,
                                                      java.lang.String startWith,
                                                      java.lang.String stopAt,
                                                      int maxResults)
                                               throws org.apache.cassandra.service.InvalidRequestException
Specified by:
get_key_range in interface org.apache.cassandra.service.Cassandra.Iface
Throws:
org.apache.cassandra.service.InvalidRequestException


Copyright © 2009 The Apache Software Foundation