|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
MBeanInterface to the DatabaseBackend
Method Summary | |
boolean |
checkDatabaseSchema()
Checks that the current database schema is compatible with all schema gathered from each connection manager. |
void |
checkDriverCompliance()
Check if the driver used by this backend is compliant with C-JDBC needs. |
void |
disable()
Sets the database backend state to disable. |
void |
disableRead()
Disables the database backend for reads. |
void |
disableWrite()
Disables the database backend for writes. |
void |
enableRead()
Enables the database backend for reads. |
void |
enableWrite()
Enables the database backend for writes. |
java.util.ArrayList |
getActiveTransactions()
Returns the list of active transactions for this backend. |
java.lang.String |
getConnectionTestStatement()
Returns the SQL statement to use to check the connection validity. |
DatabaseSchema |
getDatabaseSchema()
Returns the schema of this database. |
java.lang.String |
getDriverClassName()
Returns the database native JDBC driver class name. |
java.lang.String |
getDriverPath()
Returns the driver path. |
java.lang.String |
getLastKnownCheckpoint()
Returns the lastKnownCheckpoint value. |
java.lang.String |
getName()
Returns the backend logical name. |
java.util.ArrayList |
getPendingRequestsDescription(int count,
boolean fromFirst,
boolean clone)
Returns the list of pending requests for this backend. |
java.lang.String |
getSchemaXml(boolean expandSchema)
The getXml() method does not return the schema if it is not static anymore, to avoid confusion between static and dynamic schema. |
java.lang.String |
getState()
Returns a description of the state of the backend |
java.lang.String |
getURL()
Returns the JDBC URL used to access the database. |
java.lang.String |
getXml()
Return a string description of the backend in xml format. |
boolean |
hasStoredProcedure(java.lang.String procedureName)
Returns true if this backend has the given stored procedure
in its schema. |
boolean |
hasTable(java.lang.String table)
Returns true if this backend has the given table in its
schema. |
boolean |
hasTables(java.util.ArrayList tables)
Returns true if this backend has the given list of tables in
its schema. |
boolean |
isDisabled()
Is the backend completely disabled ? |
boolean |
isInitialized()
Tests if this backend is enabled (active and synchronized). |
boolean |
isJDBCConnected()
Is the backend accessible ? |
boolean |
isReadEnabled()
Tests if this backend is read enabled (active and synchronized). |
boolean |
isSchemaStatic()
|
boolean |
isWriteEnabled()
Tests if this backend is write enabled (active and synchronized). |
void |
setLastKnownCheckpoint(java.lang.String checkpoint)
setLastKnownCheckpoint for this backend |
Method Detail |
public boolean hasTables(java.util.ArrayList tables)
true
if this backend has the given list of tables in
its schema. The caller must ensure that the database schema has been
defined
tables
- the list of table names (ArrayList
of
String
) to look for
true
if all the tables are foundpublic boolean hasTable(java.lang.String table)
true
if this backend has the given table in its
schema. The caller must ensure that the database schema has been defined,
table
- The table name to look for
true
if tables is found in the schemapublic boolean hasStoredProcedure(java.lang.String procedureName)
true
if this backend has the given stored procedure
in its schema. The caller must ensure that the database schema has been
defined
procedureName
- The stored procedure name to look for
true
if procedure name is found in the schemapublic boolean isInitialized() throws java.lang.Exception
true
if this backend is enabled
java.lang.Exception
- if an error occurspublic boolean isReadEnabled()
true
if this backend is enabled.public boolean isWriteEnabled()
true
if this backend is enabled.public boolean isDisabled()
true
if the backend is disabledpublic void enableRead()
public void enableWrite()
public void disableRead()
public void disableWrite()
public void disable()
public java.lang.String getConnectionTestStatement()
String
containing a SQL statementpublic java.lang.String getDriverClassName()
public java.lang.String getName()
public java.lang.String getState()
CjdbcNotificationList
public java.util.ArrayList getPendingRequestsDescription(int count, boolean fromFirst, boolean clone)
count
- number of requests to retrieve, if 0, return all.fromFirst
- count the request from first if true, or from last if falseclone
- should clone the pending request if true, block it if false
ArrayList
of String
description of
each request.public java.util.ArrayList getActiveTransactions()
ArrayList
of Long
, corresponding to
active transaction identifier.public boolean checkDatabaseSchema()
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
public DatabaseSchema getDatabaseSchema()
null
if the
schema has not been set.public void checkDriverCompliance() throws java.lang.Exception
java.lang.Exception
- if the driver is not compliantpublic java.lang.String getURL()
public boolean isSchemaStatic()
public java.lang.String getDriverPath()
public void setLastKnownCheckpoint(java.lang.String checkpoint)
checkpoint
- the checkpointpublic java.lang.String getLastKnownCheckpoint()
public boolean isJDBCConnected()
public java.lang.String getSchemaXml(boolean expandSchema)
expandSchema
- if we should force the schema to be expanded. This is
needed as the default getXml should call this method.
public java.lang.String getXml()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |