|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.management.StandardMBean
org.objectweb.cjdbc.controller.jmx.AbstractStandardMBean
org.objectweb.cjdbc.controller.recoverylog.AbstractRecoveryLog
Log Recovery is responsible for logging performed queries, managing checkpoints and retrieving write requests executed from a given checkpoint.
| Nested Class Summary |
| Nested classes inherited from class javax.management.StandardMBean |
|
| Field Summary | |
(package private) static Trace |
logger
|
private long |
recoveringNb
|
| Fields inherited from class org.objectweb.cjdbc.controller.jmx.AbstractStandardMBean |
|
| Fields inherited from class javax.management.StandardMBean |
|
| Fields inherited from interface org.objectweb.cjdbc.common.xml.XmlComponent |
DOCTYPE_DB, XML_VERSION |
| Constructor Summary | |
protected |
AbstractRecoveryLog(java.lang.Class mBeanInterface)
Generic constructor. |
| Method Summary | |
abstract void |
abort(TransactionMarkerMetaData tm)
Log a transaction abort. |
abstract void |
begin(TransactionMarkerMetaData tm)
Log the beginning of a new transaction. |
void |
beginRecovery()
Notify the recovery log that a recovery process has started. |
abstract void |
cleanRecoveryLog()
Possibly clean the recovery log after all recovery process are done. |
abstract void |
commit(TransactionMarkerMetaData tm)
Log a transaction commit. |
void |
endRecovery()
Notify the recovery log that a recovery process has finished. |
abstract BackendRecoveryInfo |
getBackendInfo(java.lang.String databaseName,
java.lang.String backendName)
Retrieve recovery information on a backend. |
abstract java.util.ArrayList |
getCheckpointNames()
Returns an array of names of all the checkpoint available in the recovery log |
abstract long |
getCheckpointRequestId(java.lang.String checkpointName)
Get the request id corresponding to a given checkpoint. |
abstract java.lang.String[][] |
getData()
Allow to get the content of the recovery log for viewing |
abstract long |
getLastTransactionId()
Get the id of the last transaction logged in the recovery log. |
long |
getRecoveringNb()
Returns the recoveringNb value. |
java.lang.String |
getXml()
Get xml information of the current recovery load in the system. |
abstract java.lang.String |
getXmlImpl()
|
boolean |
isRecovering()
Returns true if at least one backend has started a recover
process. |
abstract void |
logRequest(AbstractWriteRequest request)
Log a write request. |
abstract void |
logRequest(StoredProcedure proc,
boolean isRead)
Log a call to a stored procedure. |
abstract RecoveryTask |
recoverNextRequest(long previousRequestId)
Get the next request (begin/commit/rollback or WriteRequest) from the recovery log given the id of the previously recovered request. |
abstract void |
removeCheckpoint(java.lang.String checkpointName)
Remove a checkpoint from the recovery. |
abstract void |
rollback(TransactionMarkerMetaData tm)
Log a transaction rollback. |
abstract void |
storeBackendInfo(java.lang.String databaseName,
java.lang.String backendName,
java.lang.String checkpoint,
int backendState)
Store the state of the backend in the recovery log |
abstract void |
storeCheckpoint(java.lang.String checkpointName)
Store a Checkpoint using the current log state. |
abstract void |
storeCheckpoint(java.lang.String checkpointName,
long requestId)
Store a Checkpoint using the given request id. |
| Methods inherited from class org.objectweb.cjdbc.controller.jmx.AbstractStandardMBean |
addNotificationListener, getAssociatedString, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getNotificationInfo, getParameterName, getParameterName, removeNotificationListener, removeNotificationListener, sendNotification |
| Methods inherited from class javax.management.StandardMBean |
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, invoke, setAttribute, setAttributes, setImplementation |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
static Trace logger
private long recoveringNb
| Constructor Detail |
protected AbstractRecoveryLog(java.lang.Class mBeanInterface)
throws javax.management.NotCompliantMBeanException
mBeanInterface - the MBean interface
javax.management.NotCompliantMBeanException - if the MBean is not JMX compliant| Method Detail |
public long getRecoveringNb()
getRecoveringNb in interface AbstractRecoveryLogMBean
public abstract void logRequest(AbstractWriteRequest request)
throws java.sql.SQLException
request - The write request to log
java.sql.SQLException - if an error occurs
public abstract void logRequest(StoredProcedure proc,
boolean isRead)
throws java.sql.SQLException
proc - The stored procedure call to logisRead - True if the stored procedure call returns a ResultSet
java.sql.SQLException - if an error occurs
public abstract long getLastTransactionId()
throws java.sql.SQLException
getLastTransactionId in interface AbstractRecoveryLogMBeanjava.sql.SQLException - if an error occured while retrieving the id.
public abstract void begin(TransactionMarkerMetaData tm)
throws java.sql.SQLException
tm - The transaction marker metadata
java.sql.SQLException - if an error occurs
public abstract void abort(TransactionMarkerMetaData tm)
throws java.sql.SQLException
tm - The transaction marker metadata
java.sql.SQLException - if an error occurs
public abstract void commit(TransactionMarkerMetaData tm)
throws java.sql.SQLException
tm - The transaction marker metadata
java.sql.SQLException - if an error occurs
public abstract void rollback(TransactionMarkerMetaData tm)
throws java.sql.SQLException
tm - The transaction marker metadata
java.sql.SQLException - if an error occurs
public abstract void storeCheckpoint(java.lang.String checkpointName)
throws java.sql.SQLException
storeCheckpoint in interface AbstractRecoveryLogMBeancheckpointName - Name of the checkpoint
java.sql.SQLException - if an error occurs
public abstract void storeCheckpoint(java.lang.String checkpointName,
long requestId)
throws java.sql.SQLException
storeCheckpoint in interface AbstractRecoveryLogMBeancheckpointName - Name of the checkpointrequestId - request identifier
java.sql.SQLException - if an error occurs
public abstract void removeCheckpoint(java.lang.String checkpointName)
throws java.sql.SQLException
removeCheckpoint in interface AbstractRecoveryLogMBeancheckpointName - to remove
java.sql.SQLException - if an error occurs
public abstract long getCheckpointRequestId(java.lang.String checkpointName)
throws java.sql.SQLException
getCheckpointRequestId in interface AbstractRecoveryLogMBeancheckpointName - Name of the checkpoint
java.sql.SQLException - if an error occursrecoverNextRequest(long)
public abstract RecoveryTask recoverNextRequest(long previousRequestId)
throws java.sql.SQLException
The id of the request before the first one to recover is given by getCheckpointRequestId.
previousRequestId - id of the previously recovered request
java.sql.SQLException - if an error occursgetCheckpointRequestId(String)public void beginRecovery()
public void endRecovery()
cleanRecoveryLog()public boolean isRecovering()
true if at least one backend has started a recover
process.
isRecovering in interface AbstractRecoveryLogMBeanboolean
public abstract void cleanRecoveryLog()
throws java.sql.SQLException
cleanRecoveryLog in interface AbstractRecoveryLogMBeanjava.sql.SQLException - if an error occurspublic java.lang.String getXml()
getXml in interface XmlComponentpublic abstract java.lang.String getXmlImpl()
XmlComponent.getXml()
public abstract java.util.ArrayList getCheckpointNames()
throws java.sql.SQLException
getCheckpointNames in interface AbstractRecoveryLogMBeanArrayList of String checkpoint names
java.sql.SQLException - if fails
public abstract void storeBackendInfo(java.lang.String databaseName,
java.lang.String backendName,
java.lang.String checkpoint,
int backendState)
throws java.sql.SQLException
storeBackendInfo in interface AbstractRecoveryLogMBeandatabaseName - name of the virtual databasebackendName - name of the backendcheckpoint - lastknown check point for this backendbackendState - the state of the backend
java.sql.SQLException - if cannot proceed
public abstract BackendRecoveryInfo getBackendInfo(java.lang.String databaseName,
java.lang.String backendName)
throws java.sql.SQLException
getBackendInfo in interface AbstractRecoveryLogMBeandatabaseName - the virtual database namebackendName - the backend name
BackendRecoveryInfo instance or null if the backend does not exist
- Throws:
java.sql.SQLException - if cannot proceedpublic abstract java.lang.String[][] getData()
String[][]RecoveryLogViewer
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||