Package org.apache.jackrabbit.api.management

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


        // need to login to start the repository
        Session session = rep.login(new SimpleCredentials("", "".toCharArray()));

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


                session.logout();
            }

        });
        try {
            gc.mark();
            fail("Exception 'session has been closed' expected");
        } catch (RepositoryException e) {
            LOG.debug("Expected exception caught: " + e.getMessage());
        }
        if (ex[0] != null) {
View Full Code Here

                }
            }
        }.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++) {
View Full Code Here

                session.logout();
            }

        });
        try {
            gc.mark();
            fail("Exception 'session has been closed' expected");
        } catch (RepositoryException e) {
            LOG.debug("Expected exception caught: " + e.getMessage());
        }
        if (ex[0] != null) {
View Full Code Here

            }
        }.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++) {
View Full Code Here

        // need to login to start the repository
        Session session = rep.login();

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

                    n.getSession().save();
                }
            }

        });
        gc.mark();
        gc.close();
    }

    public void testGC() throws Exception {
        Node root = testRootNode;
View Full Code Here

            boolean pmScan = gc.isPersistenceManagerScan();
            gc.setPersistenceManagerScan(allowPmScan);
            gotNullNode = false;
            gotNode = false;
            gc.setMarkEventListener(this);
            gc.mark();
            if (pmScan && allowPmScan) {
                assertTrue("PM scan without null Node", gotNullNode);
                assertFalse("PM scan, but got a real node", gotNode);
            } else {
                assertFalse("Not a PM scan - but got a null Node", gotNullNode);
View Full Code Here

        // need to login to start the repository
        Session session = rep.login(new SimpleCredentials("", "".toCharArray()));

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

                    n.getSession().save();
                }
            }

        });
        gc.mark();
        gc.close();
    }

    public void testGC() throws Exception {
        Node root = testRootNode;
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.