Dashboard Builder Commons 6.0.0.Beta1

org.jboss.dashboard.database.cache.custom
Class CacheFactory

java.lang.Object
  extended by org.jboss.dashboard.factory.BasicFactoryElement
      extended by org.jboss.dashboard.database.cache.custom.CacheFactory
All Implemented Interfaces:
Serializable, FactoryLifecycle

public class CacheFactory
extends BasicFactoryElement

A convenient generator of multicast caches using an underlying LRU or Automatic algorithm.

See Also:
Serialized Form

Field Summary
 CacheOptions cacheOptions
           
 MultiCacheManager multiCacheManager
           
static String TYPE_AUTO
          The Automatic cache type.
static String TYPE_FIFO
          The FIFO cache type.
static String TYPE_HYBRID
          The Hybrid cache type.
static String TYPE_LRU
          The LRU cache type.
static String TYPE_TIMER
          The Timer cache type.
 
Constructor Summary
CacheFactory()
           
 
Method Summary
 ObjectCache createCache(String name)
          Creates a new cache.
 void createCustomCache(String cacheRegionName)
           
 ObjectCache createObjectCache(CacheElement element, String name)
           
 Map<String,CacheStatistics> getCacheStatistics()
          Get the cache statistics
 boolean isMonitorizeCaches()
           
 void printStatistics(PrintStream out, String separator)
          Print statistics to output
 void setMonitorizeCaches(boolean monitorizeCaches)
           
 
Methods inherited from class org.jboss.dashboard.factory.BasicFactoryElement
addPeriodicTask, addPeriodicTask, factoryLookup, getComponentAlias, getComponentDescription, getComponentName, getComponentScope, init, setComponentAlias, shutdown, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cacheOptions

public CacheOptions cacheOptions

multiCacheManager

public MultiCacheManager multiCacheManager

TYPE_LRU

public static final String TYPE_LRU
The LRU cache type.

See Also:
Constant Field Values

TYPE_AUTO

public static final String TYPE_AUTO
The Automatic cache type.

See Also:
Constant Field Values

TYPE_TIMER

public static final String TYPE_TIMER
The Timer cache type.

See Also:
Constant Field Values

TYPE_HYBRID

public static final String TYPE_HYBRID
The Hybrid cache type.

See Also:
Constant Field Values

TYPE_FIFO

public static final String TYPE_FIFO
The FIFO cache type.

See Also:
Constant Field Values
Constructor Detail

CacheFactory

public CacheFactory()
Method Detail

isMonitorizeCaches

public boolean isMonitorizeCaches()

setMonitorizeCaches

public void setMonitorizeCaches(boolean monitorizeCaches)

createCache

public ObjectCache createCache(String name)
Creates a new cache.

Parameters:
name - a name for the cache. Useful if there will be multiple caches for various objects.
Returns:
a new cache, based on configuration.

createObjectCache

public ObjectCache createObjectCache(CacheElement element,
                                     String name)
                              throws Exception
Throws:
Exception

getCacheStatistics

public Map<String,CacheStatistics> getCacheStatistics()
Get the cache statistics

Returns:
the cache statistics

createCustomCache

public void createCustomCache(String cacheRegionName)

printStatistics

public void printStatistics(PrintStream out,
                            String separator)
Print statistics to output

Parameters:
out - output stream to write to

Dashboard Builder Commons 6.0.0.Beta1

Copyright © 2012-2013 JBoss by Red Hat. All Rights Reserved.