Examples of checkPoint()


Examples of hermes.store.MessageStore.checkpoint()

            {
               messageStore.store(m);
              
               if (++messagesRead % commitInterval == 0)
               {
                  messageStore.checkpoint();
               }
            }
         }
      }
      catch (Exception e)
View Full Code Here

Examples of javax.jcr.version.VersionManager.checkpoint()

    public NodeId checkpoint(SessionInfo sessionInfo, final NodeId nodeId) throws UnsupportedRepositoryOperationException, RepositoryException {
        final SessionInfoImpl sInfo = getSessionInfoImpl(sessionInfo);
        Version newVersion = (Version) executeWithLocalEvents(new Callable() {
            public Object run() throws RepositoryException {
                VersionManager vMgr = sInfo.getSession().getWorkspace().getVersionManager();
                return vMgr.checkpoint(getNodePath(nodeId, sInfo));
            }
        }, sInfo);
        return idFactory.createNodeId(newVersion);
    }
View Full Code Here

Examples of javax.jcr.version.VersionManager.checkpoint()

        vMgr.setActivity(activity);
        try {
            Version newVersion = (Version) executeWithLocalEvents(new Callable() {
                public Object run() throws RepositoryException {
                    VersionManager vMgr = sInfo.getSession().getWorkspace().getVersionManager();
                    return vMgr.checkpoint(getNodePath(nodeId, sInfo));
                }
            }, sInfo);
            return idFactory.createNodeId(newVersion);
        } finally {
            vMgr.setActivity(null);
View Full Code Here

Examples of javax.jcr.version.VersionManager.checkpoint()

            throws RepositoryException, NotExecutableException {
        Node n = testRootNode.addNode(nodeName1, testNodeType);
        n.addMixin(mixVersionable);
        superuser.save();
        VersionManager vMgr = superuser.getWorkspace().getVersionManager();
        vMgr.checkpoint(n.getPath());
        QueryManager qm = superuser.getWorkspace().getQueryManager();
        Version v = vMgr.getBaseVersion(n.getPath());
        Query q = qm.createQuery("//element(*, nt:version)[@jcr:uuid = '" +
                v.getIdentifier() + "']", Query.XPATH);
        NodeIterator nodes = q.execute().getNodes();
View Full Code Here

Examples of javax.jcr.version.VersionManager.checkpoint()

        Node n = testRootNode.addNode(nodeName1, testNodeType);
        n.addMixin(mixVersionable);
        Node child = n.addNode(nodeName2, ntUnstructured);
        superuser.save();
        VersionManager vMgr = superuser.getWorkspace().getVersionManager();
        vMgr.checkpoint(n.getPath());
        Version v = vMgr.getBaseVersion(n.getPath());
        Node frozenChild = v.getFrozenNode().getNode(child.getName());
        assertEquals(ntFrozenNode, frozenChild.getPrimaryNodeType().getName());
    }
View Full Code Here

Examples of javax.jcr.version.VersionManager.checkpoint()

        Node n = testRootNode.addNode(nodeName1, testNodeType);
        n.addMixin(mixVersionable);
        Node child = n.addNode(nodeName2, ntUnstructured);
        superuser.save();
        VersionManager vMgr = superuser.getWorkspace().getVersionManager();
        vMgr.checkpoint(n.getPath());
        Version v = vMgr.getBaseVersion(n.getPath());
        Node frozenChild = v.getFrozenNode().getNode(child.getName());
        assertEquals(child.getIdentifier(),
                frozenChild.getProperty(Property.JCR_FROZEN_UUID).getString());
    }
View Full Code Here

Examples of javax.jcr.version.VersionManager.checkpoint()

        superuser.save();
        String path = n.getPath();
        Version v = vMgr.checkpoint(path); // 1.0
        n.setProperty("prop", "b");
        superuser.save();
        vMgr.checkpoint(path); // 1.1
        n.remove();
        superuser.save();
        vMgr.restore(path, v, true);
        assertTrue(superuser.nodeExists(path));
        n = superuser.getNode(path);
View Full Code Here

Examples of javax.jcr.version.VersionManager.checkpoint()

        Node child = n.addNode("test:copyOnParentVersion", ntUnstructured);
        child.addMixin(mixReferenceable);
        child.setProperty("prop", "a");
        superuser.save();
        String path = n.getPath();
        Version v = vMgr.checkpoint(path); // 1.0
        n.setProperty("prop", "b");
        child.setProperty("prop", "b");
        superuser.save();
        vMgr.checkpoint(path); // 1.1
        vMgr.restore(v, true);
View Full Code Here

Examples of javax.jcr.version.VersionManager.checkpoint()

        String path = n.getPath();
        Version v = vMgr.checkpoint(path); // 1.0
        n.setProperty("prop", "b");
        child.setProperty("prop", "b");
        superuser.save();
        vMgr.checkpoint(path); // 1.1
        vMgr.restore(v, true);
        assertEquals("Property not restored", "a", n.getProperty("prop").getString());
        assertEquals("Property not restored", "a", child.getProperty("prop").getString());
        assertFalse("Restored node must not have jcr:frozenPrimaryType property",
                child.hasProperty(JcrConstants.JCR_FROZENPRIMARYTYPE));
View Full Code Here

Examples of javax.jcr.version.VersionManager.checkpoint()

            throws RepositoryException, NotExecutableException {
        Node n = testRootNode.addNode(nodeName1, testNodeType);
        n.addMixin(mixVersionable);
        superuser.save();
        VersionManager vMgr = superuser.getWorkspace().getVersionManager();
        vMgr.checkpoint(n.getPath());
        QueryManager qm = superuser.getWorkspace().getQueryManager();
        Version v = vMgr.getBaseVersion(n.getPath());
        Query q = qm.createQuery("//element(*, nt:version)[@jcr:uuid = '" +
                v.getIdentifier() + "']", Query.XPATH);
        NodeIterator nodes = q.execute().getNodes();
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.