Class RepositoryManager
- java.lang.Object
-
- javax.management.StandardMBean
-
- org.apache.jackrabbit.oak.commons.jmx.AnnotatedStandardMBean
-
- org.apache.jackrabbit.oak.management.RepositoryManager
-
- All Implemented Interfaces:
DynamicMBean,MBeanRegistration,RepositoryManagementMBean
public class RepositoryManager extends AnnotatedStandardMBean implements RepositoryManagementMBean
Default implementation of theRepositoryManagementMBeanbased on aWhiteboardinstance, which is used to look up individual service providers for backup (FileStoreBackupRestoreMBean), data store garbage collections (BlobGCMBean) and revision store garbage collections (RevisionGCMBean).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.api.jmx.RepositoryManagementMBean
RepositoryManagementMBean.StatusCode
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.oak.api.jmx.RepositoryManagementMBean
TYPE
-
-
Constructor Summary
Constructors Constructor Description RepositoryManager(@NotNull Whiteboard whiteboard)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull CompositeDatacancelRevisionGC()Cancel a running revision garbage collection operation.@NotNull CompositeDatacancelRevisionGCForRole(String role)Cancel a running revision garbage collection operation for a given role.Stringcheckpoint(long lifetime)Creates a new checkpoint of the latest root of the tree.CompositeDatagetBackupStatus()Backup statusCompositeDatagetDataStoreGCStatus()Data store garbage collection statusStringgetName()CompositeDatagetPropertyIndexAsyncReindexStatus()Asynchronous Property Index reindexing statusCompositeDatagetRestoreStatus()Restore statusCompositeDatagetRevisionGCStatus()Revision garbage collection status@NotNull CompositeDatagetRevisionGCStatusForRole(String role)Revision garbage collection status for a given role.StringgetSessionSaveDelayerConfig()Get the Session.save() delay configuration.TabularDatarefreshAllSessions()Refresh all currently open sessions.voidsetSessionSaveDelayerConfig(String config)Set the Session.save() delay configuration.CompositeDatastartBackup()Initiate a backup operation.CompositeDatastartDataStoreGC(boolean markOnly)Initiate a data store garbage collection operationCompositeDatastartPropertyIndexAsyncReindex()Initiate a reindex operation for the property indexes marked for reindexingCompositeDatastartRestore()Initiate a restore operation.CompositeDatastartRevisionGC()Initiate a revision garbage collection operationCompositeDatastartRevisionGCForRole(String role)Initiate a revision garbage collection operation-
Methods inherited from class org.apache.jackrabbit.oak.commons.jmx.AnnotatedStandardMBean
getDescription, getDescription, getDescription, getDescription, getImpact, getParameterName
-
Methods inherited from class javax.management.StandardMBean
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation
-
-
-
-
Constructor Detail
-
RepositoryManager
public RepositoryManager(@NotNull @NotNull Whiteboard whiteboard)
-
-
Method Detail
-
getName
public String getName()
-
startBackup
public CompositeData startBackup()
Description copied from interface:RepositoryManagementMBeanInitiate a backup operation.- Specified by:
startBackupin interfaceRepositoryManagementMBean- Returns:
- the status of the operation right after it was initiated
-
getBackupStatus
public CompositeData getBackupStatus()
Description copied from interface:RepositoryManagementMBeanBackup status- Specified by:
getBackupStatusin interfaceRepositoryManagementMBean- Returns:
- the status of the ongoing operation or if none the terminal status of the last operation or Status not available if none.
-
startRestore
public CompositeData startRestore()
Description copied from interface:RepositoryManagementMBeanInitiate a restore operation.- Specified by:
startRestorein interfaceRepositoryManagementMBean- Returns:
- the status of the operation right after it was initiated
-
getRestoreStatus
public CompositeData getRestoreStatus()
Description copied from interface:RepositoryManagementMBeanRestore status- Specified by:
getRestoreStatusin interfaceRepositoryManagementMBean- Returns:
- the status of the ongoing operation or if none the terminal status of the last operation or Status not available if none.
-
startDataStoreGC
public CompositeData startDataStoreGC(boolean markOnly)
Description copied from interface:RepositoryManagementMBeanInitiate a data store garbage collection operation- Specified by:
startDataStoreGCin interfaceRepositoryManagementMBean- Parameters:
markOnly- whether to only mark references and not sweep in the mark and sweep operation.- Returns:
- the status of the operation right after it was initiated
-
getDataStoreGCStatus
public CompositeData getDataStoreGCStatus()
Description copied from interface:RepositoryManagementMBeanData store garbage collection status- Specified by:
getDataStoreGCStatusin interfaceRepositoryManagementMBean- Returns:
- the status of the ongoing operation or if none the terminal status of the last operation or Status not available if none.
-
startRevisionGC
public CompositeData startRevisionGC()
Description copied from interface:RepositoryManagementMBeanInitiate a revision garbage collection operation- Specified by:
startRevisionGCin interfaceRepositoryManagementMBean- Returns:
- the status of the operation right after it was initiated
-
startRevisionGCForRole
public CompositeData startRevisionGCForRole(String role)
Description copied from interface:RepositoryManagementMBeanInitiate a revision garbage collection operation- Specified by:
startRevisionGCForRolein interfaceRepositoryManagementMBean- Returns:
- the status of the operation right after it was initiated
-
cancelRevisionGC
@NotNull public @NotNull CompositeData cancelRevisionGC()
Description copied from interface:RepositoryManagementMBeanCancel a running revision garbage collection operation. Does nothing if revision garbage collection is not running.- Specified by:
cancelRevisionGCin interfaceRepositoryManagementMBean- Returns:
- the status of the operation right after it was initiated
-
cancelRevisionGCForRole
@NotNull public @NotNull CompositeData cancelRevisionGCForRole(String role)
Description copied from interface:RepositoryManagementMBeanCancel a running revision garbage collection operation for a given role. Does nothing if revision garbage collection is not running.- Specified by:
cancelRevisionGCForRolein interfaceRepositoryManagementMBean- Returns:
- the status of the operation right after it was initiated
-
getRevisionGCStatus
public CompositeData getRevisionGCStatus()
Description copied from interface:RepositoryManagementMBeanRevision garbage collection status- Specified by:
getRevisionGCStatusin interfaceRepositoryManagementMBean- Returns:
- the status of the ongoing operation or if none the terminal status of the last operation or Status not available if none.
-
getRevisionGCStatusForRole
@NotNull public @NotNull CompositeData getRevisionGCStatusForRole(String role)
Description copied from interface:RepositoryManagementMBeanRevision garbage collection status for a given role.- Specified by:
getRevisionGCStatusForRolein interfaceRepositoryManagementMBean- Returns:
- the status of the ongoing operation or if none the terminal status of the last operation or Status not available if none.
-
checkpoint
public String checkpoint(long lifetime)
Description copied from interface:RepositoryManagementMBeanCreates a new checkpoint of the latest root of the tree. The checkpoint remains valid for at least as long as requested and allows that state of the repository to be retrieved using the returned opaque string reference.- Specified by:
checkpointin interfaceRepositoryManagementMBean- Parameters:
lifetime- time (in milliseconds, > 0) that the checkpoint should remain available- Returns:
- string reference of this checkpoint or
nullif the checkpoint could not be set.
-
startPropertyIndexAsyncReindex
public CompositeData startPropertyIndexAsyncReindex()
Description copied from interface:RepositoryManagementMBeanInitiate a reindex operation for the property indexes marked for reindexing- Specified by:
startPropertyIndexAsyncReindexin interfaceRepositoryManagementMBean- Returns:
- the status of the operation right after it was initiated
-
getPropertyIndexAsyncReindexStatus
public CompositeData getPropertyIndexAsyncReindexStatus()
Description copied from interface:RepositoryManagementMBeanAsynchronous Property Index reindexing status- Specified by:
getPropertyIndexAsyncReindexStatusin interfaceRepositoryManagementMBean- Returns:
- the status of the ongoing operation or if none the terminal status of the last operation or Status not available if none.
-
refreshAllSessions
public TabularData refreshAllSessions()
Description copied from interface:RepositoryManagementMBeanRefresh all currently open sessions. Warning: this operation might be disruptive to the owner of the affected sessions- Specified by:
refreshAllSessionsin interfaceRepositoryManagementMBean
-
getSessionSaveDelayerConfig
public String getSessionSaveDelayerConfig()
Description copied from interface:RepositoryManagementMBeanGet the Session.save() delay configuration.- Specified by:
getSessionSaveDelayerConfigin interfaceRepositoryManagementMBean- Returns:
- the configuration
-
setSessionSaveDelayerConfig
public void setSessionSaveDelayerConfig(String config)
Description copied from interface:RepositoryManagementMBeanSet the Session.save() delay configuration.- Specified by:
setSessionSaveDelayerConfigin interfaceRepositoryManagementMBean- Parameters:
config- the new configuration
-
-