db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oyste...@apache.org
Subject svn commit: r631527 - in /db/derby/code/trunk/java/engine/org/apache/derby: database/Database.java iapi/db/Database.java
Date Wed, 27 Feb 2008 09:39:55 GMT
Author: oysteing
Date: Wed Feb 27 01:39:51 2008
New Revision: 631527

URL: http://svn.apache.org/viewvc?rev=631527&view=rev
Log:
DERBY-3455: Move replication methods from org.apache.derby.database.Database to org.apache.derby.iapi.db.Database
Contributed by V Narayanan

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/database/Database.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/db/Database.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/database/Database.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/database/Database.java?rev=631527&r1=631526&r2=631527&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/database/Database.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/database/Database.java Wed Feb 27 01:39:51
2008
@@ -99,32 +99,6 @@
     boolean deleteOnlineArchivedLogFiles,
     boolean wait) 
         throws SQLException;
-    
-    /**
-     * Start failover for the given database.
-     * 
-     * @param dbname the replication database that is being failed over.
-     *
-     * @exception SQLException   1) If the failover succeeds, an exception is
-     *                              thrown to indicate that the master database
-     *                              was shutdown after a successful failover
-     *                           2) If a failure occurs during network 
-     *                              communication with slave.
-     */
-    public void failover(String dbname) throws SQLException;
-
-    /**
-     * Returns true if this database is in replication slave mode,
-     * false otherwise
-     */
-    public boolean isInSlaveMode();
-
-    /**
-     * Stop the replication slave role for the given database.
-     * 
-     * @exception SQLException Thrown on error
-     */
-    public void stopReplicationSlave() throws SQLException;
 
 	/**
 	 * Disables the log archival process, i.e No old log files
@@ -140,27 +114,6 @@
 	 */
 	public void disableLogArchiveMode(boolean deleteOnlineArchivedLogFiles) 
 		throws SQLException;
-
-    /**
-     * Start the replication master role for this database
-     * @param dbmaster The master database that is being replicated.
-     * @param host The hostname for the slave
-     * @param port The port the slave is listening on
-     * @param replicationMode The type of replication contract.
-     * Currently only asynchronous replication is supported, but
-     * 1-safe/2-safe/very-safe modes may be added later.
-     * @exception SQLException Thrown on error
-     */
-    public void startReplicationMaster(String dbmaster, String host, int port, 
-                                       String replicationMode)
-        throws SQLException;
-    
-    /**
-     * Stop the replication master role for the given database.
-     * 
-     * @exception SQLException Thrown on error
-     */
-    public void stopReplicationMaster() throws SQLException;
 
 	/**
 	  * Freeze the database temporarily so a backup can be taken.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/db/Database.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/db/Database.java?rev=631527&r1=631526&r2=631527&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/db/Database.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/db/Database.java Wed Feb 27 01:39:51
2008
@@ -31,6 +31,7 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.sql.Date;
+import java.sql.SQLException;
 import java.util.Hashtable;
 import java.util.Locale;
 
@@ -126,5 +127,54 @@
      * Return the DataDictionary for this database, set up at boot time.
      */
     public DataDictionary getDataDictionary();
+        
+    /**
+     * Start failover for the given database.
+     * 
+     * @param dbname the replication database that is being failed over.
+     *
+     * @exception SQLException   1) If the failover succeeds, an exception is
+     *                              thrown to indicate that the master database
+     *                              was shutdown after a successful failover
+     *                           2) If a failure occurs during network 
+     *                              communication with slave.
+     */
+    public void failover(String dbname) throws SQLException;
 
+    /**
+     * Used to indicated whether the database is in the replication
+     * slave mode.
+     *
+     * @return true if this database is in replication slave mode,
+     *         false otherwise.
+     */
+    public boolean isInSlaveMode();
+
+    /**
+     * Stop the replication slave role for the given database.
+     * 
+     * @exception SQLException Thrown on error
+     */
+    public void stopReplicationSlave() throws SQLException;
+    
+    /**
+     * Start the replication master role for this database
+     * @param dbmaster The master database that is being replicated.
+     * @param host The hostname for the slave
+     * @param port The port the slave is listening on
+     * @param replicationMode The type of replication contract.
+     * Currently only asynchronous replication is supported, but
+     * 1-safe/2-safe/very-safe modes may be added later.
+     * @exception SQLException Thrown on error
+     */
+    public void startReplicationMaster(String dbmaster, String host, int port, 
+                                       String replicationMode)
+        throws SQLException;
+    
+    /**
+     * Stop the replication master role for the given database.
+     * 
+     * @exception SQLException Thrown on error
+     */
+    public void stopReplicationMaster() throws SQLException;
 }



Mime
View raw message