Package org.apache.jackrabbit.core.gc

Examples of org.apache.jackrabbit.core.gc.GarbageCollector.sweep()


        gc.mark();
        int count = listIdentifiers(gc);
        LOG.debug("stop scanning; currently " + count + " identifiers");
        LOG.debug("deleting...");
        gc.getDataStore().clearInUse();
        assertTrue(gc.sweep() > 0);
        int count2 = listIdentifiers(gc);
        assertEquals(count - 1, count2);

        // verify the node was moved, and that the binary is still there
        n = root.getNode("node1").getNode("nodeWithBlob").getNode("sub");
View Full Code Here


        gc.mark();
        gc.stopScan();
        if (all) {
            gc.getDataStore().clearInUse();
        }
        gc.sweep();
        gc.close();
    }

    private static int listIdentifiers(GarbageCollector gc) throws DataStoreException {
        LOG.debug("identifiers:");
View Full Code Here

        try {
            garbageCollector.getDataStore().clearInUse();
            garbageCollector.mark();
            garbageCollector.stopScan();
            sleepForFile();
            int numberOfDeleted = garbageCollector.sweep();
            log("Number of deleted: " + numberOfDeleted);
            // Binary data should still be there.
            assertEquals(1, getBinaryCount(garbageCollector));
        } catch (RepositoryException e) {
            e.printStackTrace();
View Full Code Here

                LOG.debug("Scanning...");
                gc.mark();
                int count = listIdentifiers(gc);
                LOG.debug("Stop; currently " + count + " identifiers");
                gc.stopScan();
                int numDeleted = gc.sweep();
                if (numDeleted > 0) {
                    LOG.debug("Deleted " + numDeleted + " identifiers");
                }
                LOG.debug("Waiting...");
                Thread.sleep(10);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.