public class DataStoreGarbageCollectorTask extends AbstractMaintenanceTask implements MarkEventListener
Modifier and Type | Field and Description |
---|---|
private GarbageCollector |
_garbageCollector |
private IterablePersistenceManager[] |
_pmList |
protected RepositoryContext |
_repositoryContext
The JackRabbit RepositoryImpl Context
|
private int |
_scannedNodesCount
Internal counter for scanned node by the GC
|
protected Session |
_session
The JCR Session bound to this task.
|
private static int |
SYSTEM_GC_CALLS |
_logger, _progress, _repositoryConfig, _repositoryProvider
Constructor and Description |
---|
DataStoreGarbageCollectorTask() |
Modifier and Type | Method and Description |
---|---|
private void |
_derbyCompressTable(DbDataStore ds)
Reclaiming unused space.
|
private long |
_reportDataStoreInfo(DataStore ds) |
protected void |
apply()
Apply the tasks (within the execute method()).
|
void |
beforeScanning(Node n) |
protected void |
close()
Close the tasks
|
private static Object |
findAndInvokeMethod(Object obj,
String name,
Object[] parameters) |
protected PersistenceManager |
getPM(String workspaceName)
Retrieves JackRabbit Persistence Manager for currently opened repository.
|
protected void |
initialize()
Initialize the tasks.
|
protected void |
setLogger()
Set the tasks logger.
|
_getFormattedDuration, execute, getProgressInfo, isFinished, setLogger
private static final int SYSTEM_GC_CALLS
protected RepositoryContext _repositoryContext
private GarbageCollector _garbageCollector
private IterablePersistenceManager[] _pmList
private int _scannedNodesCount
public DataStoreGarbageCollectorTask()
protected void initialize() throws RepositoryException
AbstractMaintenanceTask
TaskProgress
object bounded to the task.initialize
in class AbstractMaintenanceTask
RepositoryException
- If a repository exceptionprotected void setLogger()
AbstractMaintenanceTask
setLogger
in class AbstractMaintenanceTask
protected void apply() throws RepositoryException
AbstractMaintenanceTask
apply
in class AbstractMaintenanceTask
RepositoryException
- If a repository exceptionprotected void close()
AbstractMaintenanceTask
close
in class AbstractMaintenanceTask
private long _reportDataStoreInfo(DataStore ds) throws DataStoreException
DataStoreException
private void _derbyCompressTable(DbDataStore ds) throws RepositoryException
ds
- The datastoreRepositoryException
- If an error occurs with the repositorypublic void beforeScanning(Node n) throws RepositoryException
beforeScanning
in interface MarkEventListener
RepositoryException
protected PersistenceManager getPM(String workspaceName) throws RepositoryException
workspaceName
- The workspace nameRepositoryException
- If an error occurs while retrieving the persistence managerprivate static Object findAndInvokeMethod(Object obj, String name, Object[] parameters) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException