public class MemoryOnlyClusterStorage extends ClusterStorage
NONE, READ, READWRITE, WRITE| Constructor and Description |
|---|
MemoryOnlyClusterStorage() |
| Modifier and Type | Method and Description |
|---|---|
void |
abort(TransactionKey transactionKey) |
void |
begin(TransactionKey transactionKey) |
boolean |
checkQuerySupport(String language)
Checks whether the storage support the given type of query or not
|
void |
clear() |
void |
close()
Shuts down the storage.
|
void |
commit(TransactionKey transactionKey) |
void |
delete(ItemPath thisItem,
String path,
TransactionKey transactionKey)
Remove a CRISTAL local object from storage.
|
void |
dumpContents(ItemPath thisItem) |
String |
executeQuery(Query query,
TransactionKey transactionKey)
Executes an SQL/OQL/XQuery/XPath/etc query in the target database.
|
C2KLocalObject |
get(ItemPath thisItem,
String path,
TransactionKey transactionKey)
Fetches a CRISTAL local object from storage by path
|
String[] |
getClusterContents(ItemPath itemPath,
ClusterType type,
TransactionKey transactionKey)
Queries the local path below the given type and returns the possible next elements.
|
String[] |
getClusterContents(ItemPath thisItem,
String path,
TransactionKey transactionKey)
Queries the local path below of the item and returns the possible next elements.
|
String |
getId() |
int |
getLastIntegerId(ItemPath itemPath,
String path,
TransactionKey transactionKey)
History and JobList based on a integer id that is incremented each tome a new Event or Job is stored
|
String |
getName() |
void |
open(Authenticator auth)
Connects to the storage.
|
void |
postBoostrap()
Informs the ClusterSorage that the Boostrap process has finished.
|
void |
postConnect()
Informs the ClusterSorage that connect was done.
|
void |
postStartServer()
Informs the ClusterSorage that the start server process has finished.
|
void |
put(ItemPath thisItem,
C2KLocalObject obj,
TransactionKey transactionKey)
Stores a CRISTAL local object.
|
short |
queryClusterSupport(ClusterType clusterType)
Declares whether or not this ClusterStorage can read or write a
particular CRISTAL local object type.
|
getClusters, getClusterType, getPathpublic void clear()
public void open(Authenticator auth) throws PersistencyException
ClusterStorageopen in class ClusterStorageauth - The Authenticator instance that the user or server logged in
with.PersistencyException - If storage initialization failedpublic void close()
throws PersistencyException
ClusterStorageclose in class ClusterStoragePersistencyException - If closing failedpublic boolean checkQuerySupport(String language)
ClusterStoragecheckQuerySupport in class ClusterStoragelanguage - type of the query (e.g. SQL/XQuery/XPath/....)public short queryClusterSupport(ClusterType clusterType)
ClusterStoragequeryClusterSupport in class ClusterStorageclusterType - The Cluster type requestedpublic String getName()
getName in class ClusterStoragepublic String getId()
getId in class ClusterStoragepublic String executeQuery(Query query, TransactionKey transactionKey) throws PersistencyException
ClusterStorageexecuteQuery in class ClusterStoragequery - the query to be executedtransactionKey - the key of the transaction, can be nullPersistencyExceptionpublic C2KLocalObject get(ItemPath thisItem, String path, TransactionKey transactionKey) throws PersistencyException
ClusterStorageget in class ClusterStoragethisItem - The ItemPath of the containing Itempath - The path of the local objecttransactionKey - the key of the transaction, can be nullPersistencyException - when retrieval failedpublic void put(ItemPath thisItem, C2KLocalObject obj, TransactionKey transactionKey) throws PersistencyException
ClusterStorageput in class ClusterStoragethisItem - The Item that the object will be stored underobj - The C2KLocalObject to storetransactionKey - the key of the transaction, cannot be nullPersistencyException - When storage failspublic void delete(ItemPath thisItem, String path, TransactionKey transactionKey) throws PersistencyException
ClusterStoragedelete in class ClusterStoragethisItem - The containing Itempath - The path of the object to be removedtransactionKey - the key of the transaction, cannot be nullPersistencyException - When deletion fails or is not allowedpublic String[] getClusterContents(ItemPath thisItem, String path, TransactionKey transactionKey) throws PersistencyException
ClusterStoragegetClusterContents in class ClusterStoragethisItem - The Item to querypath - The path within that Item to query. May be ClusterStorage.ROOT (empty String)transactionKey - the key of the transaction, can be nullPersistencyException - When an error occurred during the querypublic String[] getClusterContents(ItemPath itemPath, ClusterType type, TransactionKey transactionKey) throws PersistencyException
ClusterStoragegetClusterContents in class ClusterStoragetransactionKey - the key of the transaction, can be nullPersistencyExceptionpublic void dumpContents(ItemPath thisItem)
public void postBoostrap()
ClusterStoragepostBoostrap in class ClusterStoragepublic void postStartServer()
ClusterStoragepostStartServer in class ClusterStoragepublic void postConnect()
ClusterStoragepostConnect in class ClusterStoragepublic int getLastIntegerId(ItemPath itemPath, String path, TransactionKey transactionKey) throws PersistencyException
ClusterStoragegetLastIntegerId in class ClusterStorageitemPath - The ItemPath (UUID) of the containing Itempath - the cluster patch, either equals to 'AuditTrail' or 'Job'transactionKey - the key of the transaction, can be nullPersistencyException - When storage failspublic void begin(TransactionKey transactionKey) throws PersistencyException
begin in class ClusterStoragePersistencyExceptionpublic void commit(TransactionKey transactionKey) throws PersistencyException
commit in class ClusterStoragePersistencyExceptionpublic void abort(TransactionKey transactionKey) throws PersistencyException
abort in class ClusterStoragePersistencyExceptionCopyright © 1997–2022 CRISTAL-iSE. All rights reserved.