Examples of sweep()


Examples of org.apache.jackrabbit.api.management.DataStoreGarbageCollector.sweep()

            }
        }.start();
        assertEquals("x", sync.take());
        DataStoreGarbageCollector gc = ((SessionImpl) session).createDataStoreGarbageCollector();
        gc.mark();
        gc.sweep();
        sync.put("deleted");
        assertEquals("saved", sync.take());
        InputStream in = node.getProperty("slowBlob").getBinary().getStream();
        for (int pos = 1; pos < blobLength; pos++) {
            int expected = pos % 80 == 0 ? '\n' : '.';
View Full Code Here

Examples of org.apache.jackrabbit.api.management.DataStoreGarbageCollector.sweep()

        }.start();
        assertEquals("x", sync.take());
        DataStoreGarbageCollector gc = ((SessionImpl) session).createDataStoreGarbageCollector();
        gc.setPersistenceManagerScan(false);
        gc.mark();
        gc.sweep();
        sync.put("deleted");
        assertEquals("saved", sync.take());
        InputStream in = node.getProperty("slowBlob").getBinary().getStream();
        for (int pos = 1; pos < blobLength; pos++) {
            int expected = pos % 80 == 0 ? '\n' : '.';
View Full Code Here

Examples of org.apache.jackrabbit.api.management.DataStoreGarbageCollector.sweep()

        Session session = rep.login();

        DataStoreGarbageCollector gc = rm.createDataStoreGarbageCollector();
        try {
            gc.mark();
            gc.sweep();
        } finally {
            gc.close();
        }

        session.logout();
View Full Code Here

Examples of org.apache.jackrabbit.api.management.DataStoreGarbageCollector.sweep()

                assertFalse("PM scan, but got a real node", gotNode);
            } else {
                assertFalse("Not a PM scan - but got a null Node", gotNullNode);
                assertTrue("Not a PM scan - without a real node", gotNode);
            }
            int deleted = gc.sweep();
            LOG.debug("Deleted " + deleted);
            assertTrue("Should delete at least one item", deleted >= 0);
            gc.close();
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.api.management.DataStoreGarbageCollector.sweep()

        Session session = rep.login(new SimpleCredentials("", "".toCharArray()));

        DataStoreGarbageCollector gc = rm.createDataStoreGarbageCollector();
        try {
            gc.mark();
            gc.sweep();
        } finally {
            gc.close();
        }

        session.logout();
View Full Code Here

Examples of org.apache.jackrabbit.api.management.DataStoreGarbageCollector.sweep()

            }
        }.start();
        assertEquals("x", sync.take());
        DataStoreGarbageCollector gc = ((SessionImpl) session).createDataStoreGarbageCollector();
        gc.mark();
        gc.sweep();
        sync.put("deleted");
        assertEquals("saved", sync.take());
        InputStream in = node.getProperty("slowBlob").getBinary().getStream();
        for (int pos = 1; pos < blobLength; pos++) {
            int expected = pos % 80 == 0 ? '\n' : '.';
View Full Code Here

Examples of org.apache.jackrabbit.api.management.DataStoreGarbageCollector.sweep()

                assertFalse("PM scan, but got a real node", gotNode);
            } else {
                assertFalse("Not a PM scan - but got a null Node", gotNullNode);
                assertTrue("Not a PM scan - without a real node", gotNode);
            }
            int deleted = gc.sweep();
            LOG.debug("Deleted " + deleted);
            assertTrue("Should delete at least one item", deleted >= 0);
            gc.close();
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.api.management.DataStoreGarbageCollector.sweep()

            }
        }.start();
        assertEquals("x", sync.take());
        DataStoreGarbageCollector gc = ((SessionImpl) session).createDataStoreGarbageCollector();
        gc.mark();
        gc.sweep();
        sync.put("deleted");
        assertEquals("saved", sync.take());
        InputStream in = node.getProperty("slowBlob").getBinary().getStream();
        for (int pos = 1; pos < blobLength; pos++) {
            int expected = pos % 80 == 0 ? '\n' : '.';
View Full Code Here

Examples of org.apache.jackrabbit.api.management.DataStoreGarbageCollector.sweep()

        }.start();
        assertEquals("x", sync.take());
        DataStoreGarbageCollector gc = ((SessionImpl) session).createDataStoreGarbageCollector();
        gc.setPersistenceManagerScan(false);
        gc.mark();
        gc.sweep();
        sync.put("deleted");
        assertEquals("saved", sync.take());
        InputStream in = node.getProperty("slowBlob").getBinary().getStream();
        for (int pos = 1; pos < blobLength; pos++) {
            int expected = pos % 80 == 0 ? '\n' : '.';
View Full Code Here

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
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.