|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataStoreGarbageCollector
Garbage collector for DataStore. This implementation is iterates through all nodes and reads the binary properties. To detect nodes that are moved while the scan runs, event listeners are started. Like the well known garbage collection in Java, the items that are still in use are marked. Currently this achieved by updating the modified date of the entries. Newly added entries are detected because the modified date is changed when they are added.
Example code to run the data store garbage collection:
DataStoreGarbageCollector gc = ((JackrabbitSession)session).createDataStoreGarbageCollector(); gc.mark(); gc.sweep();
Method Summary | |
---|---|
void |
close()
Cleanup resources used internally by this instance. |
long |
getSleepBetweenNodes()
Get the delay between scanning items. |
boolean |
isPersistenceManagerScan()
Check if using the IterablePersistenceManager interface is allowed. |
void |
mark()
Scan the repository. |
void |
setMarkEventListener(MarkEventListener callback)
Set the event listener. |
void |
setPersistenceManagerScan(boolean allow)
Enable or disable using the IterablePersistenceManager interface to scan the items. |
void |
setSleepBetweenNodes(long millis)
Set the delay between scanning items. |
int |
sweep()
Delete all unused items in the data store. |
Method Detail |
---|
void setSleepBetweenNodes(long millis)
millis
- the number of milliseconds to sleeplong getSleepBetweenNodes()
void setMarkEventListener(MarkEventListener callback)
callback
- if set, this is called while scanningvoid setPersistenceManagerScan(boolean allow)
allow
- true if using the IterablePersistenceManager interface is allowedboolean isPersistenceManagerScan()
void mark() throws RepositoryException
RepositoryException
int sweep() throws RepositoryException
RepositoryException
void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |