Search in sources :

Example 1 with LocalChanges

use of org.apache.jackrabbit.oak.plugins.document.mongo.replica.LocalChanges in project jackrabbit-oak by apache.

the class MongoDocumentStore method updateAccessedRevision.

@Override
public synchronized void updateAccessedRevision(RevisionVector revisions, int clusterId) {
    if (localChanges == null && replicaInfo != null) {
        localChanges = new LocalChanges(clusterId);
        replicaInfo.addListener(localChanges);
    }
    RevisionVector previousValue = mostRecentAccessedRevisions;
    if (mostRecentAccessedRevisions == null) {
        mostRecentAccessedRevisions = revisions;
    } else {
        mostRecentAccessedRevisions = mostRecentAccessedRevisions.pmax(revisions);
    }
    if (LOG.isDebugEnabled() && !mostRecentAccessedRevisions.equals(previousValue)) {
        LOG.debug("Most recent accessed revisions: {}", mostRecentAccessedRevisions);
    }
}
Also used : LocalChanges(org.apache.jackrabbit.oak.plugins.document.mongo.replica.LocalChanges) RevisionVector(org.apache.jackrabbit.oak.plugins.document.RevisionVector)

Aggregations

RevisionVector (org.apache.jackrabbit.oak.plugins.document.RevisionVector)1 LocalChanges (org.apache.jackrabbit.oak.plugins.document.mongo.replica.LocalChanges)1