com.continuent.tungsten.replicator.backup
Interface StorageAgent

All Superinterfaces:
BackupPlugin
All Known Implementing Classes:
FileSystemStorageAgent

public interface StorageAgent
extends BackupPlugin

Denotes a class that implements a storage agent that can store and retrieve files.

Version:
1.0
Author:
Robert Hodges

Method Summary
 boolean delete(java.net.URI uri)
          Deletes the indicated backup if it exists.
 boolean deleteAll()
          Deletes all backups.
 int getRetention()
          Returns the number of backup files that should be retained before deleting old files.
 StorageSpecification getSpecification(java.net.URI uri)
          Returns the storage specification of a particular backup or null if no such specification exists.
 java.net.URI last()
          Returns the URI of the most recent backup in storage or null if no backups exist
 StorageSpecification[] list()
          Returns the storage specifications of all backups in storage ordered from oldest to most recent.
 BackupSpecification retrieve(java.net.URI uri)
          Retrieves the backup corresponding to a particular URI.
 void setRetention(int numberOfBackups)
          Sets the number of backup files to retain.
 java.net.URI store(BackupSpecification specification)
          Stores a backup described by a particular backup specification, returning the URL of the backup.
 
Methods inherited from interface com.continuent.tungsten.replicator.backup.BackupPlugin
configure, release
 

Method Detail

getRetention

int getRetention()
Returns the number of backup files that should be retained before deleting old files.


setRetention

void setRetention(int numberOfBackups)
Sets the number of backup files to retain.


list

StorageSpecification[] list()
                            throws BackupException
Returns the storage specifications of all backups in storage ordered from oldest to most recent.

Throws:
BackupException

last

java.net.URI last()
                  throws BackupException
Returns the URI of the most recent backup in storage or null if no backups exist

Throws:
BackupException

getSpecification

StorageSpecification getSpecification(java.net.URI uri)
                                      throws BackupException
Returns the storage specification of a particular backup or null if no such specification exists.

Throws:
BackupException

store

java.net.URI store(BackupSpecification specification)
                   throws BackupException
Stores a backup described by a particular backup specification, returning the URL of the backup.

Throws:
BackupException

retrieve

BackupSpecification retrieve(java.net.URI uri)
                             throws BackupException
Retrieves the backup corresponding to a particular URI.

Throws:
BackupException

delete

boolean delete(java.net.URI uri)
               throws BackupException
Deletes the indicated backup if it exists.

Returns:
True if backup was found and deleted, otherwise false
Throws:
BackupException

deleteAll

boolean deleteAll()
                  throws BackupException
Deletes all backups.

Returns:
True if all backups were successfully deleted (also returns true if there are no backups found)
Throws:
BackupException