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

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


            Thread.sleep(waitForCommitPollMillis);
        }
    }

    private long getHeadRevision() throws Exception {
        FetchHeadRevisionIdAction query = new FetchHeadRevisionIdAction(nodeStore);
        return query.execute();
    }
View Full Code Here


        super(nodeStore);
    }

    @Override
    public Long execute() throws Exception {
        return new FetchHeadRevisionIdAction(nodeStore).execute();
    }
View Full Code Here

        path = MongoUtil.adjustPath(path);
        checkDepth();

        long fromRevisionId, toRevisionId;
        if (fromRevision == null || toRevision == null) {
            long head = new FetchHeadRevisionIdAction(nodeStore).execute();
            fromRevisionId = fromRevision == null? head : MongoUtil.toMongoRepresentation(fromRevision);
            toRevisionId = toRevision == null ? head : MongoUtil.toMongoRepresentation(toRevision);;
        } else {
            fromRevisionId = MongoUtil.toMongoRepresentation(fromRevision);
            toRevisionId = MongoUtil.toMongoRepresentation(toRevision);;
View Full Code Here

            throw new Exception("Can only merge a private branch commit");
        }

        long rootNodeId = commit.getRevisionId();

        FetchHeadRevisionIdAction query2 = new FetchHeadRevisionIdAction(nodeStore);
        long currentHead = query2.execute();

        long branchRootId = Long.parseLong(branchId.substring(0, branchId.indexOf("-")));

        Commit newCommit;
        String diff = getNonConflictingCommitsDiff(Math.max(currentHead, commit.getRevisionId()),
View Full Code Here

        path = MongoUtil.adjustPath(path);

        long fromRevision = MongoUtil.toMongoRepresentation(fromRevisionId);
        long toRevision;
        if (toRevisionId == null) {
            toRevision = new FetchHeadRevisionIdAction(nodeStore).execute();
        } else {
            toRevision = MongoUtil.toMongoRepresentation(toRevisionId);
        }

        List<MongoCommit> commits = getCommits(fromRevision, toRevision);
View Full Code Here

            readBranchIdFromBaseCommit();
            createMongoNodes();
            prepareCommit();
            // If base revision is older than the head revision, need to read
            // and merge nodes at the head revision.
            FetchHeadRevisionIdAction action = new FetchHeadRevisionIdAction(nodeStore, branchId);
            long headRevisionId = action.execute();
            if (baseRevisionId < headRevisionId) {
                readExistingNodes();
                mergeNodes();
            }
            prepareMongoNodes();
View Full Code Here

            readBranchIdFromBaseCommit();
            createMongoNodes();
            prepareCommit();
            // If base revision is older than the head revision, need to read
            // and merge nodes at the head revision.
            FetchHeadRevisionIdAction action = new FetchHeadRevisionIdAction(nodeStore, branchId);
            long headRevisionId = action.execute();
            if (baseRevisionId < headRevisionId) {
                readExistingNodes();
                mergeNodes();
            }
            prepareMongoNodes();
View Full Code Here

TOP

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

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.