mirror of https://github.com/apache/cassandra
organize api methods by type (retrieval or modification). patch by jbellis
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@809718 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
526af55263
commit
bbd170187b
|
|
@ -114,46 +114,48 @@ struct BatchMutation {
|
|||
|
||||
|
||||
service Cassandra {
|
||||
list<ColumnOrSuperColumn> get_slice(1:string keyspace, 2:string key, 3:ColumnParent column_parent, 4:SlicePredicate predicate, 5:ConsistencyLevel consistency_level=1)
|
||||
# retrieval methods
|
||||
ColumnOrSuperColumn get(1:string keyspace, 2:string key, 3:ColumnPath column_path, 4:ConsistencyLevel consistency_level=1)
|
||||
throws (1: InvalidRequestException ire, 2: NotFoundException nfe),
|
||||
|
||||
map<string,list<ColumnOrSuperColumn>> multiget_slice(1:string keyspace, 2:list<string> keys, 3:ColumnParent column_parent, 4:SlicePredicate predicate, 5:ConsistencyLevel consistency_level=1)
|
||||
throws (1: InvalidRequestException ire),
|
||||
|
||||
ColumnOrSuperColumn get(1:string keyspace, 2:string key, 3:ColumnPath column_path, 4:ConsistencyLevel consistency_level=1)
|
||||
list<ColumnOrSuperColumn> get_slice(1:string keyspace, 2:string key, 3:ColumnParent column_parent, 4:SlicePredicate predicate, 5:ConsistencyLevel consistency_level=1)
|
||||
throws (1: InvalidRequestException ire, 2: NotFoundException nfe),
|
||||
|
||||
map<string,ColumnOrSuperColumn> multiget(1:string keyspace, 2:list<string> keys, 3:ColumnPath column_path, 4:ConsistencyLevel consistency_level=1)
|
||||
throws (1: InvalidRequestException ire),
|
||||
|
||||
map<string,list<ColumnOrSuperColumn>> multiget_slice(1:string keyspace, 2:list<string> keys, 3:ColumnParent column_parent, 4:SlicePredicate predicate, 5:ConsistencyLevel consistency_level=1)
|
||||
throws (1: InvalidRequestException ire),
|
||||
|
||||
i32 get_count(1:string keyspace, 2:string key, 3:ColumnParent column_parent, 5:ConsistencyLevel consistency_level=1)
|
||||
throws (1: InvalidRequestException ire),
|
||||
|
||||
void insert(1:string keyspace, 2:string key, 3:ColumnPath column_path, 4:binary value, 5:i64 timestamp, 6:ConsistencyLevel consistency_level=0)
|
||||
throws (1: InvalidRequestException ire, 2: UnavailableException ue),
|
||||
|
||||
void batch_insert(1:string keyspace, 2:BatchMutation batch_mutation, 3:ConsistencyLevel consistency_level=0)
|
||||
throws (1: InvalidRequestException ire, 2: UnavailableException ue),
|
||||
|
||||
void remove(1:string keyspace, 2:string key, 3:ColumnPath column_path, 4:i64 timestamp, 5:ConsistencyLevel consistency_level=0)
|
||||
throws (1: InvalidRequestException ire, 2: UnavailableException ue),
|
||||
|
||||
# range query: returns matching keys
|
||||
list<string> get_key_range(1:string keyspace, 2:string column_family, 3:string start="", 4:string finish="", 5:i32 count=100, 6:ConsistencyLevel consistency_level=1)
|
||||
list<string> get_key_range(1:string keyspace, 2:string column_family, 3:string start="", 4:string finish="", 5:i32 count=100, 6:ConsistencyLevel consistency_level=1)
|
||||
throws (1: InvalidRequestException ire),
|
||||
|
||||
# modification methods
|
||||
void insert(1:string keyspace, 2:string key, 3:ColumnPath column_path, 4:binary value, 5:i64 timestamp, 6:ConsistencyLevel consistency_level=0)
|
||||
throws (1: InvalidRequestException ire, 2: UnavailableException ue),
|
||||
|
||||
void batch_insert(1:string keyspace, 2:BatchMutation batch_mutation, 3:ConsistencyLevel consistency_level=0)
|
||||
throws (1: InvalidRequestException ire, 2: UnavailableException ue),
|
||||
|
||||
void remove(1:string keyspace, 2:string key, 3:ColumnPath column_path, 4:i64 timestamp, 5:ConsistencyLevel consistency_level=0)
|
||||
throws (1: InvalidRequestException ire, 2: UnavailableException ue),
|
||||
|
||||
|
||||
// Meta-APIs -- APIs to get information about the node or cluster,
|
||||
// rather than user data. The nodeprobe program provides usage examples.
|
||||
|
||||
// get property whose value is of type "string"
|
||||
string get_string_property(1:string property),
|
||||
string get_string_property(1:string property),
|
||||
|
||||
// get property whose value is list of "strings"
|
||||
list<string> get_string_list_property(1:string property),
|
||||
list<string> get_string_list_property(1:string property),
|
||||
|
||||
// describe specified keyspace
|
||||
map<string, map<string, string>> describe_keyspace(1:string keyspace)
|
||||
map<string, map<string, string>> describe_keyspace(1:string keyspace)
|
||||
throws (1: NotFoundException nfe),
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ import java.net.InetSocketAddress;
|
|||
import java.util.Set;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.log4j.Level;
|
||||
|
||||
import org.apache.thrift.protocol.TBinaryProtocol;
|
||||
import org.apache.thrift.protocol.TProtocolFactory;
|
||||
import org.apache.thrift.server.TThreadPoolServer;
|
||||
|
|
|
|||
Loading…
Reference in New Issue