public class ClusterStorageManager extends Object
| Constructor and Description |
|---|
ClusterStorageManager(Authenticator auth)
Initializes all ClusterStorage handlers listed by class name in the property "ClusterStorages"
This property is usually process specific, and so should be in the server/client.conf and not the connect file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abort(Object transactionKey) |
void |
begin(Object transactionKey) |
void |
clearCache()
Clear entire cache
|
void |
clearCache(ItemPath itemPath)
Clear the cache of the given Item.
|
void |
clearCache(ItemPath itemPath,
String path)
Clear the cache of the given cluster content of the given Item.
|
void |
close() |
void |
commit(Object transactionKey) |
void |
dumpCacheContents()
Print the content of the cache to the log
|
String |
executeQuery(Query query) |
String |
executeQuery(Query query,
Object transactionKey)
Executes the Query
|
C2KLocalObject |
get(ItemPath itemPath,
String path) |
C2KLocalObject |
get(ItemPath itemPath,
String path,
Object transactionKey)
Retrieves clusters from ClusterStorages & maintains the memory cache.
|
String[] |
getClusterContents(ItemPath itemPath,
ClusterType type) |
String[] |
getClusterContents(ItemPath itemPath,
ClusterType type,
Object transactionKey) |
String[] |
getClusterContents(ItemPath itemPath,
String path) |
String[] |
getClusterContents(ItemPath itemPath,
String path,
Object transactionKey)
Retrieves the ids of the next level of a cluster.
|
int |
getLastIntegerId(ItemPath itemPath,
String path,
Object transactionKey)
Retrieves the last id of the History
|
ArrayList<ClusterStorage> |
instantiateStores(String allClusters) |
void |
postBoostrap() |
void |
postConnect() |
void |
postStartServer() |
void |
put(ItemPath itemPath,
C2KLocalObject obj) |
void |
put(ItemPath itemPath,
C2KLocalObject obj,
Object transactionKey)
Creates or overwrites a cluster in all writers.
|
void |
remove(ItemPath itemPath,
String path)
Deletes a cluster from all writers
|
void |
remove(ItemPath itemPath,
String path,
Object transactionKey)
Deletes a cluster from all writers
|
void |
removeCluster(ItemPath itemPath,
String path,
Object transactionKey)
Removes all child objects from the given path for all writers
|
public ClusterStorageManager(Authenticator auth) throws PersistencyException
auth - the Authenticator to be used to initialise all the handlersPersistencyExceptionpublic ArrayList<ClusterStorage> instantiateStores(String allClusters) throws PersistencyException
allClusters - PersistencyExceptionpublic void close()
public String executeQuery(Query query) throws PersistencyException
query - PersistencyExceptionpublic String executeQuery(Query query, Object transactionKey) throws PersistencyException
query - the Query to be executedquery - transactionKey - PersistencyExceptionpublic String[] getClusterContents(ItemPath itemPath, ClusterType type) throws PersistencyException
PersistencyExceptionpublic String[] getClusterContents(ItemPath itemPath, ClusterType type, Object transactionKey) throws PersistencyException
PersistencyExceptionpublic String[] getClusterContents(ItemPath itemPath, String path) throws PersistencyException
PersistencyExceptionpublic String[] getClusterContents(ItemPath itemPath, String path, Object transactionKey) throws PersistencyException
itemPath - the current Itempath - the cluster path. The leading slash is removed if existsPersistencyExceptionpublic C2KLocalObject get(ItemPath itemPath, String path) throws PersistencyException, ObjectNotFoundException
itemPath - path - PersistencyExceptionObjectNotFoundExceptionpublic C2KLocalObject get(ItemPath itemPath, String path, Object transactionKey) throws PersistencyException, ObjectNotFoundException
itemPath - current Itempath - the cluster path. The leading slash is removed if existsPersistencyExceptionObjectNotFoundExceptionpublic int getLastIntegerId(ItemPath itemPath, String path, Object transactionKey) throws PersistencyException
itemPath - current Itempath - the cluster path. The leading slash is removed if existstransactionKey - PersistencyExceptionpublic void put(ItemPath itemPath, C2KLocalObject obj) throws PersistencyException
itemPath - obj - PersistencyExceptionpublic void put(ItemPath itemPath, C2KLocalObject obj, Object transactionKey) throws PersistencyException
PersistencyExceptionpublic void remove(ItemPath itemPath, String path) throws PersistencyException
itemPath - - Item to delete frompath - - root path to deletePersistencyException - - when deleting failspublic void remove(ItemPath itemPath, String path, Object transactionKey) throws PersistencyException
itemPath - - Item to delete frompath - - root path to deletetransactionKey - - locking objectPersistencyException - - when deleting failspublic void removeCluster(ItemPath itemPath, String path, Object transactionKey) throws PersistencyException
itemPath - - Item to delete frompath - - root path to deletetransactionKey - - locking objectPersistencyException - - when deleting failspublic void clearCache(ItemPath itemPath, String path)
itemPath - the item for which the cache should be cleared. Can be null.path - the identifier of the cluster content to be cleared. Can be null.public void clearCache(ItemPath itemPath)
itemPath - the Item for which the cache should be cleared. Can be null.public void clearCache()
public void dumpCacheContents()
public void begin(Object transactionKey) throws PersistencyException
transactionKey - PersistencyExceptionpublic void commit(Object transactionKey) throws PersistencyException
transactionKey - PersistencyExceptionpublic void abort(Object transactionKey) throws PersistencyException
transactionKey - PersistencyExceptionpublic void postConnect()
throws PersistencyException
PersistencyExceptionpublic void postBoostrap()
throws PersistencyException
PersistencyExceptionpublic void postStartServer()
throws PersistencyException
PersistencyExceptionCopyright © 1997–2020 CRISTAL-iSE. All rights reserved.