info.magnolia.module.cache.mbean
Interface CacheMonitorMBean

All Known Implementing Classes:
CacheMonitor

public interface CacheMonitorMBean

MBean implemenation for monitoring and manipulation of the cache.

Version:
$Id:$
Author:
had

Method Summary
 void flushAll()
          Will flush all entries from all configured caches.
 void flushByUUID(String repository, String uuid)
          Will flush all entries with key bound to given uuid from all configured caches.
 Map<String,Integer> getAll()
           
 int getBypasses()
          Gets number of times since the last server restart the caching policy decided to bypass cache and serve request out of repository (i.e.
 int getCachedKeysCount()
          Gets number of entries in all known caches even if those entries have been generated from content with same uuid (e.g.
 int getCachedUUIDsCount()
          Gets number of content uuids that are held in all known caches.
 Map<String,Integer> getDomainAccesses()
          Gets number of times the requests have been served for each configured domain since the last server restart.
 Map<String,Integer> getFlushes()
          Gets number of times each configured cache have been flushed since the last server restart.
 int getHits()
          Gets number of times since the last server restart the cache found and served the entry requested by client.
 int getPuts()
          Gets number of times since the last server restart the cached entry for the request didn't exist and was put in the cache.
 int getStartCalls()
          Gets number of times Cache Module was started since the last server restart.
 int getStopCalls()
          Gets number of times Cache Module was stopped since the last server restart.
 

Method Detail

getAll

Map<String,Integer> getAll()

getHits

int getHits()
Gets number of times since the last server restart the cache found and served the entry requested by client.

Returns:
number of cache hits.

getBypasses

int getBypasses()
Gets number of times since the last server restart the caching policy decided to bypass cache and serve request out of repository (i.e. for dynamic content).

Returns:
number of cache bypasses.

getPuts

int getPuts()
Gets number of times since the last server restart the cached entry for the request didn't exist and was put in the cache.

Returns:

getStopCalls

int getStopCalls()
Gets number of times Cache Module was stopped since the last server restart.

Returns:
number of Cache Module stop() calls.

getStartCalls

int getStartCalls()
Gets number of times Cache Module was started since the last server restart.

Returns:
number of Cache Module start() calls.

getFlushes

Map<String,Integer> getFlushes()
Gets number of times each configured cache have been flushed since the last server restart.

Returns:
names of caches and number of times each of them have been completely flushed.

getDomainAccesses

Map<String,Integer> getDomainAccesses()
Gets number of times the requests have been served for each configured domain since the last server restart. If the name of the domain doesn't appear in the list, no request have been served for this domain since the restart, yet.

Returns:
names of the domains and number of times the requests have been server for each of them.

getCachedUUIDsCount

int getCachedUUIDsCount()
Gets number of content uuids that are held in all known caches. There might be multiple entries per uuid in case multi-domain and/or multi-locale configurations are used.

Returns:
number of unique content entries that are held in cache.

getCachedKeysCount

int getCachedKeysCount()
Gets number of entries in all known caches even if those entries have been generated from content with same uuid (e.g. multiple language versions or multiple domain versions).

Returns:
number of entries held by all caches.

flushAll

void flushAll()
              throws Exception
Will flush all entries from all configured caches.

Throws:
Exception

flushByUUID

void flushByUUID(String repository,
                 String uuid)
                 throws Exception
Will flush all entries with key bound to given uuid from all configured caches. In multi domain and multi locale environments, it will flush all domain and language variations of the page with given UUID from all caches.

Throws:
Exception


Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.