com.atlassian.confluence.cache.tangosol.hibernate
Class DefaultInvokableHibernateCache

java.lang.Object
  extended by com.atlassian.confluence.cache.tangosol.hibernate.DefaultInvokableHibernateCache
All Implemented Interfaces:
InvokableHibernateCache, net.sf.hibernate.cache.Cache

public class DefaultInvokableHibernateCache
extends Object
implements InvokableHibernateCache

This is just a wrapper around caches that only implement net.sf.hibernate.Cache but not InvokableHibernateCache. It wraps calls to {$link #invoke(Object, EntryProcessor) in a loc/unlock block.


Constructor Summary
DefaultInvokableHibernateCache(net.sf.hibernate.cache.Cache cache)
           
 
Method Summary
 void clear()
           
 void destroy()
           
 Object get(Object key)
           
 int getTimeout()
           
 Object invoke(Object key, com.tangosol.util.InvocableMap.EntryProcessor processor)
           
 void lock(Object key)
           
 long nextTimestamp()
           
 void put(Object key, Object value)
           
 void remove(Object key)
           
 void unlock(Object key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultInvokableHibernateCache

public DefaultInvokableHibernateCache(net.sf.hibernate.cache.Cache cache)
Method Detail

invoke

public Object invoke(Object key,
                     com.tangosol.util.InvocableMap.EntryProcessor processor)
              throws net.sf.hibernate.cache.CacheException
Specified by:
invoke in interface InvokableHibernateCache
Throws:
net.sf.hibernate.cache.CacheException

clear

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

destroy

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

get

public Object get(Object key)
           throws net.sf.hibernate.cache.CacheException
Specified by:
get in interface net.sf.hibernate.cache.Cache
Throws:
net.sf.hibernate.cache.CacheException

getTimeout

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

lock

public void lock(Object key)
          throws net.sf.hibernate.cache.CacheException
Specified by:
lock in interface net.sf.hibernate.cache.Cache
Throws:
net.sf.hibernate.cache.CacheException

nextTimestamp

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

put

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

remove

public void remove(Object key)
            throws net.sf.hibernate.cache.CacheException
Specified by:
remove in interface net.sf.hibernate.cache.Cache
Throws:
net.sf.hibernate.cache.CacheException

unlock

public void unlock(Object key)
            throws net.sf.hibernate.cache.CacheException
Specified by:
unlock in interface net.sf.hibernate.cache.Cache
Throws:
net.sf.hibernate.cache.CacheException


Copyright © 2003-2010 Atlassian. All Rights Reserved.