Package net.sf.ehcache.hibernate.ccs
Class EhcacheReadOnlyCache
- java.lang.Object
-
- net.sf.ehcache.hibernate.ccs.EhcacheReadOnlyCache
-
- All Implemented Interfaces:
org.hibernate.cache.CacheConcurrencyStrategy
@Deprecated public class EhcacheReadOnlyCache extends java.lang.ObjectDeprecated.Ehcache specific read-only cache concurrency strategy.This is the Ehcache specific equivalent to Hibernate's ReadOnlyCache.
- Author:
- Chris Dennis
-
-
Constructor Summary
Constructors Constructor Description EhcacheReadOnlyCache()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanafterInsert(java.lang.Object key, java.lang.Object value, java.lang.Object version)Deprecated.Inserts the specified item into the cache.booleanafterUpdate(java.lang.Object key, java.lang.Object value, java.lang.Object version, org.hibernate.cache.access.SoftLock lock)Deprecated.Throws UnsupportedOperationException since items in a read-only cache should not be mutated.voidclear()Deprecated.voiddestroy()Deprecated.voidevict(java.lang.Object key)Deprecated.A No-Op, since we are an asynchronous cache concurrency strategy.java.lang.Objectget(java.lang.Object key, long timestamp)Deprecated.org.hibernate.cache.CachegetCache()Deprecated.java.lang.StringgetRegionName()Deprecated.booleaninsert(java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion)Deprecated.A No-Op, since we are an asynchronous cache concurrency strategy.org.hibernate.cache.access.SoftLocklock(java.lang.Object key, java.lang.Object version)Deprecated.Throws UnsupportedOperationException since items in a read-only cache should not be mutated.booleanput(java.lang.Object key, java.lang.Object value, long timestamp, java.lang.Object version, java.util.Comparator versionComparator, boolean minimalPut)Deprecated.voidrelease(java.lang.Object key, org.hibernate.cache.access.SoftLock lock)Deprecated.Logs an error since items in a read-only cache should not be mutated.voidremove(java.lang.Object key)Deprecated.voidsetCache(org.hibernate.cache.Cache cache)Deprecated.java.lang.StringtoString()Deprecated.booleanupdate(java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion, java.lang.Object previousVersion)Deprecated.Throws UnsupportedOperationException since items in a read-only cache should not be mutated.
-
-
-
Field Detail
-
cache
protected EhCache cache
Deprecated.Ehcache instance this strategy accesses.
-
-
Method Detail
-
get
public java.lang.Object get(java.lang.Object key, long timestamp) throws org.hibernate.cache.CacheExceptionDeprecated.- Throws:
org.hibernate.cache.CacheException
-
lock
public org.hibernate.cache.access.SoftLock lock(java.lang.Object key, java.lang.Object version) throws java.lang.UnsupportedOperationExceptionDeprecated.Throws UnsupportedOperationException since items in a read-only cache should not be mutated.- Throws:
java.lang.UnsupportedOperationException- always
-
put
public boolean put(java.lang.Object key, java.lang.Object value, long timestamp, java.lang.Object version, java.util.Comparator versionComparator, boolean minimalPut) throws org.hibernate.cache.CacheExceptionDeprecated.- Throws:
org.hibernate.cache.CacheException
-
release
public void release(java.lang.Object key, org.hibernate.cache.access.SoftLock lock)Deprecated.Logs an error since items in a read-only cache should not be mutated.
-
afterUpdate
public boolean afterUpdate(java.lang.Object key, java.lang.Object value, java.lang.Object version, org.hibernate.cache.access.SoftLock lock) throws java.lang.UnsupportedOperationExceptionDeprecated.Throws UnsupportedOperationException since items in a read-only cache should not be mutated.- Throws:
java.lang.UnsupportedOperationException- always
-
afterInsert
public boolean afterInsert(java.lang.Object key, java.lang.Object value, java.lang.Object version) throws org.hibernate.cache.CacheExceptionDeprecated.Inserts the specified item into the cache.- Throws:
org.hibernate.cache.CacheException
-
evict
public void evict(java.lang.Object key) throws org.hibernate.cache.CacheExceptionDeprecated.A No-Op, since we are an asynchronous cache concurrency strategy.- Throws:
org.hibernate.cache.CacheException
-
insert
public boolean insert(java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion)Deprecated.A No-Op, since we are an asynchronous cache concurrency strategy.
-
update
public boolean update(java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion, java.lang.Object previousVersion) throws java.lang.UnsupportedOperationExceptionDeprecated.Throws UnsupportedOperationException since items in a read-only cache should not be mutated.- Throws:
java.lang.UnsupportedOperationException- always
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
setCache
public final void setCache(org.hibernate.cache.Cache cache) throws org.hibernate.cache.CacheExceptionDeprecated.- Specified by:
setCachein interfaceorg.hibernate.cache.CacheConcurrencyStrategy- Throws:
org.hibernate.cache.CacheException- if the underlying cache is not an Ehcache
-
getCache
public final org.hibernate.cache.Cache getCache()
Deprecated.- Specified by:
getCachein interfaceorg.hibernate.cache.CacheConcurrencyStrategy
-
getRegionName
public final java.lang.String getRegionName()
Deprecated.- Specified by:
getRegionNamein interfaceorg.hibernate.cache.CacheConcurrencyStrategy
-
remove
public final void remove(java.lang.Object key) throws org.hibernate.cache.CacheExceptionDeprecated.- Specified by:
removein interfaceorg.hibernate.cache.CacheConcurrencyStrategy- Throws:
org.hibernate.cache.CacheException
-
clear
public final void clear() throws org.hibernate.cache.CacheExceptionDeprecated.- Specified by:
clearin interfaceorg.hibernate.cache.CacheConcurrencyStrategy- Throws:
org.hibernate.cache.CacheException
-
destroy
public final void destroy()
Deprecated.- Specified by:
destroyin interfaceorg.hibernate.cache.CacheConcurrencyStrategy
-
-