|
iSeries Remote Systems v6.0.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.etools.systems.subsystems.impl.AbstractCacheManager
com.ibm.etools.iseries.core.cache.CacheManager
Field Summary | |
---|---|
static String |
CACHE_FILE_CL_COMMAND_PROPERTIES
|
static String |
CACHE_FILE_CL_HELP_EXTENSION
|
static String |
CACHE_FILE_CL_HELP_TABLE_EXTENSION
|
protected static String |
CACHE_FILE_EXTENSION
|
protected static String |
CACHE_INDEX_FILE
|
static char |
CACHE_KEY_DELIMINATOR
|
static String |
copyright
|
static int |
USE_CACHE_ALWAYS
|
static int |
USE_CACHE_LEVELCHECK
|
static int |
USE_CACHE_NEVER
|
Fields inherited from class com.ibm.etools.systems.subsystems.impl.AbstractCacheManager |
---|
Copyright |
Fields inherited from interface com.ibm.etools.iseries.core.cache.ICacheConstants |
---|
MAX_SIZE_DEFAULT, PREF_ALWAYS, PREF_CACHE_LISTS, PREF_CL, PREF_CL_HOST, PREF_CL_IGNORE, PREF_CL_RELEASE, PREF_DISABLE_CACHE, PREF_LEVELCHECK, PREF_LOCATION, PREF_MAXSIZE, PREF_MAXSIZE_OPTION, PREF_NEVER, PREF_OFFLINE_UNIVERSAL, PREF_ONLINE_OPTIONS |
Constructor Summary | |
---|---|
protected |
CacheManager(String hostname)
The CacheManager is a singleton per host (keyed by hostname). |
Method Summary | |
---|---|
boolean |
clearCacheFile(String key)
Clear the specified cache file |
protected void |
clearMemoryCache()
Clear the in-memory cache for this cache manager |
protected static String |
getDataElementName(String name,
boolean object)
Return the name of the DataElement for the specified cache key segment. |
protected static String |
getDataElementType(String name,
boolean object)
Return the type of the DataElement for the specified cache key segment. |
protected static String |
getDirectoryName(com.ibm.etools.systems.dstore.core.model.DataElement element)
The following three methods are used to map DataElements to directory names. |
protected static String |
getEscapedDirectoryName(String name)
Get the escaped directory name for the specified String. |
protected String |
getHostName()
|
int |
getOnlineOption()
Checks the caching preferences to see if the which online caching mode the user has selected. |
boolean |
isCached(com.ibm.etools.systems.dstore.core.model.DataElement minerRoot,
String cacheKey,
int dirDepth)
Checks if the DataElement represented by cacheKey is stored in the cache |
boolean |
isCachingDisabled()
Check if caching has been disabled. |
boolean |
isCheckCacheFirst()
Check if the communciations layer should check the local cache first for the requested information before retreiving it from the remote host. |
com.ibm.etools.systems.dstore.core.model.DataElement |
load(com.ibm.etools.systems.dstore.core.model.DataElement minerRoot,
String cacheKey,
int dirDepth,
int treeDepth)
Loads the DataElement specified by cacheKey into the DataStore tree along with all of it's children up to treeDepth deep. |
void |
removeNode(com.ibm.etools.systems.dstore.core.model.DataElement minerRoot,
String cacheKey,
int dirDepth)
Clear the node in the cache with the specified cache key. |
void |
save(com.ibm.etools.systems.dstore.core.model.DataElement node,
int dirDepth,
int treeDepth,
boolean saveRefs)
Save the specified DataElement and it's children to the cache. |
void |
save(com.ibm.etools.systems.dstore.core.model.DataElement node,
int dirDepth,
int treeDepth,
boolean saveRefs,
boolean refresh)
Save the specified DataElement and it's children to the cache. |
void |
setCachingDisabled(boolean state)
Disable caching for this cache manager. |
void |
setCheckCacheFirst(boolean checkCacheFirst)
Set whether or not the communications layer should check the local cache first for the requested informatoin before retreiving it from the remote host. |
protected void |
updateCacheLocation(String newCacheLocation)
|
boolean |
useCacheForLists()
Checks the caching preferences to see if the cache should be used for retrieving lists of information. |
Methods inherited from class com.ibm.etools.systems.subsystems.impl.AbstractCacheManager |
---|
isRestoreFromMemento, setRestoreFromMemento |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String copyright
public static final int USE_CACHE_NEVER
public static final int USE_CACHE_LEVELCHECK
public static final int USE_CACHE_ALWAYS
public static final char CACHE_KEY_DELIMINATOR
protected static final String CACHE_INDEX_FILE
protected static final String CACHE_FILE_EXTENSION
public static final String CACHE_FILE_CL_HELP_EXTENSION
public static final String CACHE_FILE_CL_HELP_TABLE_EXTENSION
public static final String CACHE_FILE_CL_COMMAND_PROPERTIES
Constructor Detail |
protected CacheManager(String hostname)
Method Detail |
protected void updateCacheLocation(String newCacheLocation)
protected String getHostName()
public boolean isCheckCacheFirst()
public void setCheckCacheFirst(boolean checkCacheFirst)
public boolean isCachingDisabled()
public void setCachingDisabled(boolean state)
public boolean useCacheForLists()
public int getOnlineOption()
protected static String getEscapedDirectoryName(String name)
protected static String getDirectoryName(com.ibm.etools.systems.dstore.core.model.DataElement element)
protected static String getDataElementName(String name, boolean object)
name
- The name of the object from the cache keyobject
- Wether this is an OS/400 object or not
protected static String getDataElementType(String name, boolean object)
name
- The name of the object from the cache keyobject
- Wether this is an OS/400 object or not
public void save(com.ibm.etools.systems.dstore.core.model.DataElement node, int dirDepth, int treeDepth, boolean saveRefs)
node
- dirDepth
- The number of subdirectories to use before writing remaining
information to a single xml file.treeDepth
- Number of layers in the tree to save to disk. Valid values
are 0 and higher. A value of 0 writes just the information for the specified
node. A value of 1 writes the information for the specified node and its
immediate children, ...saveRefs
- Whether or not to save DataElements which are references to other DataElementspublic void save(com.ibm.etools.systems.dstore.core.model.DataElement node, int dirDepth, int treeDepth, boolean saveRefs, boolean refresh)
node
- dirDepth
- The number of subdirectories to use before writing remaining
information to a single xml file.treeDepth
- Number of layers in the tree to save to disk. Valid values
are 0 and higher. A value of 0 writes just the information for the specified
node. A value of 1 writes the information for the specified node and its
immediate children, ...saveRefs
- Whether or not to save DataElements which are references to other DataElementsrefresh
- Refresh the cache with what is under element. Any children in the
cache that do not exists as children of element will be removed.public com.ibm.etools.systems.dstore.core.model.DataElement load(com.ibm.etools.systems.dstore.core.model.DataElement minerRoot, String cacheKey, int dirDepth, int treeDepth)
minerRoot
- The minerRoot for the miner whose data is cachedpublic boolean isCached(com.ibm.etools.systems.dstore.core.model.DataElement minerRoot, String cacheKey, int dirDepth)
minerRoot
- The minerRoot for the miner whose data is cachedpublic boolean clearCacheFile(String key)
protected void clearMemoryCache()
public void removeNode(com.ibm.etools.systems.dstore.core.model.DataElement minerRoot, String cacheKey, int dirDepth)
cacheKey
- The cache key of the node to clear.
|
iSeries Remote Systems v6.0.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |