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(java.lang.String repository, java.lang.String uuid)
          Will flush all entries with key bound to given uuid from all configured caches.
 java.util.Map<java.lang.String,java.lang.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.
 java.util.Map<java.lang.String,java.lang.Integer> getDomainAccesses()
          Gets number of times the requests have been served for each configured domain since the last server restart.
 java.util.Map<java.lang.String,java.lang.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

java.util.Map<java.lang.String,java.lang.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

java.util.Map<java.lang.String,java.lang.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

java.util.Map<java.lang.String,java.lang.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 java.lang.Exception
Will flush all entries from all configured caches.

Throws:
java.lang.Exception

flushByUUID

void flushByUUID(java.lang.String repository,
                 java.lang.String uuid)
                 throws java.lang.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:
java.lang.Exception


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