Class RDBMSStorage

java.lang.Object
net.ontopia.persistence.proxy.RDBMSStorage
All Implemented Interfaces:
StorageIF

public class RDBMSStorage extends Object implements StorageIF
INTERNAL: A storage definition implementation for relational databases.
  • Field Details

  • Constructor Details

    • RDBMSStorage

      public RDBMSStorage() throws IOException
      INTERNAL: Creates a storage definition which gets its settings from system variables.
      Throws:
      IOException
    • RDBMSStorage

      public RDBMSStorage(String propfile) throws IOException
      INTERNAL: Creates a storage definition that reads its settings from the specified property file.
      Throws:
      IOException
    • RDBMSStorage

      public RDBMSStorage(Map<String,String> properties) throws IOException
      INTERNAL: Creates a storage definition that reads its settings from the specified properties.
      Throws:
      IOException
      Since:
      1.2.4
  • Method Details

    • getInputStream

      protected InputStream getInputStream(String property, String filename) throws IOException
      Throws:
      IOException
    • init

      protected void init(Map<String,String> properties) throws IOException
      INTERNAL: Method shared by constructors to properly initialize members.
      Throws:
      IOException
    • getMapping

      public RDBMSMapping getMapping()
      Description copied from interface: StorageIF
      INTERNAL: Returns the optimized object relational mapping declaration.
      Specified by:
      getMapping in interface StorageIF
    • getQueryDeclarations

      public QueryDeclarations getQueryDeclarations()
    • generateIdentity

      public IdentityIF generateIdentity(Class<?> type)
    • getProperties

      public Map<String,String> getProperties()
      Description copied from interface: StorageIF
      INTERNAL: Gets the properties held by the storage.
      Specified by:
      getProperties in interface StorageIF
    • getProperty

      public String getProperty(String property)
      Description copied from interface: StorageIF
      INTERNAL: Gets the value of the specified storage property.
      Specified by:
      getProperty in interface StorageIF
    • getProperty

      public String getProperty(String property, String default_value)
    • createAccess

      public StorageAccessIF createAccess(boolean readonly)
    • createTransaction

      public TransactionIF createTransaction(boolean readonly)
      Description copied from interface: StorageIF
      INTERNAL: Creates a new storage access instance.
      Specified by:
      createTransaction in interface StorageIF
    • isSharedCache

      public boolean isSharedCache()
      Description copied from interface: StorageIF
      INTERNAL: Returns true if shared cache is enabled.
      Specified by:
      isSharedCache in interface StorageIF
    • getStorageCache

      public StorageCacheIF getStorageCache()
      Description copied from interface: StorageIF
      INTERNAL: Returns the shared storage cache, if any.
      Specified by:
      getStorageCache in interface StorageIF
    • getDatabase

      public String getDatabase()
      INTERNAL: Returns the database type.
    • getPlatforms

      public String[] getPlatforms()
      INTERNAL: Returns the database platforms.
    • close

      public void close()
      Description copied from interface: StorageIF
      INTERNAL: Closes the storage definition, which allows it to free its resources.
      Specified by:
      close in interface StorageIF
    • notifyCluster

      public void notifyCluster()
      Description copied from interface: StorageIF
      INTERNAL: Notify cluster that transaction has been committed, so that batched cluster events can be broadcasted.
      Specified by:
      notifyCluster in interface StorageIF
    • getHelperObject

      public EvictableIF getHelperObject(int identifier, IdentityIF namespace)
      Description copied from interface: StorageIF
      INTERNAL: Returns the shared caches.
      Specified by:
      getHelperObject in interface StorageIF
    • getQueryString

      public String getQueryString(String name)
    • getQueryDescriptor

      protected QueryDescriptor getQueryDescriptor(String name)
    • 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

      public SQLGeneratorIF getSQLGenerator()
    • getConnectionFactory

      public ConnectionFactoryIF getConnectionFactory(boolean readonly)
    • clearCache

      public void clearCache()
    • clearCache

      public void clearCache(IdentityIF namespace)
    • getMetrics

      public RDBMSMetricsIF getMetrics()
      PUBLIC: provides proxy access to a RDBMSMetricsIF object that provides access to the metrics regarding this storage.
      Returns:
      A RDBMSMetricsIF object
    • writeReport

      public void writeReport(Writer out, TopicMapReferenceIF reference, IdentityIF namespace, boolean dumpCaches) throws IOException
      Throws:
      IOException
    • objectMerged

      public void objectMerged(IdentityIF source, IdentityIF target, AbstractTransaction cause)
      INTERNAL: Propagates committed merges to other active transactions.
      Parameters:
      source - Identity of the merge source object
      target - Identity of the merge target object
      cause - The transaction that committed the merge
      Since:
      5.4.0
    • getActiveTransactionCount

      public int getActiveTransactionCount()
    • transactionClosed

      protected void transactionClosed(AbstractTransaction transaction)
    • getTransactions

      public Set<AbstractTransaction> getTransactions()
      INTERNAL: exposes the set of active transactions.
      Since:
      5.4.0
    • getNonTransactionalReadConnection

      protected Connection getNonTransactionalReadConnection()
    • touch

      protected void touch(Connection connection)
    • getNonTransactionalReadConnectionCount

      public int getNonTransactionalReadConnectionCount()