org.objectweb.cjdbc.common.jmx.mbeans
Interface AbstractRecoveryLogMBean

All Known Implementing Classes:
AbstractRecoveryLog, JDBCRecoveryLog

public interface AbstractRecoveryLogMBean

This class defines a AbstractRecoveryLogMBean

Version:
1.0
Author:
Nicolas Modrzyk

Method Summary
 void cleanRecoveryLog()
          Possibly clean the recovery log after all recovery process are done.
 BackendRecoveryInfo getBackendInfo(java.lang.String databaseName, java.lang.String backendName)
          Retrieve recovery information on a backend.
 java.util.ArrayList getCheckpointNames()
          Returns an array of names of all the checkpoint available in the recovery log
 long getCheckpointRequestId(java.lang.String checkpointName)
          Get the request id corresponding to a given checkpoint.
 long getLastTransactionId()
          Get the id of the last transaction logged in the recovery log.
 long getRecoveringNb()
          Returns the recoveringNb value.
 boolean isRecovering()
          Returns true if at least one backend has started a recover process.
 void removeCheckpoint(java.lang.String checkpointName)
          Remove a checkpoint from the recovery.
 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
 void storeCheckpoint(java.lang.String checkpointName)
          Store a Checkpoint using the current log state.
 void storeCheckpoint(java.lang.String checkpointName, long requestId)
          Store a Checkpoint using the given request id.
 

Method Detail

getRecoveringNb

public long getRecoveringNb()
Returns the recoveringNb value.

Returns:
Returns the recoveringNb.

getLastTransactionId

public long getLastTransactionId()
                          throws java.sql.SQLException
Get the id of the last transaction logged in the recovery log.

Returns:
the last transaction id.
Throws:
java.sql.SQLException - if an error occurs

storeCheckpoint

public void storeCheckpoint(java.lang.String checkpointName)
                     throws java.sql.SQLException
Store a Checkpoint using the current log state.

Parameters:
checkpointName - Name of the checkpoint
Throws:
java.sql.SQLException - if an error occurs

storeCheckpoint

public void storeCheckpoint(java.lang.String checkpointName,
                            long requestId)
                     throws java.sql.SQLException
Store a Checkpoint using the given request id.

Parameters:
checkpointName - Name of the checkpoint
requestId - request identifier
Throws:
java.sql.SQLException - if an error occurs

removeCheckpoint

public void removeCheckpoint(java.lang.String checkpointName)
                      throws java.sql.SQLException
Remove a checkpoint from the recovery. This is useful for recovery maintenant

Parameters:
checkpointName - to remove
Throws:
java.sql.SQLException - if an error occurs

getCheckpointRequestId

public long getCheckpointRequestId(java.lang.String checkpointName)
                            throws java.sql.SQLException
Get the request id corresponding to a given checkpoint. This is the first step in a recovery process. Following steps consist in calling recoverNextRequest.

Parameters:
checkpointName - Name of the checkpoint
Returns:
int the request identifier corresponding to this checkpoint.
Throws:
java.sql.SQLException - if an error occurs
See Also:
#recoverNextRequest(long)

isRecovering

public boolean isRecovering()
Returns true if at least one backend has started a recover process.

Returns:
boolean

cleanRecoveryLog

public void cleanRecoveryLog()
                      throws java.sql.SQLException
Possibly clean the recovery log after all recovery process are done.

Throws:
java.sql.SQLException - if an error occurs

getCheckpointNames

public java.util.ArrayList getCheckpointNames()
                                       throws java.sql.SQLException
Returns an array of names of all the checkpoint available in the recovery log

Returns:
ArrayList of String checkpoint names
Throws:
java.sql.SQLException - if fails

storeBackendInfo

public void storeBackendInfo(java.lang.String databaseName,
                             java.lang.String backendName,
                             java.lang.String checkpoint,
                             int backendState)
                      throws java.sql.SQLException
Store the state of the backend in the recovery log

Parameters:
databaseName - name of the virtual database
backendName - name of the backend
checkpoint - lastknown check point for this backend
backendState - the state of the backend
Throws:
java.sql.SQLException - if cannot proceed

getBackendInfo

public BackendRecoveryInfo getBackendInfo(java.lang.String databaseName,
                                          java.lang.String backendName)
                                   throws java.sql.SQLException
Retrieve recovery information on a backend. This includes, the last known state of the backend, and the last known checkpoint

Parameters:
databaseName - the virtual database name
backendName - the backend name
Returns:
BackendRecoveryInfo instance or null if the backend does not exist
Throws:
java.sql.SQLException - if cannot proceed


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