* Create a data store garbage collector for this repository.
*
* @throws RepositoryException
*/
public GarbageCollector createDataStoreGarbageCollector() throws RepositoryException {
final GarbageCollector gc =
repositoryContext.getRepository().createDataStoreGarbageCollector();
// Auto-close if the main session logs out
addListener(new SessionListener() {
public void loggedOut(SessionImpl session) {
}
public void loggingOut(SessionImpl session) {
gc.close();
}
});
return gc;
}