|
|
Choosing A Webhost: |
CVS update of sequoia/src/org/continuent/sequoia/controller/backup/backuper: msg#00026db.sequoia.cvs
Date: Monday, October 9, 2006 @ 19:03:18 Author: olivier Path: .../sequoia/src/org/continuent/sequoia/controller/backup/backupers Modified: DerbyEmbeddedBackuper.java (1.5 -> 1.6) MSSQLBackuper.java (1.4 -> 1.5) - now using AbstractBackuper zuperclass ----------------------------+ DerbyEmbeddedBackuper.java | 31 +--------------------- MSSQLBackuper.java | 60 ------------------------------------------- 2 files changed, 3 insertions(+), 88 deletions(-) Index: sequoia/src/org/continuent/sequoia/controller/backup/backupers/DerbyEmbeddedBackuper.java diff -u sequoia/src/org/continuent/sequoia/controller/backup/backupers/DerbyEmbeddedBackuper.java:1.5 sequoia/src/org/continuent/sequoia/controller/backup/backupers/DerbyEmbeddedBackuper.java:1.6 --- sequoia/src/org/continuent/sequoia/controller/backup/backupers/DerbyEmbeddedBackuper.java:1.5 Fri Dec 9 01:02:18 2005 +++ sequoia/src/org/continuent/sequoia/controller/backup/backupers/DerbyEmbeddedBackuper.java Mon Oct 9 19:03:18 2006 @@ -30,8 +30,6 @@ import org.continuent.sequoia.common.log.Trace; import org.continuent.sequoia.common.util.FileManagement; import org.continuent.sequoia.controller.backend.DatabaseBackend; -import org.continuent.sequoia.controller.backup.BackupManager; -import org.continuent.sequoia.controller.backup.Backuper; import org.continuent.sequoia.controller.backup.DumpTransferInfo; /** @@ -45,7 +43,7 @@ * @author <a href="mailto:emmanuel.cecchet-/eG6/0/w8L8WhyVFc8JwjA@xxxxxxxxxxxxxxxx">Emmanuel Cecchet</a> * @version 1.0 */ -public class DerbyEmbeddedBackuper implements Backuper +public class DerbyEmbeddedBackuper extends AbstractBackuper { static Trace logger = Trace.getLogger(DerbyEmbeddedBackuper.class.getName()); @@ -65,22 +63,6 @@ } /** - * @see org.continuent.sequoia.controller.backup.Backuper#getOptions() - */ - public String getOptions() - { - return null; - } - - /** - * @see org.continuent.sequoia.controller.backup.Backuper#setOptions(java.lang.String) - */ - public void setOptions(String options) - { - // Ignored, no options - } - - /** * @see org.continuent.sequoia.controller.backup.Backuper#backup(org.continuent.sequoia.controller.backend.DatabaseBackend, * java.lang.String, java.lang.String, java.lang.String, * java.lang.String, java.util.ArrayList) @@ -221,16 +203,7 @@ public void fetchDump(DumpTransferInfo dumpTransferInfo, String path, String dumpName) throws BackupException, IOException { - BackupManager.fetchDumpFile(dumpTransferInfo, path, dumpName - + Zipper.ZIP_EXT); - } - - /** - * @see org.continuent.sequoia.controller.backup.Backuper#setupDumpServer() - */ - public DumpTransferInfo setupDumpServer() throws IOException - { - return BackupManager.setupDumpFileServer(); + super.fetchDump(dumpTransferInfo, path, dumpName + Zipper.ZIP_EXT); } } Index: sequoia/src/org/continuent/sequoia/controller/backup/backupers/MSSQLBackuper.java diff -u sequoia/src/org/continuent/sequoia/controller/backup/backupers/MSSQLBackuper.java:1.4 sequoia/src/org/continuent/sequoia/controller/backup/backupers/MSSQLBackuper.java:1.5 --- sequoia/src/org/continuent/sequoia/controller/backup/backupers/MSSQLBackuper.java:1.4 Mon May 29 12:09:54 2006 +++ sequoia/src/org/continuent/sequoia/controller/backup/backupers/MSSQLBackuper.java Mon Oct 9 19:03:18 2006 @@ -29,18 +29,13 @@ import java.sql.Statement; import java.util.ArrayList; import java.util.Date; -import java.util.HashMap; import java.util.Iterator; -import java.util.StringTokenizer; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.continuent.sequoia.common.exceptions.BackupException; import org.continuent.sequoia.common.log.Trace; import org.continuent.sequoia.controller.backend.DatabaseBackend; -import org.continuent.sequoia.controller.backup.BackupManager; -import org.continuent.sequoia.controller.backup.Backuper; -import org.continuent.sequoia.controller.backup.DumpTransferInfo; /** * MSSQL backuper inspired from the PostgreSQL backuper. <br> @@ -69,10 +64,8 @@ * @author <a href="mailto:emmanuel.cecchet-NAAfj4rwCWC8rjiVs5Nzzw@xxxxxxxxxxxxxxxx">Emmanuel Cecchet</a> * @author <a href="mailto:stephane.giron-NAAfj4rwCWC8rjiVs5Nzzw@xxxxxxxxxxxxxxxx">Stephane Giron</a> */ -public class MSSQLBackuper implements Backuper +public class MSSQLBackuper extends AbstractBackuper { - protected HashMap optionsMap = new HashMap(); - protected String optionsString = null; private static final String DEFAULT_MSSQL_PORT = "1433"; private static final String DEFAULT_MSSQL_HOST = "localhost"; @@ -104,39 +97,6 @@ } /** - * @see Backuper#getOptions() - */ - public String getOptions() - { - return optionsString; - } - - /** - * @see Backuper#setOptions(java.lang.String) - */ - public void setOptions(String options) - { - if (options != null) - { - StringTokenizer strTok = new StringTokenizer(options, ","); - String option = null; - String name = null; - String value = null; - - // Parse the string of options, add them to the HashMap - while (strTok.hasMoreTokens()) - { - option = strTok.nextToken(); - name = option.substring(0, option.indexOf("=")); - value = option.substring(option.indexOf("=") + 1, option.length()); - optionsMap.put(name, value); - } - - optionsString = options; - } - } - - /** * @see org.continuent.sequoia.controller.backup.Backuper#backup(org.continuent.sequoia.controller.backend.DatabaseBackend, * java.lang.String, java.lang.String, java.lang.String, * java.lang.String, java.util.ArrayList) @@ -380,24 +340,6 @@ } /** - * @see org.continuent.sequoia.controller.backup.Backuper#fetchDump(org.continuent.sequoia.controller.backup.DumpTransferInfo, - * java.lang.String, java.lang.String) - */ - public void fetchDump(DumpTransferInfo dumpTransferInfo, String path, - String dumpName) throws BackupException, IOException - { - BackupManager.fetchDumpFile(dumpTransferInfo, path, dumpName); - } - - /** - * @see org.continuent.sequoia.controller.backup.Backuper#setupDumpServer() - */ - public DumpTransferInfo setupDumpServer() throws IOException - { - return BackupManager.setupDumpFileServer(); - } - - /** * Allow to parse PostgreSQL URL. */ protected class MSSQLUrlInfo
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | CVS update of sequoia/src/org/continuent/sequoia/controller/backup/backupers (1 file), olivier-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
|---|---|
| Next by Date: | CVS update of sequoia/src/org/continuent/sequoia/controller/backup/backupers (1 file), olivier-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Previous by Thread: | CVS update of sequoia/src/org/continuent/sequoia/controller/backup/backupers (2 files), olivier-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Next by Thread: | CVS update of sequoia/src/org/continuent/sequoia/controller/backup/backupers (2 files), emmanuel-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |