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:
GarbageCollector gc = ((SessionImpl)session).createDataStoreGarbageCollector(); gc.scan(); gc.stopScan(); gc.deleteUnused();