public final class HazelcastIMapRegionFactoryWrapper extends Object implements org.hibernate.cache.spi.RegionFactory
RegionFactory which delegates through to a HazelcastCacheRegionFactory
instance, and ensures that any IMaps used by that indtance are pre-created with our desired configuration in advance.| Modifier and Type | Method and Description |
|---|---|
org.hibernate.cache.spi.CollectionRegion |
buildCollectionRegion(String regionName,
Properties properties,
org.hibernate.cache.spi.CacheDataDescription metadata) |
org.hibernate.cache.spi.EntityRegion |
buildEntityRegion(String regionName,
Properties properties,
org.hibernate.cache.spi.CacheDataDescription metadata) |
org.hibernate.cache.spi.NaturalIdRegion |
buildNaturalIdRegion(String regionName,
Properties properties,
org.hibernate.cache.spi.CacheDataDescription metadata) |
org.hibernate.cache.spi.QueryResultsRegion |
buildQueryResultsRegion(String regionName,
Properties properties) |
org.hibernate.cache.spi.TimestampsRegion |
buildTimestampsRegion(String regionName,
Properties properties) |
org.hibernate.cache.spi.access.AccessType |
getDefaultAccessType() |
protected String |
initHazelcastMap(String regionName)
Because both
HazelcastCacheRegionFactory talks directly to
the Hazelcast API to get its config, we need to pre-configure Hazelcast with our desired config first. |
boolean |
isMinimalPutsEnabledByDefault() |
long |
nextTimestamp() |
void |
start(org.hibernate.boot.spi.SessionFactoryOptions settings,
Properties properties) |
void |
stop() |
public void start(org.hibernate.boot.spi.SessionFactoryOptions settings,
Properties properties)
throws org.hibernate.cache.CacheException
start in interface org.hibernate.cache.spi.RegionFactoryorg.hibernate.cache.CacheExceptionpublic void stop()
stop in interface org.hibernate.cache.spi.RegionFactorypublic boolean isMinimalPutsEnabledByDefault()
isMinimalPutsEnabledByDefault in interface org.hibernate.cache.spi.RegionFactorypublic org.hibernate.cache.spi.access.AccessType getDefaultAccessType()
getDefaultAccessType in interface org.hibernate.cache.spi.RegionFactorypublic long nextTimestamp()
nextTimestamp in interface org.hibernate.cache.spi.RegionFactorypublic org.hibernate.cache.spi.EntityRegion buildEntityRegion(String regionName, Properties properties, org.hibernate.cache.spi.CacheDataDescription metadata) throws org.hibernate.cache.CacheException
buildEntityRegion in interface org.hibernate.cache.spi.RegionFactoryorg.hibernate.cache.CacheExceptionpublic org.hibernate.cache.spi.NaturalIdRegion buildNaturalIdRegion(String regionName, Properties properties, org.hibernate.cache.spi.CacheDataDescription metadata) throws org.hibernate.cache.CacheException
buildNaturalIdRegion in interface org.hibernate.cache.spi.RegionFactoryorg.hibernate.cache.CacheExceptionpublic org.hibernate.cache.spi.CollectionRegion buildCollectionRegion(String regionName, Properties properties, org.hibernate.cache.spi.CacheDataDescription metadata) throws org.hibernate.cache.CacheException
buildCollectionRegion in interface org.hibernate.cache.spi.RegionFactoryorg.hibernate.cache.CacheExceptionpublic org.hibernate.cache.spi.QueryResultsRegion buildQueryResultsRegion(String regionName, Properties properties) throws org.hibernate.cache.CacheException
buildQueryResultsRegion in interface org.hibernate.cache.spi.RegionFactoryorg.hibernate.cache.CacheExceptionpublic org.hibernate.cache.spi.TimestampsRegion buildTimestampsRegion(String regionName, Properties properties) throws org.hibernate.cache.CacheException
buildTimestampsRegion in interface org.hibernate.cache.spi.RegionFactoryorg.hibernate.cache.CacheExceptionprotected String initHazelcastMap(String regionName)
HazelcastCacheRegionFactory talks directly to
the Hazelcast API to get its config, we need to pre-configure Hazelcast with our desired config first. We use
atlassian-cache-hazelcast to do that. Since atlassian-cache-hazelcast prefixes the names of its Hazelcast data
structures, we need to reproduce that prefixing here, so that the delegate region factory picks up the correct
structure.
This is pretty ghaslty, obviously.
regionName - The name of the hibernate regionCopyright © 2003–2021 Atlassian. All rights reserved.