iSeries Remote Systems
v6.0.0

com.ibm.etools.iseries.core.cache
Class AbstractCacheHandler

java.lang.Object
  extended bycom.ibm.etools.iseries.core.cache.AbstractCacheHandler
Direct Known Subclasses:
IFSSubSystemCacheHandler, JobSubSystemCacheHandler, NativeFileSystemCacheHandler

public abstract class AbstractCacheHandler
extends Object

Abstract class to handle generic caching related tasts.


Field Summary
protected static int CACHE_DEPTH
           
protected  CacheManager cacheMgr
           
static String copyright
           
protected  com.ibm.etools.systems.dstore.core.model.DataElement minerRoot
           
 
Constructor Summary
AbstractCacheHandler(com.ibm.etools.systems.dstore.core.model.DataElement minerRoot, com.ibm.etools.systems.subsystems.ISystem system)
          Constructor
 
Method Summary
static void cacheNotAvailable()
          Helper method for throwing exception when required information is not available in the cache.
protected abstract  StringBuffer getKeyForObject(com.ibm.etools.systems.dstore.core.model.DataElement object)
          Builds the cache key for the specified DataElement.
protected  com.ibm.etools.systems.dstore.core.model.DataElement loadChild(com.ibm.etools.systems.dstore.core.model.DataElement parent, String childName, int depth)
          Load a single child node from the parent upto specified depth.
 void save(com.ibm.etools.systems.dstore.core.model.DataElement element, int depth)
          Save the specified DataElement to the cache along with depth children.
 void save(com.ibm.etools.systems.dstore.core.model.DataElement element, int depth, boolean refresh)
          Save the specified DataElement to the cache along with depth children.
 void save(com.ibm.etools.systems.dstore.core.model.DataElement element, int cacheDepth, int treeDepth)
          Save the specified DataElement to the cache using a directory depth of cacheDepth and a tree depth of treeDepth.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

CACHE_DEPTH

protected static final int CACHE_DEPTH
See Also:
Constant Field Values

cacheMgr

protected CacheManager cacheMgr

minerRoot

protected com.ibm.etools.systems.dstore.core.model.DataElement minerRoot
Constructor Detail

AbstractCacheHandler

public AbstractCacheHandler(com.ibm.etools.systems.dstore.core.model.DataElement minerRoot,
                            com.ibm.etools.systems.subsystems.ISystem system)
Constructor

Method Detail

cacheNotAvailable

public static void cacheNotAvailable()
                              throws com.ibm.etools.systems.core.messages.SystemMessageException
Helper method for throwing exception when required information is not available in the cache.

Throws:
com.ibm.etools.systems.core.messages.SystemMessageException

save

public void save(com.ibm.etools.systems.dstore.core.model.DataElement element,
                 int depth)
Save the specified DataElement to the cache along with depth children. This is the same as calling save(element, depth, false)

Parameters:
element - DataElement to be saved to the cache
depth - Number of layers in the DataStore tree under element to be saved

save

public void save(com.ibm.etools.systems.dstore.core.model.DataElement element,
                 int depth,
                 boolean refresh)
Save the specified DataElement to the cache along with depth children.

Parameters:
element - DataElement to be saved to the cache
depth - Number of layers in the DataStore tree under element to be saved
refresh - Refresh the cache with what is under element. Any children in the cache that do not exists as children of element will be removed.

save

public void save(com.ibm.etools.systems.dstore.core.model.DataElement element,
                 int cacheDepth,
                 int treeDepth)
Save the specified DataElement to the cache using a directory depth of cacheDepth and a tree depth of treeDepth.


getKeyForObject

protected abstract StringBuffer getKeyForObject(com.ibm.etools.systems.dstore.core.model.DataElement object)
Builds the cache key for the specified DataElement. Returns null if the cache key could not be built correctly (the other reason this would happen is if the object is not in the proper datastore tree structure.)


loadChild

protected com.ibm.etools.systems.dstore.core.model.DataElement loadChild(com.ibm.etools.systems.dstore.core.model.DataElement parent,
                                                                         String childName,
                                                                         int depth)
Load a single child node from the parent upto specified depth.


iSeries Remote Systems
v6.0.0

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.