com.bowstreet.util.cache
Class CacheManager

java.lang.Object
  extended by com.bowstreet.util.cache.CacheManager

public class CacheManager
extends java.lang.Object

Singleton class for controlling two types of server-wide caching: - output cache (controlled by Cache Control) - WebApp cache (for cache of WebApps generated from models)


Method Summary
 void clear()
          Clear the Output Cache for all of the cached models.
 void clear(java.lang.String modelName)
          Clear the Output Cache for the specified model.
 void clearWebAppCache()
          Clear the WebApp Cache for all of the cached models.
 void clearWebAppCache(java.lang.String modelName)
          Clear the WebApp cache for the specified model.
 void enable(boolean enable)
          Enable/Disable Output Caching for the server
static CacheManager getCacheManager()
          Get single instance of CacheManager
 IXml getCacheStatistics(boolean resetCounters)
          Get Statistics for Cached Output from all of the models in the cache.
 long getTotalHits(boolean resetCounters)
          Gets the total number of hits for all the output cache objects on the server, for this ServerStats event log interval.
 long getTotalMisses(boolean resetCounters)
          Gets the total number of misses for all the output cache objects on the server, for this ServerStats event log interval.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clear

public void clear()
Clear the Output Cache for all of the cached models.


clear

public void clear(java.lang.String modelName)
Clear the Output Cache for the specified model.

Parameters:
modelName - The identifier of the model you want to clear the cache for.

clearWebAppCache

public void clearWebAppCache()
Clear the WebApp Cache for all of the cached models.


clearWebAppCache

public void clearWebAppCache(java.lang.String modelName)
Clear the WebApp cache for the specified model.

Parameters:
modelName - The identifier of the model you want to clear the cache for.

enable

public void enable(boolean enable)
Enable/Disable Output Caching for the server


getCacheManager

public static CacheManager getCacheManager()
Get single instance of CacheManager


getCacheStatistics

public IXml getCacheStatistics(boolean resetCounters)
Get Statistics for Cached Output from all of the models in the cache.

Parameters:
resetCounters - Set to true to clear counts.
Returns:
XML with info about all output caching

getTotalHits

public long getTotalHits(boolean resetCounters)
Gets the total number of hits for all the output cache objects on the server, for this ServerStats event log interval.

Parameters:
resetCounters - Set to true to clear counts.
Returns:
Total number of output cache misses

getTotalMisses

public long getTotalMisses(boolean resetCounters)
Gets the total number of misses for all the output cache objects on the server, for this ServerStats event log interval.

Parameters:
resetCounters - Set to true to clear counts.
Returns:
Total number of output cache misses


Copyright © 2009 IBM. All Rights Reserved.