Class DataStoreGarbageCollectorTask
java.lang.Object
org.ametys.workspaces.repository.maintenance.AbstractMaintenanceTask
org.ametys.workspaces.repository.maintenance.DataStoreGarbageCollectorTask
- All Implemented Interfaces:
LogEnabled
,MarkEventListener
public class DataStoreGarbageCollectorTask
extends AbstractMaintenanceTask
implements MarkEventListener
DataStoreGarbageCollectorTask
-
Field Summary
Modifier and TypeFieldDescriptionprotected RepositoryContext
The JackRabbit RepositoryImpl Contextprotected Session
The JCR Session bound to this task.Fields inherited from class org.ametys.workspaces.repository.maintenance.AbstractMaintenanceTask
_logger, _progress, _repositoryConfig, _repositoryProvider
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
apply()
Apply the tasks (within the execute method()).void
protected void
close()
Close the tasksprotected PersistenceManager
Retrieves JackRabbit Persistence Manager for currently opened repository.protected void
Initialize the tasks.protected void
Set the tasks logger.Methods inherited from class org.ametys.workspaces.repository.maintenance.AbstractMaintenanceTask
_getFormattedDuration, execute, getProgressInfo, isFinished, setLogger
-
Field Details
-
_repositoryContext
The JackRabbit RepositoryImpl Context -
_session
The JCR Session bound to this task.
-
-
Constructor Details
-
DataStoreGarbageCollectorTask
public DataStoreGarbageCollectorTask()
-
-
Method Details
-
initialize
Description copied from class:AbstractMaintenanceTask
Initialize the tasks. This method can also create theTaskProgress
object bounded to the task.- Overrides:
initialize
in classAbstractMaintenanceTask
- Throws:
RepositoryException
- If a repository exception
-
setLogger
Description copied from class:AbstractMaintenanceTask
Set the tasks logger.- Specified by:
setLogger
in classAbstractMaintenanceTask
-
apply
Description copied from class:AbstractMaintenanceTask
Apply the tasks (within the execute method()).- Specified by:
apply
in classAbstractMaintenanceTask
- Throws:
RepositoryException
- If a repository exception
-
close
Description copied from class:AbstractMaintenanceTask
Close the tasks- Overrides:
close
in classAbstractMaintenanceTask
-
beforeScanning
- Specified by:
beforeScanning
in interfaceMarkEventListener
- Throws:
RepositoryException
-
getPM
Retrieves JackRabbit Persistence Manager for currently opened repository. This method uses Privileged access and will fail with security exception if used in environment with enabled security manager.- Parameters:
workspaceName
- The workspace name- Returns:
- Persistence manager used by repository.
- Throws:
RepositoryException
- If an error occurs while retrieving the persistence manager
-