org.infinispan.loaders.jdbm
Class JdbmCacheStore
java.lang.Object
org.infinispan.loaders.AbstractCacheLoader
org.infinispan.loaders.AbstractCacheStore
org.infinispan.loaders.jdbm.JdbmCacheStore
- All Implemented Interfaces:
- CacheLoader, CacheStore
@ThreadSafe
public class JdbmCacheStore
- extends AbstractCacheStore
A persistent CacheLoader based on the JDBM project. See http://jdbm.sourceforge.net/ . Does not support
transaction isolation.
Supports removal of expired entries.
It would probably be better if meta-data (expiry time) was stored independent of the value of the entry. That is, if
(key,"m") == meta and (key,"v") == value.
- Version:
- $Id: JdbmCacheLoader.java 7261 2008-12-07 18:53:38Z genman $
- Author:
- Elias Ross
JdbmCacheStore
public JdbmCacheStore()
getConfigurationClass
public Class<? extends CacheLoaderConfig> getConfigurationClass()
init
public void init(CacheLoaderConfig clc,
Cache cache,
Marshaller m)
- Specified by:
init in interface CacheLoader- Overrides:
init in class AbstractCacheStore
start
public void start()
throws CacheLoaderException
- Specified by:
start in interface CacheLoader- Overrides:
start in class AbstractCacheStore
- Throws:
CacheLoaderException
load
public InternalCacheEntry load(Object key)
throws CacheLoaderException
- Throws:
CacheLoaderException
loadAll
public Set<InternalCacheEntry> loadAll()
throws CacheLoaderException
- Throws:
CacheLoaderException
stop
public void stop()
- Closes all databases, ignoring exceptions, and nulls references to all database related information.
- Specified by:
stop in interface CacheLoader- Overrides:
stop in class AbstractCacheStore
clear
public void clear()
throws CacheLoaderException
- Throws:
CacheLoaderException
remove
public boolean remove(Object key)
throws CacheLoaderException
- Throws:
CacheLoaderException
remove0
public boolean remove0(Object key)
throws CacheLoaderException
- Throws:
CacheLoaderException
store
public void store(InternalCacheEntry entry)
throws CacheLoaderException
- Throws:
CacheLoaderException
toStream
public void toStream(ObjectOutput out)
throws CacheLoaderException
- Writes to a stream the number of entries (long) then the entries themselves.
- Throws:
CacheLoaderException
fromStream
public void fromStream(ObjectInput in)
throws CacheLoaderException
- Reads from a stream the number of entries (long) then the entries themselves.
- Throws:
CacheLoaderException
purgeInternal
protected void purgeInternal()
throws CacheLoaderException
- Purge expired entries.
- Overrides:
purgeInternal in class AbstractCacheStore
- Throws:
CacheLoaderException
applyModifications
protected void applyModifications(List<? extends Modification> mods)
throws CacheLoaderException
- Overrides:
applyModifications in class AbstractCacheStore
- Throws:
CacheLoaderException
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.