|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.backup.FileSystemStorageAgent
public class FileSystemStorageAgent
Implements a storage agent to store files in a directory on the file system. This could be on a shared file system, e.g., using NFS. To use this storage clients must at least set the directory location to hold files.
| Constructor Summary | |
|---|---|
FileSystemStorageAgent()
|
|
| Method Summary | |
|---|---|
void |
configure()
Complete plug-in configuration. |
protected long |
copyFile(java.io.File fromFile,
java.io.File toFile)
|
protected java.net.URI |
createUri(java.io.File file)
|
boolean |
delete(java.net.URI uri)
Deletes the indicated backup if it exists. |
boolean |
deleteAll()
Deletes all backups. |
protected java.lang.String |
formatErrorMessage(java.lang.String message,
java.net.URI uri,
java.io.File file)
|
java.io.File |
getDirectory()
Returns the directory location of the storage service. |
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. |
boolean |
isCrcCheckingEnabled()
Returns true if CRC checking is enabled. |
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. |
protected StorageIndex |
loadAndIncrementStorageIndex()
|
protected TungstenProperties |
loadProperties(java.io.File propFile,
java.lang.String exceptionMessage)
|
void |
release()
Release all resources used by plug-in. |
protected long |
renameFile(java.io.File fromFile,
java.io.File toFile)
|
BackupSpecification |
retrieve(java.net.URI uri)
Retrieves the backup corresponding to a particular URI. |
void |
setCrcCheckingEnabled(boolean crcCheckingEnabled)
Enables CRC checking on retrieved files. |
void |
setDirectory(java.io.File directory)
Sets the directory location of the storage service. |
void |
setRetention(int numberOfBackups)
Sets the number of backup files to retain. |
java.net.URI |
store(BackupSpecification backupSpec)
Stores a backup described by a particular backup specification, returning the URL of the backup. |
protected void |
storeProperties(java.io.File propFile,
TungstenProperties props,
java.lang.String exceptionMessage)
|
protected void |
validateUri(java.net.URI uri)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileSystemStorageAgent()
| Method Detail |
|---|
public int getRetention()
getRetention in interface StorageAgentStorageAgent.getRetention()public void setRetention(int numberOfBackups)
setRetention in interface StorageAgentStorageAgent.setRetention(int)public java.io.File getDirectory()
public void setDirectory(java.io.File directory)
public boolean isCrcCheckingEnabled()
public void setCrcCheckingEnabled(boolean crcCheckingEnabled)
crcCheckingEnabled -
public StorageSpecification[] list()
throws BackupException
list in interface StorageAgentBackupExceptionStorageAgent.list()
public java.net.URI last()
throws BackupException
last in interface StorageAgentBackupExceptionStorageAgent.last()
public StorageSpecification getSpecification(java.net.URI uri)
throws BackupException
getSpecification in interface StorageAgentBackupExceptionStorageAgent.getSpecification(java.net.URI)
public BackupSpecification retrieve(java.net.URI uri)
throws BackupException
retrieve in interface StorageAgentBackupExceptionStorageAgent.retrieve(java.net.URI)
public java.net.URI store(BackupSpecification backupSpec)
throws BackupException
store in interface StorageAgentBackupExceptionStorageAgent.store(com.continuent.tungsten.replicator.backup.BackupSpecification)
public boolean delete(java.net.URI uri)
throws BackupException
delete in interface StorageAgentBackupExceptionStorageAgent.delete(java.net.URI)
public boolean deleteAll()
throws BackupException
deleteAll in interface StorageAgentBackupExceptionStorageAgent.deleteAll()
public void configure()
throws BackupException
configure in interface BackupPluginBackupExceptionBackupPlugin.configure()
public void release()
throws BackupException
release in interface BackupPluginBackupExceptionBackupPlugin.release()
protected void validateUri(java.net.URI uri)
throws BackupException
BackupException
protected StorageIndex loadAndIncrementStorageIndex()
throws BackupException
BackupException
protected TungstenProperties loadProperties(java.io.File propFile,
java.lang.String exceptionMessage)
throws BackupException
BackupException
protected void storeProperties(java.io.File propFile,
TungstenProperties props,
java.lang.String exceptionMessage)
throws BackupException
BackupException
protected long renameFile(java.io.File fromFile,
java.io.File toFile)
throws BackupException
BackupException
protected long copyFile(java.io.File fromFile,
java.io.File toFile)
throws BackupException
BackupException
protected java.lang.String formatErrorMessage(java.lang.String message,
java.net.URI uri,
java.io.File file)
protected java.net.URI createUri(java.io.File file)
throws BackupException
BackupException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||