org.objectweb.cjdbc.common.monitor.backend
Class AbstractBackendDataCollector

java.lang.Object
  extended byorg.objectweb.cjdbc.common.monitor.AbstractDataCollector
      extended byorg.objectweb.cjdbc.common.monitor.backend.AbstractBackendDataCollector
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ActiveConnectionsCollector, ActiveTransactionCollector, PendingRequestsCollector, ReadRequestsCollector, RequestsCollector, TransactionsCollector, WriteRequestsCollector

public abstract class AbstractBackendDataCollector
extends AbstractDataCollector

Abstract class to factor code for collecting data from backends

Author:
Nicolas Modrzyk
See Also:
Serialized Form

Field Summary
private  java.lang.String backendName
           
private  java.lang.String virtualDatabaseName
           
 
Fields inherited from class org.objectweb.cjdbc.common.monitor.AbstractDataCollector
controller
 
Constructor Summary
AbstractBackendDataCollector(java.lang.String backendName, java.lang.String virtualDatabaseName)
          Create new collector
 
Method Summary
 long collectValue()
          This is used on the controller side to collect information
 java.lang.String getTargetName()
          Return the name of the target of this collector
abstract  long getValue(java.lang.Object backend)
          get the proper collected value when we have instace of the backend
 
Methods inherited from class org.objectweb.cjdbc.common.monitor.AbstractDataCollector
getDescription, setController
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

backendName

private java.lang.String backendName

virtualDatabaseName

private java.lang.String virtualDatabaseName
Constructor Detail

AbstractBackendDataCollector

public AbstractBackendDataCollector(java.lang.String backendName,
                                    java.lang.String virtualDatabaseName)
Create new collector

Parameters:
backendName - of the backend to get data from
virtualDatabaseName - that contains reference to this backend
Method Detail

collectValue

public long collectValue()
                  throws DataCollectorException
Description copied from class: AbstractDataCollector
This is used on the controller side to collect information

Specified by:
collectValue in class AbstractDataCollector
Returns:
the value collected by this collectorsardes@inrialpes.fr
Throws:
DataCollectorException - if fails to collect the information
See Also:
AbstractDataCollector.collectValue()

getValue

public abstract long getValue(java.lang.Object backend)
get the proper collected value when we have instace of the backend

Parameters:
backend - DatabaseBackend instance
Returns:
collected value

getTargetName

public java.lang.String getTargetName()
Description copied from class: AbstractDataCollector
Return the name of the target of this collector

Specified by:
getTargetName in class AbstractDataCollector
Returns:
target name
See Also:
AbstractDataCollector.getTargetName()


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.