Package org.hibernate.cache.impl.bridge
Class BaseRegionAdapter
java.lang.Object
org.hibernate.cache.impl.bridge.BaseRegionAdapter
- All Implemented Interfaces:
Region
- Direct Known Subclasses:
BaseGeneralDataRegionAdapter,BaseTransactionalDataRegionAdapter
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseRegionAdapter(Cache underlyingCache, Settings settings) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleanDetermine whether this region contains data for the given key.voiddestroy()The "end state" contract of the region's lifecycle.longThe count of entries currently contained in the regions in-memory store.longThe count of entries currently contained in the regions disk store.getName()Retrieve the name of this region.longThe number of bytes is this cache region currently consuming in memory.intlongtoMap()Get the contents of this region as a map.
-
Field Details
-
underlyingCache
-
settings
-
-
Constructor Details
-
BaseRegionAdapter
-
-
Method Details
-
getName
Description copied from interface:RegionRetrieve the name of this region. -
clear
- Throws:
CacheException
-
destroy
Description copied from interface:RegionThe "end state" contract of the region's lifecycle. Called duringSessionFactory.close()to give the region a chance to cleanup.- Specified by:
destroyin interfaceRegion- Throws:
CacheException- Indicates problem shutting down
-
contains
Description copied from interface:RegionDetermine whether this region contains data for the given key. The semantic here is whether the cache contains data visible for the current call context. This should be viewed as a "best effort", meaning blocking should be avoid if possible. -
getSizeInMemory
public long getSizeInMemory()Description copied from interface:RegionThe number of bytes is this cache region currently consuming in memory.- Specified by:
getSizeInMemoryin interfaceRegion- Returns:
- The number of bytes consumed by this region; -1 if unknown or unsupported.
-
getElementCountInMemory
public long getElementCountInMemory()Description copied from interface:RegionThe count of entries currently contained in the regions in-memory store.- Specified by:
getElementCountInMemoryin interfaceRegion- Returns:
- The count of entries in memory; -1 if unknown or unsupported.
-
getElementCountOnDisk
public long getElementCountOnDisk()Description copied from interface:RegionThe count of entries currently contained in the regions disk store.- Specified by:
getElementCountOnDiskin interfaceRegion- Returns:
- The count of entries on disk; -1 if unknown or unsupported.
-
toMap
Description copied from interface:RegionGet the contents of this region as a map. Implementors which do not support this notion should simply return an empty map. -
nextTimestamp
public long nextTimestamp()- Specified by:
nextTimestampin interfaceRegion
-
getTimeout
public int getTimeout()- Specified by:
getTimeoutin interfaceRegion
-