org.norther.tammi.root.hbm.cache
Class HibernateCacheAdapter
java.lang.Object
org.norther.tammi.root.db.cache.FactoryCacheAdapter<Object,Object>
org.norther.tammi.root.hbm.cache.HibernateCacheAdapter
- All Implemented Interfaces:
- Cache
public class HibernateCacheAdapter
- extends FactoryCacheAdapter<Object,Object>
- implements Cache
An adapter to the Hibernate factory cache.
- Version:
- $Id: HibernateCacheAdapter.java,v 1.4 2009/09/28 15:08:34 cvsimp Exp $
- Author:
- Ilkka Priha
HibernateCacheAdapter
public HibernateCacheAdapter(String region,
String alias,
Properties props)
- Constructs a new adapter.
- Parameters:
region
- the region name.alias
- the connection alias.props
- the configuration properties.
getRegionName
public String getRegionName()
- Specified by:
getRegionName
in interface Cache
read
public Object read(Object key)
throws CacheException
- Specified by:
read
in interface Cache
- Throws:
CacheException
get
public Object get(Object key)
throws CacheException
- Specified by:
get
in interface Cache
- Throws:
CacheException
update
public void update(Object key,
Object value)
throws CacheException
- Specified by:
update
in interface Cache
- Throws:
CacheException
put
public void put(Object key,
Object value)
throws CacheException
- Specified by:
put
in interface Cache
- Throws:
CacheException
remove
public void remove(Object key)
throws CacheException
- Specified by:
remove
in interface Cache
- Throws:
CacheException
clear
public void clear()
throws CacheException
- Specified by:
clear
in interface Cache
- Throws:
CacheException
destroy
public void destroy()
throws CacheException
- Specified by:
destroy
in interface Cache
- Throws:
CacheException
lock
public void lock(Object key)
throws CacheException
- Specified by:
lock
in interface Cache
- Throws:
CacheException
unlock
public void unlock(Object key)
throws CacheException
- Specified by:
unlock
in interface Cache
- Throws:
CacheException
nextTimestamp
public long nextTimestamp()
- Specified by:
nextTimestamp
in interface Cache
getTimeout
public int getTimeout()
- Specified by:
getTimeout
in interface Cache
getSizeInMemory
public long getSizeInMemory()
- Specified by:
getSizeInMemory
in interface Cache
getElementCountInMemory
public long getElementCountInMemory()
- Specified by:
getElementCountInMemory
in interface Cache
getElementCountOnDisk
public long getElementCountOnDisk()
- Specified by:
getElementCountOnDisk
in interface Cache
toMap
public Map<?,?> toMap()
- Specified by:
toMap
in interface Cache
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2004 The Norther Organization. All rights reserved.