Package net.ontopia.persistence.proxy
Class RDBMSStorage
java.lang.Object
net.ontopia.persistence.proxy.RDBMSStorage
- All Implemented Interfaces:
StorageIF
INTERNAL: A storage definition implementation for relational
databases.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected Map<IdentityIF,Map<String, EvictableIF>> -
Constructor Summary
ConstructorsConstructorDescriptionINTERNAL: Creates a storage definition which gets its settings from system variables.RDBMSStorage(String propfile) INTERNAL: Creates a storage definition that reads its settings from the specified property file.RDBMSStorage(Map<String, String> properties) INTERNAL: Creates a storage definition that reads its settings from the specified properties. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclearCache(IdentityIF namespace) voidclose()INTERNAL: Closes the storage definition, which allows it to free its resources.createAccess(boolean readonly) createQuery(String name, RDBMSAccess access, ObjectAccessIF oaccess, AccessRegistrarIF registrar) createQuery(JDOQuery jdoquery, RDBMSAccess access, ObjectAccessIF oaccess, AccessRegistrarIF registrar, boolean lookup_identities) createTransaction(boolean readonly) INTERNAL: Creates a new storage access instance.generateIdentity(Class<?> type) intgetConnectionFactory(boolean readonly) INTERNAL: Returns the database type.getHelperObject(int identifier, IdentityIF namespace) INTERNAL: Returns the shared caches.protected InputStreamgetInputStream(String property, String filename) INTERNAL: Returns the optimized object relational mapping declaration.PUBLIC: provides proxy access to aRDBMSMetricsIFobject that provides access to the metrics regarding this storage.protected ConnectionintString[]INTERNAL: Returns the database platforms.INTERNAL: Gets the properties held by the storage.getProperty(String property) INTERNAL: Gets the value of the specified storage property.getProperty(String property, String default_value) protected QueryDescriptorgetQueryDescriptor(String name) getQueryString(String name) INTERNAL: Returns the shared storage cache, if any.INTERNAL: exposes the set of active transactions.protected voidINTERNAL: Method shared by constructors to properly initialize members.booleanINTERNAL: Returns true if shared cache is enabled.voidINTERNAL: Notify cluster that transaction has been committed, so that batched cluster events can be broadcasted.voidobjectMerged(IdentityIF source, IdentityIF target, AbstractTransaction cause) INTERNAL: Propagates committed merges to other active transactions.protected voidtouch(Connection connection) protected voidtransactionClosed(AbstractTransaction transaction) voidwriteReport(Writer out, TopicMapReferenceIF reference, IdentityIF namespace, boolean dumpCaches)
-
Field Details
-
PROPERTIES_ROOT
- See Also:
-
qcmap
-
-
Constructor Details
-
RDBMSStorage
INTERNAL: Creates a storage definition which gets its settings from system variables.- Throws:
IOException
-
RDBMSStorage
INTERNAL: Creates a storage definition that reads its settings from the specified property file.- Throws:
IOException
-
RDBMSStorage
INTERNAL: Creates a storage definition that reads its settings from the specified properties.- Throws:
IOException- Since:
- 1.2.4
-
-
Method Details
-
getInputStream
- Throws:
IOException
-
init
INTERNAL: Method shared by constructors to properly initialize members.- Throws:
IOException
-
getMapping
Description copied from interface:StorageIFINTERNAL: Returns the optimized object relational mapping declaration.- Specified by:
getMappingin interfaceStorageIF
-
getQueryDeclarations
-
generateIdentity
-
getProperties
Description copied from interface:StorageIFINTERNAL: Gets the properties held by the storage.- Specified by:
getPropertiesin interfaceStorageIF
-
getProperty
Description copied from interface:StorageIFINTERNAL: Gets the value of the specified storage property.- Specified by:
getPropertyin interfaceStorageIF
-
getProperty
-
createAccess
-
createTransaction
Description copied from interface:StorageIFINTERNAL: Creates a new storage access instance.- Specified by:
createTransactionin interfaceStorageIF
-
getStorageCache
Description copied from interface:StorageIFINTERNAL: Returns the shared storage cache, if any.- Specified by:
getStorageCachein interfaceStorageIF
-
getDatabase
INTERNAL: Returns the database type. -
getPlatforms
INTERNAL: Returns the database platforms. -
close
public void close()Description copied from interface:StorageIFINTERNAL: Closes the storage definition, which allows it to free its resources. -
notifyCluster
public void notifyCluster()Description copied from interface:StorageIFINTERNAL: Notify cluster that transaction has been committed, so that batched cluster events can be broadcasted.- Specified by:
notifyClusterin interfaceStorageIF
-
getHelperObject
Description copied from interface:StorageIFINTERNAL: Returns the shared caches.- Specified by:
getHelperObjectin interfaceStorageIF
-
getQueryString
-
getQueryDescriptor
-
createQuery
public QueryIF createQuery(String name, RDBMSAccess access, ObjectAccessIF oaccess, AccessRegistrarIF registrar) -
createQuery
public QueryIF createQuery(JDOQuery jdoquery, RDBMSAccess access, ObjectAccessIF oaccess, AccessRegistrarIF registrar, boolean lookup_identities) -
getSQLGenerator
-
getConnectionFactory
-
clearCache
public void clearCache() -
clearCache
-
getMetrics
PUBLIC: provides proxy access to aRDBMSMetricsIFobject that provides access to the metrics regarding this storage.- Returns:
- A
RDBMSMetricsIFobject
-
writeReport
public void writeReport(Writer out, TopicMapReferenceIF reference, IdentityIF namespace, boolean dumpCaches) throws IOException - Throws:
IOException
-
objectMerged
INTERNAL: Propagates committed merges to other active transactions.- Parameters:
source- Identity of the merge source objecttarget- Identity of the merge target objectcause- The transaction that committed the merge- Since:
- 5.4.0
-
getActiveTransactionCount
public int getActiveTransactionCount() -
transactionClosed
-
getTransactions
INTERNAL: exposes the set of active transactions.- Since:
- 5.4.0
-
getNonTransactionalReadConnection
-
touch
-
getNonTransactionalReadConnectionCount
public int getNonTransactionalReadConnectionCount()
-