com.hazelcast.hibernate.region
Class HazelcastNaturalIdRegion
java.lang.Object
com.hazelcast.hibernate.region.AbstractTransactionalDataRegion<IMapRegionCache>
com.hazelcast.hibernate.region.HazelcastNaturalIdRegion
- All Implemented Interfaces:
- HazelcastRegion<IMapRegionCache>, org.hibernate.cache.spi.NaturalIdRegion, org.hibernate.cache.spi.Region, org.hibernate.cache.spi.TransactionalDataRegion
public class HazelcastNaturalIdRegion
- extends AbstractTransactionalDataRegion<IMapRegionCache>
- implements org.hibernate.cache.spi.NaturalIdRegion
Hazelcast based implementation used to store NaturalIds
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.hibernate.cache.spi.TransactionalDataRegion |
getCacheDataDescription, isTransactionAware |
Methods inherited from interface org.hibernate.cache.spi.Region |
contains, destroy, getElementCountInMemory, getElementCountOnDisk, getName, getSizeInMemory, getTimeout, nextTimestamp, toMap |
props
protected final Properties props
HazelcastNaturalIdRegion
public HazelcastNaturalIdRegion(HazelcastInstance instance,
String regionName,
Properties props,
org.hibernate.cache.spi.CacheDataDescription metadata)
buildAccessStrategy
public org.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy buildAccessStrategy(org.hibernate.cache.spi.access.AccessType accessType)
throws org.hibernate.cache.CacheException
- Specified by:
buildAccessStrategy
in interface org.hibernate.cache.spi.NaturalIdRegion
- Throws:
org.hibernate.cache.CacheException
destroy
public void destroy()
throws org.hibernate.cache.CacheException
- Throws:
org.hibernate.cache.CacheException
getElementCountInMemory
public long getElementCountInMemory()
- Returns:
- The size of the internal
IMap
.
getElementCountOnDisk
public long getElementCountOnDisk()
- Hazelcast does not support pushing elements to disk.
- Returns:
- -1 this value means "unsupported"
getName
public String getName()
- Returns:
- The name of the region.
getSizeInMemory
public long getSizeInMemory()
- Returns:
- a rough estimate of number of bytes used by this region.
getTimeout
public final int getTimeout()
nextTimestamp
public final long nextTimestamp()
toMap
public Map toMap()
- Appears to be used only by
org.hibernate.stat.SecondLevelCacheStatistics
.
- Returns:
- the internal
IMap
used for this region.
contains
public boolean contains(Object key)
getInstance
public final HazelcastInstance getInstance()
- Specified by:
getInstance
in interface HazelcastRegion<Cache extends RegionCache>
getLogger
public final ILogger getLogger()
- Specified by:
getLogger
in interface HazelcastRegion<Cache extends RegionCache>
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.