FileCleaner takes care of files (sent and received agents) that are not needed anymore.
FileCleaner
Note: this implementation starts a daemon thread to do the actual work, so it may not be used in some environments like Google AppEngine.
1045104610471048104910501051105210531054
{ WorkspaceContainerFacade workspaceContainer = repoService.getRepository(repositoryName).getWorkspaceContainer(workspaceName); WorkspacePersistentDataManager dataManager = (WorkspacePersistentDataManager)workspaceContainer.getComponent(WorkspacePersistentDataManager.class); FileCleaner fileCleaner = ((FileCleanerHolder)workspaceContainer.getComponent(FileCleanerHolder.class)).getFileCleaner(); JCRRestore restorer = new JCRRestore(dataManager, fileCleaner); restorer.incrementalRestore(new File(pathBackupFile)); }