Class GridGainJdbcRegionFactory

java.lang.Object
org.hibernate.cache.spi.AbstractRegionFactory
org.hibernate.cache.spi.support.RegionFactoryTemplate
org.gridgain.hibernate.cache.GridGainJdbcRegionFactory
All Implemented Interfaces:
Serializable, org.hibernate.cache.spi.RegionFactory, org.hibernate.service.Service, org.hibernate.service.spi.Stoppable

public class GridGainJdbcRegionFactory extends org.hibernate.cache.spi.support.RegionFactoryTemplate
Hibernate L2/query cache region factory that persists cache entries in a GridGain table through JDBC.

Cache entries are stored in a HIBERNATE_L2_CACHE table with columns (region VARCHAR, cache_key VARBINARY, cache_val VARBINARY). The table is created automatically on startup if it does not exist.

Configuration is taken from standard Hibernate connection properties:

  • hibernate.connection.url — JDBC URL (required)
  • hibernate.connection.driver_class — JDBC driver class (optional)
  • hibernate.connection.username / hibernate.connection.password — credentials (optional)

Experimental — this module is provided as-is and may change in future releases.

See Also:
  • Field Summary

    Fields inherited from class org.hibernate.cache.spi.AbstractRegionFactory

    LEGACY_QUERY_RESULTS_REGION_UNQUALIFIED_NAMES, LEGACY_UPDATE_TIMESTAMPS_REGION_UNQUALIFIED_NAMES

    Fields inherited from interface org.hibernate.cache.spi.RegionFactory

    DEFAULT_QUERY_RESULTS_REGION_UNQUALIFIED_NAME, DEFAULT_UPDATE_TIMESTAMPS_REGION_UNQUALIFIED_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.hibernate.cache.spi.support.DomainDataStorageAccess
    createDomainDataStorageAccess(org.hibernate.cache.cfg.spi.DomainDataRegionConfig regionConfig, org.hibernate.cache.cfg.spi.DomainDataRegionBuildingContext buildingContext)
     
    protected org.hibernate.cache.spi.support.StorageAccess
    createQueryResultsRegionStorageAccess(String regionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory)
     
    protected org.hibernate.cache.spi.support.StorageAccess
    createTimestampsRegionStorageAccess(String regionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory)
     
    protected void
    prepareForUse(org.hibernate.boot.spi.SessionFactoryOptions settings, Map configValues)
     
    protected void
     

    Methods inherited from class org.hibernate.cache.spi.support.RegionFactoryTemplate

    buildDomainDataRegion, buildQueryResultsRegion, buildTimestampsRegion, getImplicitCacheKeysFactory

    Methods inherited from class org.hibernate.cache.spi.AbstractRegionFactory

    createTransactionContext, getDefaultAccessType, getOptions, getTimeout, isMinimalPutsEnabledByDefault, isStarted, nextTimestamp, qualify, start, stop, verifiedStartStatus, verifyStarted

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GridGainJdbcRegionFactory

      public GridGainJdbcRegionFactory()
  • Method Details

    • prepareForUse

      protected void prepareForUse(org.hibernate.boot.spi.SessionFactoryOptions settings, Map configValues)
      Specified by:
      prepareForUse in class org.hibernate.cache.spi.AbstractRegionFactory
    • releaseFromUse

      protected void releaseFromUse()
      Specified by:
      releaseFromUse in class org.hibernate.cache.spi.AbstractRegionFactory
    • createDomainDataStorageAccess

      protected org.hibernate.cache.spi.support.DomainDataStorageAccess createDomainDataStorageAccess(org.hibernate.cache.cfg.spi.DomainDataRegionConfig regionConfig, org.hibernate.cache.cfg.spi.DomainDataRegionBuildingContext buildingContext)
      Overrides:
      createDomainDataStorageAccess in class org.hibernate.cache.spi.support.RegionFactoryTemplate
    • createQueryResultsRegionStorageAccess

      protected org.hibernate.cache.spi.support.StorageAccess createQueryResultsRegionStorageAccess(String regionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory)
      Specified by:
      createQueryResultsRegionStorageAccess in class org.hibernate.cache.spi.support.RegionFactoryTemplate
    • createTimestampsRegionStorageAccess

      protected org.hibernate.cache.spi.support.StorageAccess createTimestampsRegionStorageAccess(String regionName, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory)
      Specified by:
      createTimestampsRegionStorageAccess in class org.hibernate.cache.spi.support.RegionFactoryTemplate