org.jboss.cache.loader
Class JDBCCacheLoaderOld

java.lang.Object
  extended by org.jboss.cache.loader.AbstractCacheLoader
      extended by org.jboss.cache.loader.AdjListJDBCCacheLoader
          extended by org.jboss.cache.loader.JDBCCacheLoaderOld
All Implemented Interfaces:
Lifecycle, CacheLoader

Deprecated. please use the JDBCCacheLoader.

@Deprecated
public class JDBCCacheLoaderOld
extends AdjListJDBCCacheLoader

JDBC CacheLoader implementation.

This implementation uses one table. The table consists of three columns:

The configuration options are:

Table configuration

DataSource configuration

JDBC driver configuration (used when DataSource is not configured)

Version:
$Revision: 7168 $
Author:
Alexey Loubyansky, Hany Mesha , Galder Zamarreno

Field Summary
 
Fields inherited from class org.jboss.cache.loader.AdjListJDBCCacheLoader
cf, driverName, lock, NULL_NODE_IN_ROW
 
Fields inherited from class org.jboss.cache.loader.AbstractCacheLoader
buddyFqnTransformer, cache, regionManager, transactions
 
Constructor Summary
JDBCCacheLoaderOld()
          Deprecated.  
 
Method Summary
 CacheLoaderConfig.IndividualCacheLoaderConfig getConfig()
          Deprecated. Gets the configuration.
protected  org.apache.commons.logging.Log getLogger()
          Deprecated.  
 AdjListJDBCCacheLoaderConfig processConfig(CacheLoaderConfig.IndividualCacheLoaderConfig base)
          Deprecated.  
 void put(Fqn name, Map attributes)
          Deprecated. Adds attributes from the passed in map to the existing node.
 void put(Fqn name, Map attributes, boolean override)
          Deprecated.  
 Object put(Fqn name, Object key, Object value)
          Deprecated. Adds/overrides a value in a node for a key.
 void remove(Fqn name)
          Deprecated. Removes a node and all its children.
 
Methods inherited from class org.jboss.cache.loader.AdjListJDBCCacheLoader
commit, exists, get, getChildrenNames, getDriverName, insertNode, loadNode, marshall, populatePreparedStatementForInsert, prepare, prepareAndLogStatement, remove, removeData, reportAndRethrowError, rollback, safeClose, safeClose, safeClose, setConfig, start, stop, tableExists, unmarshall, updateNode
 
Methods inherited from class org.jboss.cache.loader.AbstractCacheLoader
create, destroy, doMarshall, doUnmarshall, getMarshaller, getNodeDataList, loadEntireState, loadState, loadStateHelper, move, put, regionAwareMarshall, regionAwareUnmarshall, setCache, setRegionManager, storeEntireState, storeState, storeStateHelper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCCacheLoaderOld

public JDBCCacheLoaderOld()
Deprecated. 
Method Detail

processConfig

public AdjListJDBCCacheLoaderConfig processConfig(CacheLoaderConfig.IndividualCacheLoaderConfig base)
Deprecated. 
Specified by:
processConfig in class AdjListJDBCCacheLoader

getConfig

public CacheLoaderConfig.IndividualCacheLoaderConfig getConfig()
Deprecated. 
Description copied from interface: CacheLoader
Gets the configuration.

Returns:
the configuration, represented by a CacheLoaderConfig.IndividualCacheLoaderConfig object.

put

public Object put(Fqn name,
                  Object key,
                  Object value)
           throws Exception
Deprecated. 
Adds/overrides a value in a node for a key. If the node does not exist yet, the node will be created. If parent nodes do not exist for the node, empty parent nodes will be created.

Parameters:
name - node's fqn
key - attribute's key
value - attribute's value
Returns:
old value associated with the attribute's key or null if there was no value previously associated with the attribute's key
Throws:
Exception

put

public void put(Fqn name,
                Map attributes)
         throws Exception
Deprecated. 
Adds attributes from the passed in map to the existing node. If there is no node for the fqn, a new node will be created.

Parameters:
name - node's fqn
attributes - attributes
Throws:
Exception

remove

public void remove(Fqn name)
            throws Exception
Deprecated. 
Removes a node and all its children. Uses the same connection for all the db work.

Parameters:
name - node's fqn
Throws:
Exception

put

public void put(Fqn name,
                Map attributes,
                boolean override)
         throws Exception
Deprecated. 
Overrides:
put in class AbstractCacheLoader
Throws:
Exception

getLogger

protected org.apache.commons.logging.Log getLogger()
Deprecated. 
Specified by:
getLogger in class AdjListJDBCCacheLoader


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