public class JcrRepositoryManager extends Object implements RepositoryManager
Modifier | Constructor and Description |
---|---|
protected |
JcrRepositoryManager(org.modeshape.jcr.JcrWorkspace workspace) |
Modifier and Type | Method and Description |
---|---|
Problems |
backupRepository(File backupDirectory)
Begin a backup operation of the entire repository, writing the files associated with the backup to the specified directory
on the local file system.
|
Problems |
backupRepository(File backupDirectory,
BackupOptions backupOptions)
Begin a backup operation of the entire repository, writing the files associated with the backup to the specified directory
on the local file system.
|
JcrRepositoryMonitor |
getRepositoryMonitor()
A
RepositoryMonitor object represents a monitoring view of the Session's Repository instance. |
org.modeshape.jcr.JcrWorkspace |
getWorkspace()
Return the
Workspace object through which this repository manager was created. |
Problems |
restoreRepository(File backupDirectory)
Begin a restore operation of the entire repository, reading the backup files in the specified directory on the local file
system.
|
Problems |
restoreRepository(File backupDirectory,
RestoreOptions options)
Begin a restore operation of the entire repository, reading the backup files in the specified directory on the local file
system.
|
protected JcrRepositoryManager(org.modeshape.jcr.JcrWorkspace workspace)
public org.modeshape.jcr.JcrWorkspace getWorkspace()
RepositoryManager
Workspace
object through which this repository manager was created.getWorkspace
in interface RepositoryManager
public JcrRepositoryMonitor getRepositoryMonitor() throws RepositoryException
RepositoryManager
RepositoryMonitor
object represents a monitoring view of the Session's Repository instance. This is useful
for applications that embed a JCR repository and need a way to monitor the health, status and performance of that
Repository instance. Each RepositoryMonitor
object is associated one-to-one with a Session
object
and is defined by the authorization settings of that session object.
The RepositoryMonitor
object can be acquired using a Session
by calling
Session.getWorkspace().getRepositoryMonitor()
on a session object.
getRepositoryMonitor
in interface RepositoryManager
RepositoryException
- if there is a problem obtaining the monitorypublic Problems backupRepository(File backupDirectory) throws RepositoryException
RepositoryManager
The repository must be active when this operation is invoked, and it can continue to be used during backup (e.g., this can be a "live" backup operation), but this is not recommended if the backup will be used as part of a migration to a different version of ModeShape or to different installation.
Multiple backup operations can operate at the same time, so it is the responsibility of the caller to not overload the repository with backup operations.
backupRepository
in interface RepositoryManager
backupDirectory
- the directory on the local file system into which all backup files will be written; this directory
need not exist, but the process must have write privilege for this directoryAccessDeniedException
- if the current session does not have sufficient privileges to perform the backupRepositoryException
- if the backup cannot be runpublic Problems backupRepository(File backupDirectory, BackupOptions backupOptions) throws RepositoryException
RepositoryManager
The repository must be active when this operation is invoked, and it can continue to be used during backup (e.g., this can be a "live" backup operation), but this is not recommended if the backup will be used as part of a migration to a different version of ModeShape or to different installation.
Multiple backup operations can operate at the same time, so it is the responsibility of the caller to not overload the repository with backup operations.
backupRepository
in interface RepositoryManager
backupDirectory
- the directory on the local file system into which all backup files will be written; this directory
need not exist, but the process must have write privilege for this directorybackupOptions
- a BackupOptions
instance which can be used for more fine-grained control
of the elements that are backed up.AccessDeniedException
- if the current session does not have sufficient privileges to perform the backupRepositoryException
- if the backup cannot be runpublic Problems restoreRepository(File backupDirectory) throws RepositoryException
RepositoryManager
The repository must be active when this operation is invoked. However, the repository may not be used by any other activities during the restore operation; doing so will likely result in a corrupt repository.
It is the responsibility of the caller to ensure that this method is only invoked once; calling multiple times wil lead to a corrupt repository.
restoreRepository
in interface RepositoryManager
backupDirectory
- the directory on the local file system in which all backup files exist and were written by a
previous backup operation
; this directory must exist, and the process must have read
privilege for all contents in this directoryAccessDeniedException
- if the current session does not have sufficient privileges to perform the restoreRepositoryException
- if the restoration cannot be runpublic Problems restoreRepository(File backupDirectory, RestoreOptions options) throws RepositoryException
RepositoryManager
The repository must be active when this operation is invoked. However, the repository may not be used by any other activities during the restore operation; doing so will likely result in a corrupt repository.
It is the responsibility of the caller to ensure that this method is only invoked once; calling multiple times wil lead to a corrupt repository.
restoreRepository
in interface RepositoryManager
backupDirectory
- the directory on the local file system in which all backup files exist and were written by a
previous backup operation
; this directory must exist, and the process must have read
privilege for all contents in this directoryoptions
- a RestoreOptions
instance which can be used to control the elements and the
behavior of the restore process.AccessDeniedException
- if the current session does not have sufficient privileges to perform the restoreRepositoryException
- if the restoration cannot be runCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.