org.jboss.cache.loader.jdbm
Class JdbmCacheLoader2
java.lang.Object
org.jboss.cache.loader.AbstractCacheLoader
org.jboss.cache.loader.jdbm.JdbmCacheLoader
org.jboss.cache.loader.jdbm.JdbmCacheLoader2
All Implemented Interfaces: Lifecycle , CacheLoader
@ThreadSafe
public class JdbmCacheLoader2 extends JdbmCacheLoader
Optimized version of the JdbmCacheLoader
implementation which is better
for storing data under a single node. Speed is improved.
Data is stored using an FQN to Map association, where the depth is prefixed to the FQN:
0/ = NodeData
1/node1 = Node Data
1/node2 = Node Data
2/node2/node3 = Node Data
2/node2/node4 = Node Data
Browse operations lock the entire tree; eventually the JDBM team plans to fix this.
Version:
$Id: JdbmCacheLoader.java 7086 2008-11-05 18:39:35Z genman $
Author:
Elias Ross
Method Summary
boolean
exists (Fqn name)
Returns whether the given node exists.
Map
get (Fqn name)
Returns a map containing all key-value pairs for the given FQN, or null
if the node is not present.
Methods inherited from class org.jboss.cache.loader.jdbm.JdbmCacheLoader
checkNonNull , checkNotOpen , create , dump , dump , getChildrenNames , getConfig , put , put , put , remove , remove , removeData , setCache , setConfig , size , start , stop , toString
Methods inherited from class org.jboss.cache.loader.AbstractCacheLoader
commit , destroy , doMarshall , doUnmarshall , getMarshaller , getNodeDataList , loadEntireState , loadState , loadStateHelper , move , prepare , put , regionAwareMarshall , regionAwareUnmarshall , rollback , setRegionManager , storeEntireState , storeState , storeStateHelper
JdbmCacheLoader2
public JdbmCacheLoader2 ()
get
public Map get (Fqn name)
throws Exception
Description copied from class: JdbmCacheLoader
Returns a map containing all key-value pairs for the given FQN, or null
if the node is not present.
This operation is always non-transactional, even in a transactional
environment.
Specified by: get
in interface CacheLoader
Overrides: get
in class JdbmCacheLoader
Parameters: name
- the Fqn
to search for.
Returns: Map keys and values for the given node. Returns
null if the node is not found. If the node is found but has no
attributes, this method returns an empty Map.
Throws:
Exception
exists
public boolean exists (Fqn name)
throws IOException
Description copied from class: JdbmCacheLoader
Returns whether the given node exists.
Specified by: exists
in interface CacheLoader
Overrides: exists
in class JdbmCacheLoader
Returns: true if node exists, false otherwise
Throws:
IOException
Copyright © 2009 JBoss, a division of Red Hat . All Rights Reserved.