org.hibernate.cache.impl.bridge

Class BaseGeneralDataRegionAdapter

Implemented Interfaces:
GeneralDataRegion, Region
Known Direct Subclasses:
QueryResultsRegionAdapter, TimestampsRegionAdapter

public abstract class BaseGeneralDataRegionAdapter
extends BaseRegionAdapter
implements GeneralDataRegion

Author:
Steve Ebersole

Field Summary

Fields inherited from class org.hibernate.cache.impl.bridge.BaseRegionAdapter

settings, underlyingCache

Constructor Summary

BaseGeneralDataRegionAdapter(Cache underlyingCache, Settings settings)

Method Summary

void
evict(Object key)
Evict an item from the cache immediately (without regard for transaction isolation).
void
evictAll()
Evict all contents of this particular cache region (without regard for transaction isolation).
Object
get(Object key)
Get an item from the cache.
void
put(Object key, Object value)
Put an item into the cache.

Methods inherited from class org.hibernate.cache.impl.bridge.BaseRegionAdapter

clear, destroy, getElementCountInMemory, getElementCountOnDisk, getName, getSizeInMemory, getTimeout, nextTimestamp, toMap

Constructor Details

BaseGeneralDataRegionAdapter

protected BaseGeneralDataRegionAdapter(Cache underlyingCache,
                                       Settings settings)

Method Details

evict

public void evict(Object key)
            throws CacheException
Evict an item from the cache immediately (without regard for transaction isolation).
Specified by:
evict in interface GeneralDataRegion
Parameters:
key - The key of the item to remove
Throws:
CacheException - Indicates a problem accessing the item or region.

evictAll

public void evictAll()
            throws CacheException
Evict all contents of this particular cache region (without regard for transaction isolation).
Specified by:
evictAll in interface GeneralDataRegion
Throws:
CacheException - Indicates problem accessing the region.

get

public Object get(Object key)
            throws CacheException
Get an item from the cache.
Specified by:
get in interface GeneralDataRegion
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

public void put(Object key,
                Object value)
            throws CacheException
Put an item into the cache.
Specified by:
put in interface GeneralDataRegion
Parameters:
key - The key under which to cache the item.
value - The item to cache.
Throws:
CacheException - Indicates a problem accessing the region.