Package org.apache.jackrabbit.mongomk.impl.action

Examples of org.apache.jackrabbit.mongomk.impl.action.FetchCommitsAction


        if (revisionId == null) {
            revisionId = new GetHeadRevisionCommand(nodeStore).execute();
        }

        boolean commitExists = false;
        lastCommits = new FetchCommitsAction(nodeStore, revisionId).execute();
        for (MongoCommit commit : lastCommits) {
            if (commit.getRevisionId().equals(revisionId)) {
                commitExists = true;
                break;
            }
View Full Code Here


     * @param branchRootId
     * @param branchId
     * @return
     */
    private String getNonConflictingCommitsDiff(long currentHead, long branchRootId, String branchId) {
        FetchCommitsAction action = new FetchCommitsAction(nodeStore, branchRootId + 1, currentHead);
        List<MongoCommit> commits = action.execute();

        Set<String> affectedPathsBranch = new HashSet<String>();
        Set<String> affectedPathsTrunk = new HashSet<String>();
        StringBuilder diff = new StringBuilder();

View Full Code Here

    @Override
    public String execute() {
        path = MongoUtil.adjustPath(path);
        maxEntries = maxEntries < 0 ? Integer.MAX_VALUE : maxEntries;

        FetchCommitsAction action = new FetchCommitsAction(nodeStore);
        action.setMaxEntries(maxEntries);
        action.includeBranchCommits(false);

        List<MongoCommit> commits = action.execute();
        List<MongoCommit> history = new ArrayList<MongoCommit>();
        for (int i = commits.size() - 1; i >= 0; i--) {
            MongoCommit commit = commits.get(i);
            if (commit.getTimestamp() >= since) {
                if (MongoUtil.isFiltered(path)) {
View Full Code Here

        }
        return null;
    }

    private List<MongoCommit> getCommits(long fromRevisionId, long toRevisionId) {
        return new FetchCommitsAction(nodeStore, fromRevisionId, toRevisionId).execute();
    }
View Full Code Here

        logger.debug(msg, revisionId, retries);
        return revisionId;
    }

    private void readValidCommits() {
        validCommits = new FetchCommitsAction(nodeStore, mongoSync.getHeadRevisionId()).execute();
    }
View Full Code Here

                lastChildren.add(childName);
            }
        }

        // Assert number of successful commits.
        List<MongoCommit> commits = new FetchCommitsAction(getNodeStore()).execute();
        assertEquals(numOfConcurrentThreads + 1, commits.size());
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.mongomk.impl.action.FetchCommitsAction

Copyright © 2018 www.massapicom. 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.