public class DelegatingStore extends Object implements Store
| Constructor and Description |
|---|
DelegatingStore(Store actualStore) |
| 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.
|
Store |
getActualStore()
Returns the
Store to which requests will be delegated to. |
<T extends Store> |
getActualStore(Class<T> clazz)
Finds the
Store to which requests will be delegated to in the delegation chains of the given class. |
Store |
getDeepActualStore()
Returns the leaf
Store of the delegation chain. |
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.
|
public DelegatingStore(Store actualStore)
public Store getActualStore()
Store to which requests will be delegated to.public <T extends Store> T getActualStore(Class<T> clazz)
Store to which requests will be delegated to in the delegation chains of the given class.public Store getDeepActualStore()
Store of the delegation chain.public void start()
throws DatabaseNotReachedException
Storestart in interface StoreDatabaseNotReachedExceptionpublic boolean hasTable(String tableName) throws DatabaseNotReachedException
StorehasTable in interface StoreDatabaseNotReachedExceptionpublic void delete(MetaInformation meta, String table, String id) throws DatabaseNotReachedException
Storedelete in interface StoreDatabaseNotReachedExceptionpublic boolean exists(MetaInformation meta, String table, String row) throws DatabaseNotReachedException
Storeexists in interface StoreDatabaseNotReachedExceptionpublic boolean exists(MetaInformation meta, String table, String row, String family) throws DatabaseNotReachedException
Storeexists in interface StoreDatabaseNotReachedExceptionpublic CloseableKeyIterator get(MetaInformation meta, String table, Constraint c, int limit, Set<String> families) throws DatabaseNotReachedException
Storeget in interface StoreDatabaseNotReachedExceptionpublic byte[] get(MetaInformation meta, String table, String row, String family, String key) throws DatabaseNotReachedException
Storeget in interface StoreDatabaseNotReachedExceptionpublic Map<String,byte[]> get(MetaInformation meta, String table, String id, String family) throws DatabaseNotReachedException
Storeget in interface StoreDatabaseNotReachedExceptionpublic Map<String,byte[]> get(MetaInformation meta, String table, String id, String family, Constraint c) throws DatabaseNotReachedException
Storeget in interface StoreDatabaseNotReachedExceptionpublic Row.ColumnFamilyData get(MetaInformation meta, String table, String id, Set<String> families) throws DatabaseNotReachedException
Storeget in interface Storetable - 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 emptyDatabaseNotReachedExceptionpublic void storeChanges(MetaInformation meta, String table, String id, Row.ColumnFamilyData changed, Map<String,Set<String>> removed, Map<String,Map<String,Number>> increments) throws DatabaseNotReachedException
StorestoreChanges in interface StoreDatabaseNotReachedExceptionpublic long count(MetaInformation meta, String table, Constraint c) throws DatabaseNotReachedException
Storecount in interface StoreDatabaseNotReachedExceptionCopyright © 2016. All Rights Reserved.