Class JdbmCacheLoader2

  extended by org.jboss.cache.loader.AbstractCacheLoader
      extended by org.jboss.cache.loader.jdbm.JdbmCacheLoader
          extended by org.jboss.cache.loader.jdbm.JdbmCacheLoader2
All Implemented Interfaces:
Lifecycle, CacheLoader

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.

$Id: 7086 2008-11-05 18:39:35Z genman $
Elias Ross

Field Summary
Fields inherited from class org.jboss.cache.loader.AbstractCacheLoader
buddyFqnTransformer, cache, regionManager, transactions
Constructor Summary
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public JdbmCacheLoader2()
Method Detail


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
get in class JdbmCacheLoader
name - the Fqn to search for.
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.


public boolean exists(Fqn name)
               throws IOException
Description copied from class: JdbmCacheLoader
Returns whether the given node exists.

Specified by:
exists in interface CacheLoader
exists in class JdbmCacheLoader
true if node exists, false otherwise

Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.