|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.cache.ReadOnlyCache
Caches data that is never updated.
CacheConcurrencyStrategy
Nested Class Summary |
Nested classes inherited from class org.hibernate.cache.CacheConcurrencyStrategy |
CacheConcurrencyStrategy.SoftLock |
Constructor Summary | |
ReadOnlyCache()
|
Method Summary | |
boolean |
afterInsert(Object key,
Object value,
Object version)
Do nothing. |
boolean |
afterUpdate(Object key,
Object value,
Object version,
CacheConcurrencyStrategy.SoftLock lock)
Unsupported! |
void |
clear()
Evict all items from the cache immediately. |
void |
destroy()
Clean up all resources. |
void |
evict(Object key)
Do nothing. |
Object |
get(Object key,
long timestamp)
Attempt to retrieve an object from the cache. |
Cache |
getCache()
Get the wrapped cache implementation |
String |
getRegionName()
Get the cache region name |
boolean |
insert(Object key,
Object value,
Object currentVersion)
Do nothing. |
CacheConcurrencyStrategy.SoftLock |
lock(Object key,
Object version)
Unsupported! |
boolean |
put(Object key,
Object value,
long timestamp,
Object version,
Comparator versionComparator,
boolean minimalPut)
Attempt to cache an object, after loading from the database. |
void |
release(Object key,
CacheConcurrencyStrategy.SoftLock lock)
Unsupported! |
void |
remove(Object key)
Evict an item from the cache immediately (without regard for transaction isolation). |
void |
setCache(Cache cache)
Set the underlying cache implementation. |
String |
toString()
|
boolean |
update(Object key,
Object value,
Object currentVersion,
Object previousVersion)
Unsupported! |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ReadOnlyCache()
Method Detail |
public void setCache(Cache cache)
CacheConcurrencyStrategy
setCache
in interface CacheConcurrencyStrategy
cache
- public Cache getCache()
CacheConcurrencyStrategy
getCache
in interface CacheConcurrencyStrategy
public String getRegionName()
CacheConcurrencyStrategy
getRegionName
in interface CacheConcurrencyStrategy
public Object get(Object key, long timestamp) throws CacheException
CacheConcurrencyStrategy
get
in interface CacheConcurrencyStrategy
key
- timestamp
- a timestamp prior to the transaction start time
CacheException
public CacheConcurrencyStrategy.SoftLock lock(Object key, Object version)
lock
in interface CacheConcurrencyStrategy
key
- version
- public boolean put(Object key, Object value, long timestamp, Object version, Comparator versionComparator, boolean minimalPut) throws CacheException
CacheConcurrencyStrategy
put
in interface CacheConcurrencyStrategy
key
- value
- timestamp
- a timestamp prior to the transaction start timeversion
- the item version numberversionComparator
- a comparator used to compare version numbersminimalPut
- indicates that the cache should avoid a put is the item is already cached
CacheException
public void release(Object key, CacheConcurrencyStrategy.SoftLock lock)
release
in interface CacheConcurrencyStrategy
key
- public void clear() throws CacheException
CacheConcurrencyStrategy
clear
in interface CacheConcurrencyStrategy
CacheException
public void remove(Object key) throws CacheException
CacheConcurrencyStrategy
remove
in interface CacheConcurrencyStrategy
key
-
CacheException
public void destroy()
CacheConcurrencyStrategy
destroy
in interface CacheConcurrencyStrategy
public boolean afterUpdate(Object key, Object value, Object version, CacheConcurrencyStrategy.SoftLock lock) throws CacheException
afterUpdate
in interface CacheConcurrencyStrategy
CacheException
public boolean afterInsert(Object key, Object value, Object version) throws CacheException
afterInsert
in interface CacheConcurrencyStrategy
CacheException
public void evict(Object key) throws CacheException
evict
in interface CacheConcurrencyStrategy
CacheException
public boolean insert(Object key, Object value, Object currentVersion)
insert
in interface CacheConcurrencyStrategy
public boolean update(Object key, Object value, Object currentVersion, Object previousVersion)
update
in interface CacheConcurrencyStrategy
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |