Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

org.objectweb.cjdbc.common.monitor.cache.AbstractCacheStatsDataCollector Class Reference

Inheritance diagram for org.objectweb.cjdbc.common.monitor.cache.AbstractCacheStatsDataCollector:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.cjdbc.common.monitor.cache.AbstractCacheStatsDataCollector:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AbstractCacheStatsDataCollector (String virtualDatabaseName)
long collectValue () throws DataCollectorException
abstract long getValue (Object cache)
String getTargetName ()

Detailed Description

Abstract template to factor code for cache collectors
Author:
Nicolas Modrzyk

Definition at line 37 of file AbstractCacheStatsDataCollector.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.common.monitor.cache.AbstractCacheStatsDataCollector.AbstractCacheStatsDataCollector String  virtualDatabaseName  ) 
 

new collector

Parameters:
virtualDatabaseName database accessed to get data

Definition at line 47 of file AbstractCacheStatsDataCollector.java.

00048   {
00049     super();
00050     this.virtualDatabaseName = virtualDatabaseName;
00051   }


Member Function Documentation

long org.objectweb.cjdbc.common.monitor.cache.AbstractCacheStatsDataCollector.collectValue  )  throws DataCollectorException [virtual]
 

See also:
org.objectweb.cjdbc.common.monitor.AbstractDataCollector.collectValue()

Implements org.objectweb.cjdbc.common.monitor.AbstractDataCollector.

Definition at line 56 of file AbstractCacheStatsDataCollector.java.

References org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabase.getRequestManager().

00057   {
00058     VirtualDatabase vdb = ((Controller)controller).getVirtualDatabase(
00059         virtualDatabaseName);
00060     AbstractResultCache cache = vdb.getRequestManager().getResultCache();
00061     if (cache == null)
00062       throw new DataCollectorException(ExceptionTypes.NO_CACHE_ENABLED);
00063     return this.getValue(cache);
00064   }

String org.objectweb.cjdbc.common.monitor.cache.AbstractCacheStatsDataCollector.getTargetName  )  [virtual]
 

See also:
org.objectweb.cjdbc.common.monitor.AbstractDataCollector.getTargetName()

Implements org.objectweb.cjdbc.common.monitor.AbstractDataCollector.

Definition at line 78 of file AbstractCacheStatsDataCollector.java.

00079   {
00080     return virtualDatabaseName;
00081   }

abstract long org.objectweb.cjdbc.common.monitor.cache.AbstractCacheStatsDataCollector.getValue Object  cache  )  [pure virtual]
 

We have the cache object so let's get the value we want from ot

Parameters:
cache as an object to allow it through RMI, but IS a AbstractResultCache
Returns:
the collected value

Implemented in org.objectweb.cjdbc.common.monitor.cache.CacheEntriesCollector, org.objectweb.cjdbc.common.monitor.cache.CountHitsCollector, org.objectweb.cjdbc.common.monitor.cache.CountInsertCollector, org.objectweb.cjdbc.common.monitor.cache.CountSelectCollector, and org.objectweb.cjdbc.common.monitor.cache.HitsRatioCollector.


The documentation for this class was generated from the following file:
Generated on Mon Apr 11 22:01:49 2005 for C-JDBC by  doxygen 1.3.9.1