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

org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean Interface Reference

List of all members.

Public Member Functions

boolean hasTables (ArrayList tables)

Package Functions

boolean hasTable (String table)
boolean hasStoredProcedure (String procedureName)
boolean isInitialized () throws Exception
boolean isReadEnabled ()
boolean isWriteEnabled ()
boolean isDisabled ()
void enableRead ()
void enableWrite ()
void disableRead ()
void disableWrite ()
void disable ()
String getConnectionTestStatement ()
String getDriverClassName ()
String getName ()
String getState ()
ArrayList getPendingRequestsDescription (int count, boolean fromFirst, boolean clone)
ArrayList getActiveTransactions ()
boolean checkDatabaseSchema ()
DatabaseSchema getDatabaseSchema ()
void checkDriverCompliance () throws Exception
String getURL ()
boolean isSchemaStatic ()
String getDriverPath ()
void setLastKnownCheckpoint (String checkpoint)
String getLastKnownCheckpoint ()
boolean isJDBCConnected ()
String getSchemaXml (boolean expandSchema)
String getXml ()

Detailed Description

MBeanInterface to the DatabaseBackend

Author:
Nicolas Modrzyk
Version:
1.0

Definition at line 37 of file DatabaseBackendMBean.java.


Member Function Documentation

boolean org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.checkDatabaseSchema  )  [package]
 

Checks that the current database schema is compatible with all schema gathered from each connection manager.

If no schema has been defined, the first gathered schema is used as the current database schema.

For each schema that is not compatible with the current schema, a warning is issued on the logger for that backend

Returns:
true if comptaible, false otherwise

void org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.checkDriverCompliance  )  throws Exception [package]
 

Check if the driver used by this backend is compliant with C-JDBC needs.

Exceptions:
Exception if the driver is not compliant

void org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.disable  )  [package]
 

Sets the database backend state to disable. This state is just an indication and it has no semantic effect. It is up to the request manager (especially the load balancer) to ensure that no more requests are sent to this backend.

void org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.disableRead  )  [package]
 

Disables the database backend for reads. This does not affect write ability

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.DisableRead.parse().

void org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.disableWrite  )  [package]
 

Disables the database backend for writes. This does not affect read ability although the backend will not be coherent anymore as soon as a write as occured. This should be used in conjunction with a checkpoint to recover missing writes.

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.DisableWrite.parse().

void org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.enableRead  )  [package]
 

Enables the database backend for reads. This method should only be called when the backend is synchronized with the others.

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.EnableRead.parse().

void org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.enableWrite  )  [package]
 

Enables the database backend for writes. This method should only be called when the backend is synchronized with the others.

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.EnableWrite.parse().

ArrayList org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.getActiveTransactions  )  [package]
 

Returns the list of active transactions for this backend.

Returns:
ArrayList of Long, corresponding to active transaction identifier.

String org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.getConnectionTestStatement  )  [package]
 

Returns the SQL statement to use to check the connection validity.

Returns:
a String containing a SQL statement

DatabaseSchema org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.getDatabaseSchema  )  [package]
 

Returns the schema of this database.

Returns:
the schema of this database. Returns null if the schema has not been set.

String org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.getDriverClassName  )  [package]
 

Returns the database native JDBC driver class name.

Returns:
the driver class name

String org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.getDriverPath  )  [package]
 

Returns the driver path.

Returns:
the driver path

String org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.getLastKnownCheckpoint  )  [package]
 

Returns the lastKnownCheckpoint value.

Returns:
Returns the lastKnownCheckpoint.

Referenced by org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionExecuteBackendDrop().

String org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.getName  )  [package]
 

Returns the backend logical name.

Returns:
the backend logical name

ArrayList org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.getPendingRequestsDescription int  count,
boolean  fromFirst,
boolean  clone
[package]
 

Returns the list of pending requests for this backend.

Parameters:
count number of requests to retrieve, if 0, return all.
fromFirst count the request from first if true, or from last if false
clone should clone the pending request if true, block it if false
Returns:
ArrayList of String description of each request.

String org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.getSchemaXml boolean  expandSchema  )  [package]
 

The getXml() method does not return the schema if it is not static anymore, to avoid confusion between static and dynamic schema. This method returns a static view of the schema, whatever the dynamic precision is.

Parameters:
expandSchema if we should force the schema to be expanded. This is needed as the default getXml should call this method.
Returns:
an xml formatted string

String org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.getState  )  [package]
 

Returns a description of the state of the backend

See also:
org.objectweb.cjdbc.common.jmx.notifications.CjdbcNotificationList
Returns:
a string description of the state. Can be enabled, disabled, recovering, backuping ...

Referenced by org.objectweb.cjdbc.console.gui.CjdbcGui.actionSetBackendState().

String org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.getURL  )  [package]
 

Returns the JDBC URL used to access the database.

Returns:
a JDBC URL

String org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.getXml  )  [package]
 

Return a string description of the backend in xml format. This does not include the schema description if the dynamic precision is not set to static.

Returns:
an xml formatted string

boolean org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.hasStoredProcedure String  procedureName  )  [package]
 

Returns true if this backend has the given stored procedure in its schema. The caller must ensure that the database schema has been defined

Parameters:
procedureName The stored procedure name to look for
Returns:
true if procedure name is found in the schema

boolean org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.hasTable String  table  )  [package]
 

Returns true if this backend has the given table in its schema. The caller must ensure that the database schema has been defined,

Parameters:
table The table name to look for
Returns:
true if tables is found in the schema

boolean org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.hasTables ArrayList  tables  ) 
 

Returns true if this backend has the given list of tables in its schema. The caller must ensure that the database schema has been defined

Parameters:
tables the list of table names (ArrayList of String) to look for
Returns:
true if all the tables are found

boolean org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.isDisabled  )  [package]
 

Is the backend completely disabled ? This usually means it has a known state with a checkpoint associated to it.

Returns:
true if the backend is disabled

boolean org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.isInitialized  )  throws Exception [package]
 

Tests if this backend is enabled (active and synchronized).

Returns:
true if this backend is enabled
Exceptions:
Exception if an error occurs

boolean org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.isJDBCConnected  )  [package]
 

Is the backend accessible ?

Returns:
true if a jdbc connection is still possible from the controller, false if connectionTestStatement failed

Referenced by org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionTestBackendConnection().

boolean org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.isReadEnabled  )  [package]
 

Tests if this backend is read enabled (active and synchronized).

Returns:
true if this backend is enabled.

Referenced by org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionRestoreBackend().

boolean org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.isSchemaStatic  )  [package]
 

Returns:
Returns the schemaIsStatic.

boolean org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.isWriteEnabled  )  [package]
 

Tests if this backend is write enabled (active and synchronized).

Returns:
true if this backend is enabled.

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.EnableWrite.parse().

void org.objectweb.cjdbc.common.jmx.mbeans.DatabaseBackendMBean.setLastKnownCheckpoint String  checkpoint  )  [package]
 

setLastKnownCheckpoint for this backend

Parameters:
checkpoint the checkpoint

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.DisableWrite.parse(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionSetCheckpoint(), and org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionUnSetCheckpoint().


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