com.continuent.tungsten.replicator.backup
Class DummyBackupAgent

java.lang.Object
  extended by com.continuent.tungsten.replicator.backup.DummyBackupAgent
All Implemented Interfaces:
BackupAgent, BackupPlugin

public class DummyBackupAgent
extends java.lang.Object
implements BackupAgent

Implements a dummy backup agent used for unit testing.

Version:
1.0
Author:
Robert Hodges

Constructor Summary
DummyBackupAgent()
           
 
Method Summary
 BackupSpecification backup()
          Back up the database.
 BackupCapabilities capabilities()
          Returns default capabilities.
 void configure()
          Complete plug-in configuration.
 void release()
          Release all resources used by plug-in.
 void restore(BackupSpecification spec)
          Restore the database from a backup.
 void setDirectory(java.io.File directory)
           
 void setFail(boolean fail)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyBackupAgent

public DummyBackupAgent()
Method Detail

setDirectory

public void setDirectory(java.io.File directory)

setFail

public void setFail(boolean fail)

backup

public BackupSpecification backup()
                           throws BackupException
Description copied from interface: BackupAgent
Back up the database.

Specified by:
backup in interface BackupAgent
Throws:
BackupException

restore

public void restore(BackupSpecification spec)
             throws BackupException
Description copied from interface: BackupAgent
Restore the database from a backup.

Specified by:
restore in interface BackupAgent
Throws:
BackupException

configure

public void configure()
               throws BackupException
Complete plug-in configuration. This is called after setters are invoked.

Specified by:
configure in interface BackupPlugin
Throws:
BackupException
See Also:
BackupPlugin.configure()

release

public void release()
             throws BackupException
Release all resources used by plug-in. This is called before the plug-in is deallocated.

Specified by:
release in interface BackupPlugin
Throws:
BackupException
See Also:
BackupPlugin.release()

capabilities

public BackupCapabilities capabilities()
Returns default capabilities. Returns capabilities of this backup agent.

Specified by:
capabilities in interface BackupAgent
See Also:
BackupAgent.capabilities()