public class

CacheRegistry

extends Object
java.lang.Object
   ↳ com.microstrategy.utils.cache.CacheRegistry

Class Overview

Singleton CacheRegistry class keeps track of all caches in the JVM.

Summary

Public Methods
void configureCache(String name, Properties prop)
void disableSoftRef()
Cache getCache(String name)
Returns cache by its name.
Collection<Cache> getCaches()
Returns all the caches in the registry.
synchronized int getCleanupTime()
Gets cleanup time in seconds.
int getDefaultFileRefreshTime()
Returns the interval of time to be used by default to refresh a Cache that caches file contents.
int getDefaultRefreshTime()
Gets default refreshing time in seconds.
int getDefaultStatisticTime()
Gets default statistic time in seconds.
int getDefaultSysTimeout()
Returns default cache timeout in seconds.
int getDefaultUserTimeout()
Returns fefault cache timeout in seconds.
static CacheRegistry getInstance()
Returns the singleton instance.
synchronized static void init(String fileName)
Initializes the cache framework from the specified properties file.
boolean isCacheAvailable(String name)
Returns whether the cache with the specified name is available.
boolean isSoftRefEnabled()
synchronized void setCleanupTime(int value)
Sets cleanup time in seconds.
void setDefaultFileRefreshTime(int value)
Sets the interval of time to be used by default to refresh a Cache that caches file contents.
void setDefaultRefreshTime(int value)
Sets default refreshing time in seconds.
void setDefaultStatisticTime(int value)
Sets default statistic time in seconds.
void setDefaultSysTimout(int value)
Sets default cache timeout in seconds.
void setDefaultUserTimout(int value)
Sets default cache timeout in seconds.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public void configureCache (String name, Properties prop)

public void disableSoftRef ()

public Cache getCache (String name)

Returns cache by its name.

Parameters
name cache name
Returns
  • cache
Throws
IllegalArgumentException If cache with the specified name can not be found.

public Collection<Cache> getCaches ()

Returns all the caches in the registry.

Returns
  • Colleciton of Cache objects.

public synchronized int getCleanupTime ()

Gets cleanup time in seconds. This property controls how often the cache registry will send onTimer event to all registered caches.

Returns
  • cleanup time in seconds.

public int getDefaultFileRefreshTime ()

Returns the interval of time to be used by default to refresh a Cache that caches file contents.

Returns
  • default file refreshing time in seconds.

public int getDefaultRefreshTime ()

Gets default refreshing time in seconds.

Returns
  • default refreshing time in seconds.

public int getDefaultStatisticTime ()

Gets default statistic time in seconds.

Returns
  • default statistic time in seconds.

public int getDefaultSysTimeout ()

Returns default cache timeout in seconds.

Returns
  • default cache timeout in seconds.

public int getDefaultUserTimeout ()

Returns fefault cache timeout in seconds.

Returns
  • default cache timeout in seconds.

public static CacheRegistry getInstance ()

Returns the singleton instance.

Returns
  • one and only one instance.

public static synchronized void init (String fileName)

Initializes the cache framework from the specified properties file.

Parameters
fileName properties file

public boolean isCacheAvailable (String name)

Returns whether the cache with the specified name is available.

Parameters
name cache name
Returns
  • true when it is available, otherwise false will be returned.

public boolean isSoftRefEnabled ()

public synchronized void setCleanupTime (int value)

Sets cleanup time in seconds. This property controls how often the cache registry will send onTimer event to all registered caches.

Parameters
value new cleanup time in seconds.

public void setDefaultFileRefreshTime (int value)

Sets the interval of time to be used by default to refresh a Cache that caches file contents.

Parameters
value new default refreshing time in seconds.

public void setDefaultRefreshTime (int value)

Sets default refreshing time in seconds.

Parameters
value new default refreshing time in seconds.

public void setDefaultStatisticTime (int value)

Sets default statistic time in seconds.

Parameters
value new default statistic time in seconds.

public void setDefaultSysTimout (int value)

Sets default cache timeout in seconds.

Parameters
value new default cache timeout in seconds.

public void setDefaultUserTimout (int value)

Sets default cache timeout in seconds.

Parameters
value new default cache timeout in seconds.