|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.jcr.BackupService
public class BackupService
A service used to generate backups from content and restore repository content from backups.
Nested Class Summary | |
---|---|
static class |
BackupService.Activity
An abstract activity used for the various backup and restore operations. |
static class |
BackupService.BackupActivity
The BackupService.Activity subclass that performs content backup operations. |
protected static class |
BackupService.FieldName
|
static class |
BackupService.RestoreActivity
The BackupService.Activity subclass that performs content restore operations. |
Field Summary | |
---|---|
protected static String |
BINARY_AREA_DIR_NAME
|
protected static String |
BINARY_EXTENSION
|
protected static String |
CHANGED_AREA_DIR_NAME
|
static boolean |
DEFAULT_COMPRESS
|
static long |
DEFAULT_NUMBER_OF_DOCUMENTS_IN_BACKUP_FILES
By default, 100K nodes will be exported to a single backup file. |
protected static String |
DOCUMENTS_FILENAME_PREFIX
|
protected static Logger |
LOGGER
|
protected static int |
NUM_CHARS_IN_FILENAME_SUFFIX
|
protected static String |
SUMMARY_FILE_NAME
|
Constructor Summary | |
---|---|
protected |
BackupService(JcrRepository.RunningState runningState)
|
Method Summary | |
---|---|
Problems |
backupRepository(File backupDirectory)
Start asynchronously backing up the repository. |
Problems |
backupRepository(File backupDirectory,
long documentsPerFile,
boolean compress)
Start asynchronously backing up the repository. |
BackupService.BackupActivity |
createBackupActivity(File backupDirectory,
long documentsPerFile,
boolean compress)
Create a new activity instance that can back up the content of the repository as it exists at the
time the activity is executed. |
BackupService.RestoreActivity |
createRestoreActivity(File backupDirectory)
Create a new activity instance that can restore the content of the repository to the state as it
exists in the specified backup directory. |
Problems |
restoreRepository(JcrRepository repository,
File backupDirectory)
Start asynchronously backing up the repository. |
protected void |
shutdown()
Shut down this service and immediately terminate all currently-running backup operations. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Logger LOGGER
protected static final String CHANGED_AREA_DIR_NAME
protected static final String BINARY_AREA_DIR_NAME
protected static final String DOCUMENTS_FILENAME_PREFIX
protected static final String SUMMARY_FILE_NAME
protected static final String BINARY_EXTENSION
protected static final int NUM_CHARS_IN_FILENAME_SUFFIX
public static final long DEFAULT_NUMBER_OF_DOCUMENTS_IN_BACKUP_FILES
public static final boolean DEFAULT_COMPRESS
Constructor Detail |
---|
protected BackupService(JcrRepository.RunningState runningState)
Method Detail |
---|
protected void shutdown()
public Problems backupRepository(File backupDirectory) throws RepositoryException
backupDirectory
- the directory on the file system into which the backup should be placed; this directory should
typically not exist
RepositoryException
- if the backup operation cannot be runpublic Problems backupRepository(File backupDirectory, long documentsPerFile, boolean compress) throws RepositoryException
backupDirectory
- the directory on the file system into which the backup should be placed; this directory should
typically not existdocumentsPerFile
- the maximum number of documents to place within a single backup file; must be positivecompress
- true if the backup files should be compressed, or false otherwise
RepositoryException
- if the backup operation cannot be runpublic Problems restoreRepository(JcrRepository repository, File backupDirectory) throws RepositoryException
repository
- the JCR repository to be backed up; may not be nullbackupDirectory
- the directory on the file system that contains the backup; this directory obviously must exist
RepositoryException
- if the restoration operation cannot be runpublic BackupService.BackupActivity createBackupActivity(File backupDirectory, long documentsPerFile, boolean compress)
activity
instance that can back up the content of the repository as it exists at the
time the activity is executed.
backupDirectory
- the directory on the file system into which the backup should be placed; this directory should
typically not existdocumentsPerFile
- the maximum number of documents to place within a single backup file; must be positivecompress
- true if the backup files should be compressed, or false otherwise
public BackupService.RestoreActivity createRestoreActivity(File backupDirectory)
activity
instance that can restore the content of the repository to the state as it
exists in the specified backup directory.
backupDirectory
- the directory on the file system that contains the backup; this directory obviously must exist
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |