Package org.hibernate.cache
Interface GeneralDataRegion
- All Superinterfaces:
Region
- All Known Subinterfaces:
QueryResultsRegion,TimestampsRegion
- All Known Implementing Classes:
BaseGeneralDataRegionAdapter,QueryResultsRegionAdapter,TimestampsRegionAdapter
Contract for general-purpose cache regions.
-
Method Summary
Modifier and TypeMethodDescriptionvoidEvict an item from the cache immediately (without regard for transaction isolation).voidevictAll()Evict all contents of this particular cache region (without regard for transaction isolation).Get an item from the cache.voidPut an item into the cache.Methods inherited from interface org.hibernate.cache.Region
contains, destroy, getElementCountInMemory, getElementCountOnDisk, getName, getSizeInMemory, getTimeout, nextTimestamp, toMap
-
Method Details
-
get
Get an item from the cache.- Parameters:
key- The key of the item to be retrieved.- Returns:
- the cached object or null
- Throws:
CacheException- Indicates a problem accessing the item or region.
-
put
Put an item into the cache.- Parameters:
key- The key under which to cache the item.value- The item to cache.- Throws:
CacheException- Indicates a problem accessing the region.
-
evict
Evict an item from the cache immediately (without regard for transaction isolation).- Parameters:
key- The key of the item to remove- Throws:
CacheException- Indicates a problem accessing the item or region.
-
evictAll
Evict all contents of this particular cache region (without regard for transaction isolation).- Throws:
CacheException- Indicates problem accessing the region.
-