Package org.redisson.hibernate.region
Class BaseRegion
- java.lang.Object
-
- org.redisson.hibernate.region.BaseRegion
-
- All Implemented Interfaces:
org.hibernate.cache.spi.GeneralDataRegion,org.hibernate.cache.spi.Region,org.hibernate.cache.spi.TransactionalDataRegion
- Direct Known Subclasses:
RedissonCollectionRegion,RedissonEntityRegion,RedissonNaturalIdRegion,RedissonQueryRegion,RedissonTimestampsRegion
public class BaseRegion extends Object implements org.hibernate.cache.spi.TransactionalDataRegion, org.hibernate.cache.spi.GeneralDataRegion
- Author:
- Nikita Koksharov
-
-
Constructor Summary
Constructors Constructor Description BaseRegion(RMapCache<Object,Object> mapCache, ConnectionManager connectionManager, org.hibernate.cache.spi.RegionFactory regionFactory, org.hibernate.cache.spi.CacheDataDescription metadata, Properties properties, String defaultKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(Object key)voiddestroy()voidevict(Object key)voidevictAll()Objectget(org.hibernate.engine.spi.SessionImplementor session, Object key)org.hibernate.cache.spi.CacheDataDescriptiongetCacheDataDescription()longgetElementCountInMemory()longgetElementCountOnDisk()StringgetName()longgetSizeInMemory()intgetTimeout()booleanisTransactionAware()longnextTimestamp()voidput(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value)Map<?,?>toMap()
-
-
-
Constructor Detail
-
BaseRegion
public BaseRegion(RMapCache<Object,Object> mapCache, ConnectionManager connectionManager, org.hibernate.cache.spi.RegionFactory regionFactory, org.hibernate.cache.spi.CacheDataDescription metadata, Properties properties, String defaultKey)
-
-
Method Detail
-
isTransactionAware
public boolean isTransactionAware()
- Specified by:
isTransactionAwarein interfaceorg.hibernate.cache.spi.TransactionalDataRegion
-
getCacheDataDescription
public org.hibernate.cache.spi.CacheDataDescription getCacheDataDescription()
- Specified by:
getCacheDataDescriptionin interfaceorg.hibernate.cache.spi.TransactionalDataRegion
-
getName
public String getName()
- Specified by:
getNamein interfaceorg.hibernate.cache.spi.Region
-
destroy
public void destroy() throws org.hibernate.cache.CacheException- Specified by:
destroyin interfaceorg.hibernate.cache.spi.Region- Throws:
org.hibernate.cache.CacheException
-
contains
public boolean contains(Object key)
- Specified by:
containsin interfaceorg.hibernate.cache.spi.Region
-
getSizeInMemory
public long getSizeInMemory()
- Specified by:
getSizeInMemoryin interfaceorg.hibernate.cache.spi.Region
-
getElementCountInMemory
public long getElementCountInMemory()
- Specified by:
getElementCountInMemoryin interfaceorg.hibernate.cache.spi.Region
-
getElementCountOnDisk
public long getElementCountOnDisk()
- Specified by:
getElementCountOnDiskin interfaceorg.hibernate.cache.spi.Region
-
toMap
public Map<?,?> toMap()
- Specified by:
toMapin interfaceorg.hibernate.cache.spi.Region
-
nextTimestamp
public long nextTimestamp()
- Specified by:
nextTimestampin interfaceorg.hibernate.cache.spi.Region
-
getTimeout
public int getTimeout()
- Specified by:
getTimeoutin interfaceorg.hibernate.cache.spi.Region
-
get
public Object get(org.hibernate.engine.spi.SessionImplementor session, Object key) throws org.hibernate.cache.CacheException
- Specified by:
getin interfaceorg.hibernate.cache.spi.GeneralDataRegion- Throws:
org.hibernate.cache.CacheException
-
put
public void put(org.hibernate.engine.spi.SessionImplementor session, Object key, Object value) throws org.hibernate.cache.CacheException- Specified by:
putin interfaceorg.hibernate.cache.spi.GeneralDataRegion- Throws:
org.hibernate.cache.CacheException
-
evict
public void evict(Object key) throws org.hibernate.cache.CacheException
- Specified by:
evictin interfaceorg.hibernate.cache.spi.GeneralDataRegion- Throws:
org.hibernate.cache.CacheException
-
evictAll
public void evictAll() throws org.hibernate.cache.CacheException- Specified by:
evictAllin interfaceorg.hibernate.cache.spi.GeneralDataRegion- Throws:
org.hibernate.cache.CacheException
-
-