fr.paris.lutece.plugins.hipolite.database
Class ReplicationDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.hipolite.database.ReplicationDAO

public class ReplicationDAO
extends java.lang.Object

This class is used to execute the database requests


Constructor Summary
ReplicationDAO()
           
 
Method Summary
 void lockMasterTables(java.sql.Connection connection)
          Locks the master tables
 int masterShowStatus(java.sql.Connection connection)
          Shows the master status
 void resetMaster(java.sql.Connection connection)
          Resets the master
 void resetSlave(java.sql.Connection connection)
          Resets the slave
 int slaveShowStatus(java.sql.Connection connection)
          Shows the slave status
 void startSlave(java.sql.Connection connection)
          Starts the slave
 void stopSlave(java.sql.Connection connection)
          Stops the slave
 void unlockMasterTables(java.sql.Connection connection)
          Unlocks the master tables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplicationDAO

public ReplicationDAO()
Method Detail

resetMaster

public void resetMaster(java.sql.Connection connection)
                 throws java.sql.SQLException
Resets the master

Parameters:
connection - Connection
Throws:
java.sql.SQLException - If a SQL exception occurred

resetSlave

public void resetSlave(java.sql.Connection connection)
                throws java.sql.SQLException
Resets the slave

Parameters:
connection - Connection
Throws:
java.sql.SQLException - If a SQL exception occurred

lockMasterTables

public void lockMasterTables(java.sql.Connection connection)
                      throws java.sql.SQLException
Locks the master tables

Parameters:
connection - Connection
Throws:
java.sql.SQLException - If a SQL exception occurred

unlockMasterTables

public void unlockMasterTables(java.sql.Connection connection)
                        throws java.sql.SQLException
Unlocks the master tables

Parameters:
connection - Connection
Throws:
java.sql.SQLException - If a SQL exception occurred

startSlave

public void startSlave(java.sql.Connection connection)
                throws java.sql.SQLException
Starts the slave

Parameters:
connection - Connection
Throws:
java.sql.SQLException - If a SQL exception occurred

stopSlave

public void stopSlave(java.sql.Connection connection)
               throws java.sql.SQLException
Stops the slave

Parameters:
connection - Connection
Throws:
java.sql.SQLException - If a SQL exception occurred

masterShowStatus

public int masterShowStatus(java.sql.Connection connection)
                     throws java.sql.SQLException
Shows the master status

Parameters:
connection - Connection
Returns:
The master log position
Throws:
java.sql.SQLException - If a SQL exception occurred

slaveShowStatus

public int slaveShowStatus(java.sql.Connection connection)
                    throws java.sql.SQLException
Shows the slave status

Parameters:
connection - Connection
Returns:
The slave log position
Throws:
java.sql.SQLException - If a SQL exception occurred


Copyright © 2009 Mairie de Paris. All Rights Reserved.