com.liferay.portal.dao.orm.hibernate
Class CacheWrapper

java.lang.Object
  extended by com.liferay.portal.dao.orm.hibernate.CacheWrapper
All Implemented Interfaces:
com.liferay.portal.kernel.cache.CacheRegistryItem, org.hibernate.cache.Cache

public class CacheWrapper
extends java.lang.Object
implements org.hibernate.cache.Cache, com.liferay.portal.kernel.cache.CacheRegistryItem

View Source

Author:
Brian Wing Shun Chan

Constructor Summary
CacheWrapper(org.hibernate.cache.Cache cache)
           
 
Method Summary
 void clear()
           
 void destroy()
           
 java.lang.Object get(java.lang.Object key)
           
 long getElementCountInMemory()
           
 long getElementCountOnDisk()
           
 java.lang.String getRegionName()
           
 java.lang.String getRegistryName()
           
 long getSizeInMemory()
           
 int getTimeout()
           
 void invalidate()
           
 void lock(java.lang.Object key)
           
 long nextTimestamp()
           
 void put(java.lang.Object key, java.lang.Object value)
           
 java.lang.Object read(java.lang.Object key)
           
 void remove(java.lang.Object key)
           
 java.util.Map toMap()
           
 void unlock(java.lang.Object key)
           
 void update(java.lang.Object key, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheWrapper

public CacheWrapper(org.hibernate.cache.Cache cache)
Method Detail

clear

public void clear()
           throws org.hibernate.cache.CacheException
Specified by:
clear in interface org.hibernate.cache.Cache
Throws:
org.hibernate.cache.CacheException

destroy

public void destroy()
             throws org.hibernate.cache.CacheException
Specified by:
destroy in interface org.hibernate.cache.Cache
Throws:
org.hibernate.cache.CacheException

get

public java.lang.Object get(java.lang.Object key)
                     throws org.hibernate.cache.CacheException
Specified by:
get in interface org.hibernate.cache.Cache
Throws:
org.hibernate.cache.CacheException

getElementCountInMemory

public long getElementCountInMemory()
Specified by:
getElementCountInMemory in interface org.hibernate.cache.Cache

getElementCountOnDisk

public long getElementCountOnDisk()
Specified by:
getElementCountOnDisk in interface org.hibernate.cache.Cache

getRegionName

public java.lang.String getRegionName()
Specified by:
getRegionName in interface org.hibernate.cache.Cache

getRegistryName

public java.lang.String getRegistryName()
Specified by:
getRegistryName in interface com.liferay.portal.kernel.cache.CacheRegistryItem

getSizeInMemory

public long getSizeInMemory()
Specified by:
getSizeInMemory in interface org.hibernate.cache.Cache

getTimeout

public int getTimeout()
Specified by:
getTimeout in interface org.hibernate.cache.Cache

lock

public void lock(java.lang.Object key)
          throws org.hibernate.cache.CacheException
Specified by:
lock in interface org.hibernate.cache.Cache
Throws:
org.hibernate.cache.CacheException

nextTimestamp

public long nextTimestamp()
Specified by:
nextTimestamp in interface org.hibernate.cache.Cache

put

public void put(java.lang.Object key,
                java.lang.Object value)
         throws org.hibernate.cache.CacheException
Specified by:
put in interface org.hibernate.cache.Cache
Throws:
org.hibernate.cache.CacheException

read

public java.lang.Object read(java.lang.Object key)
                      throws org.hibernate.cache.CacheException
Specified by:
read in interface org.hibernate.cache.Cache
Throws:
org.hibernate.cache.CacheException

remove

public void remove(java.lang.Object key)
            throws org.hibernate.cache.CacheException
Specified by:
remove in interface org.hibernate.cache.Cache
Throws:
org.hibernate.cache.CacheException

toMap

public java.util.Map toMap()
Specified by:
toMap in interface org.hibernate.cache.Cache

unlock

public void unlock(java.lang.Object key)
            throws org.hibernate.cache.CacheException
Specified by:
unlock in interface org.hibernate.cache.Cache
Throws:
org.hibernate.cache.CacheException

update

public void update(java.lang.Object key,
                   java.lang.Object value)
            throws org.hibernate.cache.CacheException
Specified by:
update in interface org.hibernate.cache.Cache
Throws:
org.hibernate.cache.CacheException

invalidate

public void invalidate()
Specified by:
invalidate in interface com.liferay.portal.kernel.cache.CacheRegistryItem