public class HibernateNaturalIdRegion extends HibernateTransactionalDataRegion implements org.hibernate.cache.spi.NaturalIdRegion
NaturalIdRegion. This region is used to store naturalId data.
L2 cache for entity naturalId and target cache region can be set using annotations:
@javax.persistence.Entity
@javax.persistence.Cacheable
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@org.hibernate.annotations.NaturalIdCache
public class Entity {
@org.hibernate.annotations.NaturalId
private String entityCode;
...
}
cache, factory, ignite| Constructor and Description |
|---|
HibernateNaturalIdRegion(HibernateRegionFactory factory,
String name,
Ignite ignite,
HibernateCacheProxy cache,
org.hibernate.cache.spi.CacheDataDescription dataDesc) |
| Modifier and Type | Method and Description |
|---|---|
org.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy |
buildAccessStrategy(org.hibernate.cache.spi.access.AccessType accessType) |
getCacheDataDescription, isTransactionAwarecontains, destroy, getElementCountInMemory, getElementCountOnDisk, getName, getSizeInMemory, getTimeout, nextTimestamp, toMapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic HibernateNaturalIdRegion(HibernateRegionFactory factory, String name, Ignite ignite, HibernateCacheProxy cache, org.hibernate.cache.spi.CacheDataDescription dataDesc)
factory - Region factory.name - Region name.ignite - Grid.cache - Region cache,dataDesc - Region data description.public org.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy buildAccessStrategy(org.hibernate.cache.spi.access.AccessType accessType)
throws org.hibernate.cache.CacheException
buildAccessStrategy in interface org.hibernate.cache.spi.NaturalIdRegionorg.hibernate.cache.CacheException
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019