Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.subsystems.qsys.cache
Class CacheManager

java.lang.Object
  extended by com.ibm.etools.iseries.subsystems.qsys.cache.CacheManager
All Implemented Interfaces:
IQSYSCacheManager

public class CacheManager
extends Object
implements IQSYSCacheManager

The cache manager class manages caching state for each connection.


Field Summary
static String copyright
           
 
Constructor Summary
protected CacheManager(String connectionName)
          The CacheManager is a singleton per host (keyed by hostname).
 
Method Summary
static void cacheNotAvailable()
          Helper method for throwing exception when required information is not available in the cache.
 String getConnectionName()
          Returns the hostname this cache instance is being used for.
 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.
 boolean isRestoreFromMemento()
           
 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.
 void setRestoreFromMemento(boolean restore)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static String copyright
Constructor Detail

CacheManager

protected CacheManager(String connectionName)
The CacheManager is a singleton per host (keyed by hostname). Users should obtain instances from the getInstance() method

Method Detail

getConnectionName

public String getConnectionName()
Description copied from interface: IQSYSCacheManager
Returns the hostname this cache instance is being used for.

Specified by:
getConnectionName in interface IQSYSCacheManager

isRestoreFromMemento

public boolean isRestoreFromMemento()

setRestoreFromMemento

public void setRestoreFromMemento(boolean restore)

isCachingDisabled

public boolean isCachingDisabled()
Description copied from interface: IQSYSCacheManager
Check if caching has been disabled. If caching is disabled then the cache is not updated when new information is retrieved from the iSeries, but may be used when working in offline mode.

Specified by:
isCachingDisabled in interface IQSYSCacheManager

isCheckCacheFirst

public boolean isCheckCacheFirst()
Description copied from interface: IQSYSCacheManager
Check if the communciations layer should check the local cache first for the requested information before retreiving it from the remote host.

Specified by:
isCheckCacheFirst in interface IQSYSCacheManager

setCachingDisabled

public void setCachingDisabled(boolean state)
Description copied from interface: IQSYSCacheManager
Disable caching for this cache manager. This was initially added to allow WebFacing to disable caching during WebFacing conversion. The user can configure enabling / disabling the cache via the caching preferences page so you should only override the user's preference in special circumstances. The caller should restore the caching state after the override is no longer required.. For example WebFacing overrides this only during conversion because of the large amounts of data retrieved from the remote system that will never be used from the cache.

Specified by:
setCachingDisabled in interface IQSYSCacheManager

setCheckCacheFirst

public void setCheckCacheFirst(boolean checkCacheFirst)
Description copied from interface: IQSYSCacheManager
Set whether or not the communications layer should check the local cache first for the requested informatoin before retreiving it from the remote host.

Specified by:
setCheckCacheFirst in interface IQSYSCacheManager

cacheNotAvailable

public static void cacheNotAvailable()
                              throws SystemMessageException
Helper method for throwing exception when required information is not available in the cache.

Throws:
SystemMessageException

Rational Developer for Power Systems Software
V7.6

Copyright 2011 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.