public interface Store
String key with a set of
column families. It should be easy and efficient to find a row in a
table using its key, or defining a key with a minimum value and a maximum
value as if key would be organized in a dictionary (see
String.compareTo(String)). Each column family is a map which
associates a qualifier with data, represented by a byte array.a default implementation| Modifier and Type | Method and Description |
|---|---|
long |
count(MetaInformation meta,
String table,
Constraint c)
Counts the number of element satisfying the constraint.
|
void |
delete(MetaInformation meta,
String table,
String id)
Deletes a particular element.
|
boolean |
exists(MetaInformation meta,
String table,
String row)
Tests for a row.
|
boolean |
exists(MetaInformation meta,
String table,
String row,
String family)
Tests whether a column family is empty.
|
CloseableKeyIterator |
get(MetaInformation meta,
String table,
Constraint c,
int limit,
Set<String> families)
Rows matching constraint sorted according to their key in ascending
order.
|
Row.ColumnFamilyData |
get(MetaInformation meta,
String table,
String id,
Set<String> families)
Returns all elements in families ; no side-effect.
|
Map<String,byte[]> |
get(MetaInformation meta,
String table,
String id,
String family)
Returns all elements in a family ; no side-effect.
|
Map<String,byte[]> |
get(MetaInformation meta,
String table,
String id,
String family,
Constraint c)
Returns all elements in a family ; no side-effect.
|
byte[] |
get(MetaInformation meta,
String table,
String row,
String family,
String key)
Returns an element from a family.
|
boolean |
hasTable(String tableName)
Checks whether the given table exists in this store.
|
void |
start()
Called once the store is created ; only one store is instanciated with
the same properties.
|
void |
storeChanges(MetaInformation meta,
String table,
String id,
Row.ColumnFamilyData changed,
Map<String,Set<String>> removed,
Map<String,Map<String,Number>> increments)
Stores given piece of information.
|
void start()
throws DatabaseNotReachedException
DatabaseNotReachedExceptionboolean hasTable(String tableName) throws DatabaseNotReachedException
DatabaseNotReachedExceptionvoid delete(MetaInformation meta, String table, String id) throws DatabaseNotReachedException
DatabaseNotReachedExceptionboolean exists(MetaInformation meta, String table, String row) throws DatabaseNotReachedException
DatabaseNotReachedExceptionboolean exists(MetaInformation meta, String table, String row, String family) throws DatabaseNotReachedException
DatabaseNotReachedExceptionCloseableKeyIterator get(MetaInformation meta, String table, Constraint c, int limit, Set<String> families) throws DatabaseNotReachedException
DatabaseNotReachedExceptionbyte[] get(MetaInformation meta, String table, String row, String family, String key) throws DatabaseNotReachedException
DatabaseNotReachedExceptionMap<String,byte[]> get(MetaInformation meta, String table, String id, String family) throws DatabaseNotReachedException
DatabaseNotReachedExceptionMap<String,byte[]> get(MetaInformation meta, String table, String id, String family, Constraint c) throws DatabaseNotReachedException
DatabaseNotReachedExceptionRow.ColumnFamilyData get(MetaInformation meta, String table, String id, Set<String> families) throws DatabaseNotReachedException
table - the table from which to find the elementid - the unique identifier (i.e. the key) with which the element
was storedfamilies - the set of column families to be activated ; should never be
null or emptyDatabaseNotReachedExceptionvoid storeChanges(MetaInformation meta, String table, String id, Row.ColumnFamilyData changed, Map<String,Set<String>> removed, Map<String,Map<String,Number>> increments) throws DatabaseNotReachedException
DatabaseNotReachedExceptionlong count(MetaInformation meta, String table, Constraint c) throws DatabaseNotReachedException
DatabaseNotReachedExceptionCopyright © 2016. All Rights Reserved.