Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java (revision 1809589) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java (working copy) @@ -41,7 +41,7 @@ import static org.apache.jackrabbit.oak.plugins.document.util.Utils.getIdFromPath; import static org.apache.jackrabbit.oak.plugins.document.util.Utils.getModuleVersion; import static org.apache.jackrabbit.oak.plugins.document.util.Utils.pathToId; -import static org.apache.jackrabbit.oak.plugins.observation.ChangeCollectorProvider.COMMIT_CONTEXT_OBSERVATION_CHANGESET; +import static org.apache.jackrabbit.oak.spi.observation.ChangeSet.COMMIT_CONTEXT_OBSERVATION_CHANGESET; import java.io.Closeable; import java.io.IOException; @@ -95,8 +95,8 @@ import org.apache.jackrabbit.oak.plugins.document.persistentCache.PersistentCache; import org.apache.jackrabbit.oak.plugins.document.persistentCache.broadcast.DynamicBroadcastConfig; import org.apache.jackrabbit.oak.plugins.document.util.ReadOnlyDocumentStoreWrapperFactory; -import org.apache.jackrabbit.oak.plugins.observation.ChangeSet; -import org.apache.jackrabbit.oak.plugins.observation.ChangeSetBuilder; +import org.apache.jackrabbit.oak.spi.observation.ChangeSet; +import org.apache.jackrabbit.oak.spi.observation.ChangeSetBuilder; import org.apache.jackrabbit.oak.spi.blob.BlobStore; import org.apache.jackrabbit.oak.commons.json.JsopStream; import org.apache.jackrabbit.oak.commons.json.JsopWriter; Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/ExternalChange.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/ExternalChange.java (revision 1809589) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/ExternalChange.java (working copy) @@ -26,7 +26,7 @@ import org.apache.jackrabbit.oak.commons.PathUtils; import org.apache.jackrabbit.oak.commons.sort.StringSort; import org.apache.jackrabbit.oak.plugins.document.util.Utils; -import org.apache.jackrabbit.oak.plugins.observation.ChangeSetBuilder; +import org.apache.jackrabbit.oak.spi.observation.ChangeSetBuilder; import org.apache.jackrabbit.oak.stats.Clock; import org.slf4j.Logger; import org.slf4j.LoggerFactory; Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/JournalEntry.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/JournalEntry.java (revision 1809589) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/JournalEntry.java (working copy) @@ -38,8 +38,8 @@ import org.apache.jackrabbit.oak.commons.json.JsopTokenizer; import org.apache.jackrabbit.oak.commons.sort.StringSort; import org.apache.jackrabbit.oak.plugins.document.util.Utils; -import org.apache.jackrabbit.oak.plugins.observation.ChangeSet; -import org.apache.jackrabbit.oak.plugins.observation.ChangeSetBuilder; +import org.apache.jackrabbit.oak.spi.observation.ChangeSet; +import org.apache.jackrabbit.oak.spi.observation.ChangeSetBuilder; import org.apache.jackrabbit.oak.spi.commit.CommitInfo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeCollectorProvider.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeCollectorProvider.java (revision 1809589) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeCollectorProvider.java (working copy) @@ -40,6 +40,8 @@ import org.apache.jackrabbit.oak.spi.commit.EditorProvider; import org.apache.jackrabbit.oak.spi.commit.Validator; import org.apache.jackrabbit.oak.spi.commit.ValidatorProvider; +import org.apache.jackrabbit.oak.spi.observation.ChangeSet; +import org.apache.jackrabbit.oak.spi.observation.ChangeSetBuilder; import org.apache.jackrabbit.oak.spi.state.NodeState; import org.osgi.service.component.ComponentContext; import org.slf4j.Logger; @@ -68,8 +70,6 @@ private static final Logger LOG = LoggerFactory.getLogger(ChangeCollectorProvider.class); - public static final String COMMIT_CONTEXT_OBSERVATION_CHANGESET = "oak.observation.changeSet"; - private static final int DEFAULT_MAX_ITEMS = 50; @Property(longValue = DEFAULT_MAX_ITEMS, label = "Maximum Number of Collected Items (per type)", description = "Integer value indicating maximum number of individual items of changes - " + "such as property, nodeType, node name, path - to be collected. If there are " @@ -192,7 +192,7 @@ // CommitContext of the CommitInfo CommitContext commitContext = (CommitContext) support.info.getInfo().get(CommitContext.NAME); ChangeSet changeSet = support.changeSetBuilder.build(); - commitContext.set(COMMIT_CONTEXT_OBSERVATION_CHANGESET, changeSet); + commitContext.set(ChangeSet.COMMIT_CONTEXT_OBSERVATION_CHANGESET, changeSet); LOG.debug("Collected changeSet for commit {} is {}", support.info, changeSet); } Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeSet.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeSet.java (revision 1809589) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeSet.java (nonexistent) @@ -1,243 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.jackrabbit.oak.plugins.observation; - -import java.util.Set; - -import javax.annotation.CheckForNull; - -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Sets; - -import org.apache.jackrabbit.oak.commons.PathUtils; -import org.apache.jackrabbit.oak.commons.json.JsopBuilder; -import org.apache.jackrabbit.oak.commons.json.JsopReader; -import org.apache.jackrabbit.oak.commons.json.JsopTokenizer; -import org.apache.jackrabbit.oak.commons.json.JsopWriter; - -/** - * A ChangeSet is a collection of items that have been changed as part of a - * commit. A ChangeSet is immutable and built by a ChangeSetBuilder. - *

- * Those items are parent paths, parent node names, parent node types and - * (child) properties. 'Changed' refers to any of add, remove, change (where - * applicable). - *

- * A ChangeSet is piggybacked on a CommitInfo in the CommitContext and can be - * used by (downstream) Observers for their convenience. - *

- * To limit memory usage, the ChangeSet has a limit on the number of items, - * each, that it collects. If one of those items reach the limit this is called - * an 'overflow' and the corresponding item type is marked as having - * 'overflown'. Downstream Observers should thus check if a particular item has - * overflown or not - this is indicated with null as the return value of the - * corresponding getters (while empty means: not overflown but nothing changed - * of that type). - *

- * Also, the ChangeSet carries a 'maxPathDepth' which is the depth of the path - * up until which paths have been collected. Thus any path that is longer than - * this 'maxPathDepth' will be cut off and only reported up to that max depth. - * Downstream Observers should thus inspect the 'maxPathDepth' and compare - * actual path depths with it in order to find out if any child paths have been - * cut off. - *

- * Naming: note that path, node name and node types all refer to the *parent* of - * a change. While properties naturally are leafs. - */ -public final class ChangeSet { - - private final int maxPathDepth; - private final Set parentPaths; - private final Set parentNodeNames; - private final Set parentNodeTypes; - private final Set propertyNames; - private final Set allNodeTypes; - private final boolean hitsMaxPathDepth; - - ChangeSet(int maxPathDepth, Set parentPaths, Set parentNodeNames, Set parentNodeTypes, - Set propertyNames, Set allNodeTypes) { - this.maxPathDepth = maxPathDepth; - this.parentPaths = parentPaths == null ? null : ImmutableSet.copyOf(parentPaths); - this.parentNodeNames = parentNodeNames == null ? null : ImmutableSet.copyOf(parentNodeNames); - this.parentNodeTypes = parentNodeTypes == null ? null : ImmutableSet.copyOf(parentNodeTypes); - this.propertyNames = propertyNames == null ? null : ImmutableSet.copyOf(propertyNames); - this.allNodeTypes = allNodeTypes == null ? null : ImmutableSet.copyOf(allNodeTypes); - - boolean hitsMaxPathDepth = false; - if (parentPaths != null) { - for (String aPath : parentPaths) { - if (PathUtils.getDepth(aPath) >= maxPathDepth) { - hitsMaxPathDepth = true; - break; - } - } - } - this.hitsMaxPathDepth = hitsMaxPathDepth; - } - - @Override - public String toString() { - return "ChangeSet{paths[maxDepth:" + maxPathDepth + "]=" + parentPaths + ", propertyNames=" + propertyNames - + ", parentNodeNames=" + parentNodeNames + ", parentNodeTypes=" + parentNodeTypes - + ", allNodeTypes=" + allNodeTypes + ", any overflow: " + anyOverflow() - + ", hits max path depth: " + hitsMaxPathDepth + "}"; - } - - public boolean doesHitMaxPathDepth() { - return hitsMaxPathDepth; - } - - @CheckForNull - public Set getParentPaths() { - return parentPaths; - } - - @CheckForNull - public Set getParentNodeNames() { - return parentNodeNames; - } - - @CheckForNull - public Set getParentNodeTypes() { - return parentNodeTypes; - } - - @CheckForNull - public Set getPropertyNames() { - return propertyNames; - } - - public int getMaxPrefilterPathDepth() { - return maxPathDepth; - } - - @CheckForNull - public Set getAllNodeTypes() { - return allNodeTypes; - } - - public boolean anyOverflow() { - return getAllNodeTypes() == null || - getParentNodeNames() == null || - getParentNodeTypes() == null || - getParentPaths() == null || - getPropertyNames() == null; - } - - //~---------------------------------------------------< equals/hashcode > - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - ChangeSet changeSet = (ChangeSet) o; - - if (maxPathDepth != changeSet.maxPathDepth) return false; - if (parentPaths != null ? !parentPaths.equals(changeSet.parentPaths) : changeSet.parentPaths != null) - return false; - if (parentNodeNames != null ? !parentNodeNames.equals(changeSet.parentNodeNames) : changeSet.parentNodeNames != null) - return false; - if (parentNodeTypes != null ? !parentNodeTypes.equals(changeSet.parentNodeTypes) : changeSet.parentNodeTypes != null) - return false; - if (propertyNames != null ? !propertyNames.equals(changeSet.propertyNames) : changeSet.propertyNames != null) - return false; - return allNodeTypes != null ? allNodeTypes.equals(changeSet.allNodeTypes) : changeSet.allNodeTypes == null; - } - - @Override - public int hashCode() { - return 0; - } - - //~----------------------------------------------------< json support > - - public String asString(){ - JsopWriter json = new JsopBuilder(); - json.object(); - json.key("maxPathDepth").value(maxPathDepth); - addToJson(json, "parentPaths", parentPaths); - addToJson(json, "parentNodeNames", parentNodeNames); - addToJson(json, "parentNodeTypes", parentNodeTypes); - addToJson(json, "propertyNames", propertyNames); - addToJson(json, "allNodeTypes", allNodeTypes); - json.endObject(); - return json.toString(); - } - - public static ChangeSet fromString(String json) { - JsopReader reader = new JsopTokenizer(json); - int maxPathDepth = 0; - Set parentPaths = null; - Set parentNodeNames = null; - Set parentNodeTypes = null; - Set propertyNames = null; - Set allNodeTypes = null; - - reader.read('{'); - if (!reader.matches('}')) { - do { - String name = reader.readString(); - reader.read(':'); - if ("maxPathDepth".equals(name)){ - maxPathDepth = Integer.parseInt(reader.read(JsopReader.NUMBER)); - } else { - Set data = readArrayAsSet(reader); - if ("parentPaths".equals(name)){ - parentPaths = data; - } else if ("parentNodeNames".equals(name)){ - parentNodeNames = data; - } else if ("parentNodeTypes".equals(name)){ - parentNodeTypes = data; - } else if ("propertyNames".equals(name)){ - propertyNames = data; - } else if ("allNodeTypes".equals(name)){ - allNodeTypes = data; - } - } - } while (reader.matches(',')); - reader.read('}'); - } - reader.read(JsopReader.END); - return new ChangeSet(maxPathDepth, parentPaths, parentNodeNames, parentNodeTypes, propertyNames, allNodeTypes); - } - - private static Set readArrayAsSet(JsopReader reader) { - Set values = Sets.newHashSet(); - reader.read('['); - for (boolean first = true; !reader.matches(']'); first = false) { - if (!first) { - reader.read(','); - } - values.add(reader.readString()); - } - return values; - } - - private static void addToJson(JsopWriter json, String name, Set values){ - if (values == null){ - return; - } - json.key(name).array(); - for (String v : values){ - json.value(v); - } - json.endArray(); - } -} \ No newline at end of file Property changes on: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeSet.java ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeSetBuilder.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeSetBuilder.java (revision 1809589) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeSetBuilder.java (nonexistent) @@ -1,227 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.jackrabbit.oak.plugins.observation; - -import java.util.Set; - -import javax.annotation.Nullable; - -import com.google.common.collect.Sets; -import org.apache.jackrabbit.oak.commons.PathUtils; - -/** - * Builder of a ChangeSet - only used by ChangeCollectorProvider (and tests..) - */ -public class ChangeSetBuilder { - - private final int maxItems; - private int maxPathDepth; - private final Set parentPaths = Sets.newHashSet(); - private final Set parentNodeNames = Sets.newHashSet(); - private final Set parentNodeTypes = Sets.newHashSet(); - private final Set propertyNames = Sets.newHashSet(); - private final Set allNodeTypes = Sets.newHashSet(); - - private boolean parentPathOverflow; - private boolean parentNodeNameOverflow; - private boolean parentNodeTypeOverflow; - private boolean propertyNameOverflow; - private boolean allNodeTypeOverflow; - - public ChangeSetBuilder(int maxItems, int maxPathDepth) { - this.maxItems = maxItems; - this.maxPathDepth = maxPathDepth; - } - - @Override - public String toString() { - return "ChangeSetBuilder{parentPaths[maxDepth:" + maxPathDepth + "]=" + parentPaths + ", propertyNames=" - + propertyNames + ", parentNodeNames=" + parentNodeNames + ", parentNodeTypes=" + parentNodeTypes - + ", allNodeTypes=" + allNodeTypes + "}"; - } - - public boolean isParentPathOverflown() { - return parentPathOverflow; - } - - public ChangeSetBuilder addParentPath(String path){ - path = getPathWithMaxDepth(path, maxPathDepth); - parentPathOverflow = addAndCheckOverflow(parentPaths, path, maxItems, parentPathOverflow); - return this; - } - - public boolean isParentNodeNameOverflown() { - return parentNodeNameOverflow; - } - - public ChangeSetBuilder addParentNodeName(String parentNodeName) { - parentNodeNameOverflow = addAndCheckOverflow(parentNodeNames, parentNodeName, maxItems, parentNodeNameOverflow); - return this; - } - - public boolean isParentNodeTypeOverflown() { - return parentNodeTypeOverflow; - } - - public ChangeSetBuilder addParentNodeTypes(Iterable nodeTypes){ - for (String nodeType : nodeTypes){ - addParentNodeType(nodeType); - } - return this; - } - - public ChangeSetBuilder addParentNodeType(String parentNodeType) { - parentNodeTypeOverflow = addAndCheckOverflow(parentNodeTypes, parentNodeType, maxItems, parentNodeTypeOverflow); - return this; - } - - public boolean isPropertyNameOverflown() { - return propertyNameOverflow; - } - - public ChangeSetBuilder addPropertyName(String propertyName) { - propertyNameOverflow = addAndCheckOverflow(propertyNames, propertyName, maxItems, propertyNameOverflow); - return this; - } - public boolean isAllNodeTypeOverflown() { - return allNodeTypeOverflow; - } - - public ChangeSetBuilder addNodeTypes(Iterable nodeTypes){ - for (String nodeType : nodeTypes){ - addNodeType(nodeType); - } - return this; - } - - public ChangeSetBuilder addNodeType(String nodeType) { - allNodeTypeOverflow = addAndCheckOverflow(allNodeTypes, nodeType, maxItems, allNodeTypeOverflow); - return this; - } - - public int getMaxPrefilterPathDepth() { - return maxPathDepth; - } - - public ChangeSetBuilder add(@Nullable ChangeSet cs){ - if (cs == null){ - parentPathOverflow = true; - parentNodeNameOverflow = true; - parentNodeTypeOverflow = true; - propertyNameOverflow = true; - allNodeTypeOverflow = true; - return this; - } - - if (cs.getParentPaths() == null){ - parentPathOverflow = true; - } else { - addPathFromChangeSet(cs); - } - - if (cs.getParentNodeNames() == null){ - parentNodeNameOverflow = true; - } else { - for (String parentNodeName : cs.getParentNodeNames()){ - addParentNodeName(parentNodeName); - } - } - - if (cs.getParentNodeTypes() == null){ - parentNodeTypeOverflow = true; - } else { - for (String parentNodeType : cs.getParentNodeTypes()){ - addParentNodeType(parentNodeType); - } - } - - if (cs.getPropertyNames() == null){ - propertyNameOverflow = true; - } else { - for (String propertyName : cs.getPropertyNames()){ - addPropertyName(propertyName); - } - } - - if (cs.getAllNodeTypes() == null){ - allNodeTypeOverflow = true; - } else { - for (String nodeType : cs.getAllNodeTypes()){ - addNodeType(nodeType); - } - } - - return this; - } - - public ChangeSet build() { - return new ChangeSet(maxPathDepth, parentPathOverflow ? null : parentPaths, - parentNodeNameOverflow ? null : parentNodeNames, - parentNodeTypeOverflow ? null : parentNodeTypes, - propertyNameOverflow ? null : propertyNames, - allNodeTypeOverflow ? null : allNodeTypes); - } - - private void addPathFromChangeSet(ChangeSet cs) { - int maxDepthInChangeSet = cs.getMaxPrefilterPathDepth(); - - //If maxDepth of ChangeSet being added is less than current - //then truncate path in current set to that depth and change - //maxPathDepth to one from ChangeSet - if (maxDepthInChangeSet < maxPathDepth){ - Set existingPathSet = Sets.newHashSet(parentPaths); - parentPaths.clear(); - for (String existingPath : existingPathSet){ - parentPaths.add(getPathWithMaxDepth(existingPath, maxDepthInChangeSet)); - } - maxPathDepth = maxDepthInChangeSet; - } - - for (String pathFromChangeSet : cs.getParentPaths()){ - addParentPath(getPathWithMaxDepth(pathFromChangeSet, maxPathDepth)); - } - } - - private static String getPathWithMaxDepth(String path, int maxDepth){ - int depth = PathUtils.getDepth(path); - if (depth <= maxDepth){ - return path; - } - return PathUtils.getAncestorPath(path, depth - maxDepth); - } - - /** - * Add data to dataSet if dataSet size is less than maxSize. - * - * @return true if dataSet size is at maxSize i.e. overflow condition reached - */ - private static boolean addAndCheckOverflow(Set dataSet, String data, int maxSize, boolean overflow) { - if (overflow) { - return true; - } else { - dataSet.add(data); - if (dataSet.size() > maxSize){ - dataSet.clear(); - return true; - } - return false; - } - } - -} Property changes on: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeSetBuilder.java ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/ChangeSetFilter.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/ChangeSetFilter.java (revision 1809589) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/ChangeSetFilter.java (working copy) @@ -19,7 +19,7 @@ package org.apache.jackrabbit.oak.plugins.observation.filter; -import org.apache.jackrabbit.oak.plugins.observation.ChangeSet; +import org.apache.jackrabbit.oak.spi.observation.ChangeSet; /** * A ChangeSetFilter is capable of inspecting a ChangeSet Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/ChangeSetFilterImpl.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/ChangeSetFilterImpl.java (revision 1809589) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/ChangeSetFilterImpl.java (working copy) @@ -30,7 +30,7 @@ import javax.annotation.Nullable; import org.apache.jackrabbit.oak.commons.PathUtils; -import org.apache.jackrabbit.oak.plugins.observation.ChangeSet; +import org.apache.jackrabbit.oak.spi.observation.ChangeSet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/FilterBuilder.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/FilterBuilder.java (revision 1809589) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/FilterBuilder.java (working copy) @@ -47,7 +47,7 @@ import com.google.common.collect.Iterables; import org.apache.jackrabbit.oak.api.PropertyState; import org.apache.jackrabbit.oak.plugins.nodetype.TypePredicate; -import org.apache.jackrabbit.oak.plugins.observation.ChangeSet; +import org.apache.jackrabbit.oak.spi.observation.ChangeSet; import org.apache.jackrabbit.oak.plugins.observation.filter.UniversalFilter.Selector; import org.apache.jackrabbit.oak.plugins.tree.RootFactory; import org.apache.jackrabbit.oak.spi.commit.CommitInfo; Index: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ExternalChangesTest.java =================================================================== --- oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ExternalChangesTest.java (revision 1809589) +++ oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ExternalChangesTest.java (working copy) @@ -37,7 +37,7 @@ import org.apache.jackrabbit.oak.plugins.document.spi.JournalPropertyBuilder; import org.apache.jackrabbit.oak.plugins.document.spi.JournalPropertyService; import org.apache.jackrabbit.oak.plugins.observation.ChangeCollectorProvider; -import org.apache.jackrabbit.oak.plugins.observation.ChangeSet; +import org.apache.jackrabbit.oak.spi.observation.ChangeSet; import org.apache.jackrabbit.oak.spi.commit.CommitContext; import org.apache.jackrabbit.oak.spi.commit.CommitHook; import org.apache.jackrabbit.oak.spi.commit.CommitInfo; @@ -109,7 +109,7 @@ CommitInfo ci = c2.getExternalChange(); CommitContext cc = (CommitContext) ci.getInfo().get(CommitContext.NAME); assertNotNull(cc); - ChangeSet cs = (ChangeSet) cc.get(ChangeCollectorProvider.COMMIT_CONTEXT_OBSERVATION_CHANGESET); + ChangeSet cs = (ChangeSet) cc.get(ChangeSet.COMMIT_CONTEXT_OBSERVATION_CHANGESET); assertNotNull(cs); assertFalse(cs.anyOverflow()); assertThat(cs.getPropertyNames(), containsInAnyOrder("foo1", "foo2")); @@ -136,7 +136,7 @@ CommitInfo ci = c2.getExternalChange(); CommitContext cc = (CommitContext) ci.getInfo().get(CommitContext.NAME); assertNotNull(cc); - ChangeSet cs = (ChangeSet) cc.get(ChangeCollectorProvider.COMMIT_CONTEXT_OBSERVATION_CHANGESET); + ChangeSet cs = (ChangeSet) cc.get(ChangeSet.COMMIT_CONTEXT_OBSERVATION_CHANGESET); assertNotNull(cs); //ChangeSet should result in overflow @@ -169,7 +169,7 @@ CommitInfo ci = c2.getExternalChange(); CommitContext cc = (CommitContext) ci.getInfo().get(CommitContext.NAME); assertNotNull(cc); - ChangeSet cs = (ChangeSet) cc.get(ChangeCollectorProvider.COMMIT_CONTEXT_OBSERVATION_CHANGESET); + ChangeSet cs = (ChangeSet) cc.get(ChangeSet.COMMIT_CONTEXT_OBSERVATION_CHANGESET); assertNotNull(cs); assertTrue(cs.getPropertyNames().containsAll(propNames)); } Index: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexerServiceTest.java =================================================================== --- oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexerServiceTest.java (revision 1809589) +++ oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexerServiceTest.java (working copy) @@ -33,7 +33,7 @@ import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider; import org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore; import org.apache.jackrabbit.oak.plugins.observation.ChangeCollectorProvider; -import org.apache.jackrabbit.oak.plugins.observation.ChangeSet; +import org.apache.jackrabbit.oak.spi.observation.ChangeSet; import org.apache.jackrabbit.oak.spi.commit.CommitContext; import org.apache.jackrabbit.oak.spi.commit.CommitInfo; import org.apache.jackrabbit.oak.spi.commit.EmptyHook; @@ -119,7 +119,7 @@ CommitContext commitContext = (CommitContext) infoCollector.infos.get(0).getInfo().get(CommitContext.NAME); assertNotNull(commitContext); - ChangeSet changeSet = (ChangeSet) commitContext.get(ChangeCollectorProvider.COMMIT_CONTEXT_OBSERVATION_CHANGESET); + ChangeSet changeSet = (ChangeSet) commitContext.get(ChangeSet.COMMIT_CONTEXT_OBSERVATION_CHANGESET); assertNotNull(changeSet); } Index: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/ChangeCollectorProviderTest.java =================================================================== --- oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/ChangeCollectorProviderTest.java (revision 1809589) +++ oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/ChangeCollectorProviderTest.java (working copy) @@ -53,6 +53,7 @@ import org.apache.jackrabbit.oak.spi.commit.CommitInfo; import org.apache.jackrabbit.oak.spi.commit.Observer; import org.apache.jackrabbit.oak.spi.commit.SimpleCommitContext; +import org.apache.jackrabbit.oak.spi.observation.ChangeSet; import org.apache.jackrabbit.oak.spi.security.ConfigurationParameters; import org.apache.jackrabbit.oak.spi.security.SecurityProvider; import org.apache.jackrabbit.oak.spi.security.authentication.SystemSubject; @@ -131,7 +132,7 @@ CommitContext commitContext = (CommitContext) recorder.changes.get(0).info.getInfo().get(CommitContext.NAME); assertNotNull(commitContext); ChangeSet changeSet = (ChangeSet) commitContext - .get(ChangeCollectorProvider.COMMIT_CONTEXT_OBSERVATION_CHANGESET); + .get(ChangeSet.COMMIT_CONTEXT_OBSERVATION_CHANGESET); assertNotNull(changeSet); return changeSet; } Index: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/ChangeSetBuilderTest.java =================================================================== --- oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/ChangeSetBuilderTest.java (revision 1809589) +++ oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/ChangeSetBuilderTest.java (nonexistent) @@ -1,220 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.jackrabbit.oak.plugins.observation; - -import org.junit.Test; - -import static com.google.common.collect.ImmutableSet.of; -import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; - -public class ChangeSetBuilderTest { - - @Test - public void basicMerge() throws Exception{ - ChangeSetBuilder cb1 = new ChangeSetBuilder(5, 2); - add(cb1, "1"); - - ChangeSetBuilder cb2 = new ChangeSetBuilder(5, 2); - add(cb2, "2"); - - ChangeSet cs = cb1.add(cb2.build()).build(); - assertThat(cs.getAllNodeTypes(), containsInAnyOrder("nt-1", "nt-2")); - assertThat(cs.getParentPaths(), containsInAnyOrder("p-1", "p-2")); - assertThat(cs.getParentNodeNames(), containsInAnyOrder("nn-1", "nn-2")); - assertThat(cs.getParentNodeTypes(), containsInAnyOrder("pnt-1", "pnt-2")); - assertThat(cs.getPropertyNames(), containsInAnyOrder("pn-1", "pn-2")); - } - - @Test - public void addedChangeSetAlreadyOverflown() throws Exception{ - ChangeSetBuilder cb1 = new ChangeSetBuilder(5, 2); - add(cb1, "1"); - - ChangeSet cs1 = new ChangeSet(2, null, of("nn-2"), of("nt-2"), of("pn-2"), of("nt-2")); - ChangeSet mcs1 = cb1.add(cs1).build(); - assertNull(mcs1.getParentPaths()); - assertThat(mcs1.getAllNodeTypes(), containsInAnyOrder("nt-1", "nt-2")); - } - - @Test - public void overflowPath() throws Exception{ - ChangeSetBuilder cb1 = new ChangeSetBuilder(2, 2); - add(cb1, "1"); - - ChangeSet cs1 = new ChangeSet(2, null, of("nn-2"), of("pnt-2"), of("pn-2"), of("nt-2")); - ChangeSet cs = cb1.add(cs1).build(); - assertNull(cs.getParentPaths()); - assertThat(cs.getAllNodeTypes(), containsInAnyOrder("nt-1", "nt-2")); - assertThat(cs.getParentNodeNames(), containsInAnyOrder("nn-1", "nn-2")); - assertThat(cs.getParentNodeTypes(), containsInAnyOrder("pnt-1", "pnt-2")); - assertThat(cs.getPropertyNames(), containsInAnyOrder("pn-1", "pn-2")); - - ChangeSet cs2 = new ChangeSet(2, of("p-2", "p-3"), of("nn-2"), of("pnt-2"), of("pn-2"), of("nt-2")); - cs = cb1.add(cs2).build(); - assertNull(cs.getParentPaths()); - } - - @Test - public void overflowParentNodeName() throws Exception{ - ChangeSetBuilder cb1 = new ChangeSetBuilder(2, 2); - add(cb1, "1"); - - ChangeSet cs1 = new ChangeSet(2, of("p-2"), null, of("pnt-2"), of("pn-2"), of("nt-2")); - ChangeSet cs = cb1.add(cs1).build(); - assertNull(cs.getParentNodeNames()); - assertThat(cs.getAllNodeTypes(), containsInAnyOrder("nt-1", "nt-2")); - assertThat(cs.getParentNodeTypes(), containsInAnyOrder("pnt-1", "pnt-2")); - assertThat(cs.getPropertyNames(), containsInAnyOrder("pn-1", "pn-2")); - - ChangeSet cs2 = new ChangeSet(2, of("p-2"), of("nn-2", "nn-3"), of("pnt-2"), of("pn-2"), of("nt-2")); - cs = cb1.add(cs2).build(); - assertNull(cs.getParentNodeNames()); - } - - @Test - public void overflowParentNodeTypes() throws Exception{ - ChangeSetBuilder cb1 = new ChangeSetBuilder(2, 2); - add(cb1, "1"); - - ChangeSet cs1 = new ChangeSet(2, of("p-2"), of("nn-2"), null, of("pn-2"), of("nt-2")); - ChangeSet cs = cb1.add(cs1).build(); - assertNull(cs.getParentNodeTypes()); - assertThat(cs.getParentPaths(), containsInAnyOrder("p-1", "p-2")); - assertThat(cs.getAllNodeTypes(), containsInAnyOrder("nt-1", "nt-2")); - assertThat(cs.getParentNodeNames(), containsInAnyOrder("nn-1", "nn-2")); - assertThat(cs.getPropertyNames(), containsInAnyOrder("pn-1", "pn-2")); - } - - @Test - public void overflowPropertyNames() throws Exception{ - ChangeSetBuilder cb1 = new ChangeSetBuilder(2, 2); - add(cb1, "1"); - - ChangeSet cs1 = new ChangeSet(2, of("p-2"), of("nn-2"), of("pnt-2"), null, of("nt-2")); - ChangeSet cs = cb1.add(cs1).build(); - assertNull(cs.getPropertyNames()); - assertThat(cs.getParentPaths(), containsInAnyOrder("p-1", "p-2")); - assertThat(cs.getAllNodeTypes(), containsInAnyOrder("nt-1", "nt-2")); - assertThat(cs.getParentNodeNames(), containsInAnyOrder("nn-1", "nn-2")); - assertThat(cs.getParentNodeTypes(), containsInAnyOrder("pnt-1", "pnt-2")); - } - - @Test - public void overflowAllNodeTypes() throws Exception{ - ChangeSetBuilder cb1 = new ChangeSetBuilder(2, 2); - add(cb1, "1"); - - ChangeSet cs1 = new ChangeSet(2, of("p-2"), of("nn-2"), of("pnt-2"), of("pn-2"), null); - ChangeSet cs = cb1.add(cs1).build(); - assertNull(cs.getAllNodeTypes()); - assertThat(cs.getParentPaths(), containsInAnyOrder("p-1", "p-2")); - assertThat(cs.getParentNodeNames(), containsInAnyOrder("nn-1", "nn-2")); - assertThat(cs.getParentNodeTypes(), containsInAnyOrder("pnt-1", "pnt-2")); - assertThat(cs.getPropertyNames(), containsInAnyOrder("pn-1", "pn-2")); - } - - @Test - public void pathDepth() throws Exception{ - ChangeSetBuilder cb = new ChangeSetBuilder(10, 2); - cb.addParentPath("/a/b"); - cb.addParentPath("/x"); - cb.addParentPath("/p/q/r"); - - ChangeSet cs = cb.build(); - assertThat(cs.getParentPaths(), containsInAnyOrder("/a/b", "/x", "/p/q")); - } - - @Test - public void changeSetDepthMoreThanBuilder() throws Exception{ - ChangeSetBuilder cb1 = new ChangeSetBuilder(10, 3); - cb1.addParentPath("/x"); - cb1.addParentPath("/x/y"); - cb1.addParentPath("/x/y/z"); - - ChangeSetBuilder cb2 = new ChangeSetBuilder(10, 8); - cb2.addParentPath("/p"); - cb2.addParentPath("/p/q"); - cb2.addParentPath("/p/q/r"); - cb2.addParentPath("/a/b/c/d"); - cb2.addParentPath("/a/b/x/y/z"); - - cb1.add(cb2.build()); - - ChangeSet cs = cb1.build(); - assertThat(cs.getParentPaths(), containsInAnyOrder( - "/x", "/x/y", "/x/y/z", - "/p", "/p/q", "/p/q/r", - "/a/b/c", "/a/b/x" //Chopped paths - )); - - assertEquals(cb1.getMaxPrefilterPathDepth(), cs.getMaxPrefilterPathDepth()); - } - - @Test - public void builderDepthMoreThanChangeSet() throws Exception{ - ChangeSetBuilder cb1 = new ChangeSetBuilder(10, 8); - cb1.addParentPath("/p"); - cb1.addParentPath("/p/q"); - cb1.addParentPath("/p/q/r"); - cb1.addParentPath("/a/b/c/d"); - cb1.addParentPath("/a/b/x/y/z"); - - ChangeSetBuilder cb2 = new ChangeSetBuilder(10, 2); - cb2.addParentPath("/x"); - cb2.addParentPath("/x/y"); - - cb1.add(cb2.build()); - - ChangeSet cs = cb1.build(); - assertThat(cs.getParentPaths(), containsInAnyOrder( - "/x", "/x/y", - "/p", "/p/q", - "/a/b" //Chopped paths - )); - - assertEquals(cb2.getMaxPrefilterPathDepth(), cs.getMaxPrefilterPathDepth()); - } - - @Test - public void nullChangeSet() throws Exception{ - ChangeSetBuilder cb1 = new ChangeSetBuilder(10, 8); - add(cb1, "1"); - - cb1.add(null); - ChangeSet cs = cb1.build(); - assertNull(cs.getParentNodeTypes()); - assertNull(cs.getParentNodeNames()); - assertNull(cs.getParentPaths()); - assertNull(cs.getAllNodeTypes()); - assertNull(cs.getPropertyNames()); - } - - private static void add(ChangeSetBuilder cb, String suffix){ - cb.addNodeType("nt-"+suffix) - .addParentPath("p-"+suffix) - .addParentNodeName("nn-"+suffix) - .addParentNodeType("pnt-"+suffix) - .addPropertyName("pn-"+suffix); - } - -} \ No newline at end of file Property changes on: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/ChangeSetBuilderTest.java ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Index: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/ChangeSetTest.java =================================================================== --- oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/ChangeSetTest.java (revision 1809589) +++ oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/ChangeSetTest.java (nonexistent) @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.jackrabbit.oak.plugins.observation; - -import com.google.common.collect.ImmutableSet; -import org.junit.Test; - -import static com.google.common.collect.ImmutableSet.of; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -public class ChangeSetTest { - - @Test - public void asJson() throws Exception{ - ChangeSet cs1 = new ChangeSet(2, of("p-2", "p-3"), null, - ImmutableSet.of(), of("pn-2"), of("nt-2")); - String json = cs1.asString(); - - ChangeSet cs2 = ChangeSet.fromString(json); - assertEquals(cs1, cs2); - assertNull(cs2.getParentNodeNames()); - assertTrue(cs2.getParentNodeTypes().isEmpty()); - } - - @Test - public void asJsonAll() throws Exception{ - ChangeSet cs1 = new ChangeSet(2, of("p-2"), of("nn-2"), of("pnt-2"), of("pn-2"), of("nt-2")); - String json = cs1.asString(); - ChangeSet cs2 = ChangeSet.fromString(json); - assertEquals(cs1, cs2); - } - -} \ No newline at end of file Property changes on: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/ChangeSetTest.java ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Index: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/filter/ChangeSetFilterImplTest.java =================================================================== --- oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/filter/ChangeSetFilterImplTest.java (revision 1809589) +++ oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/filter/ChangeSetFilterImplTest.java (working copy) @@ -29,8 +29,8 @@ import com.google.common.collect.Sets; import org.apache.jackrabbit.oak.commons.PathUtils; -import org.apache.jackrabbit.oak.plugins.observation.ChangeSet; -import org.apache.jackrabbit.oak.plugins.observation.ChangeSetBuilder; +import org.apache.jackrabbit.oak.spi.observation.ChangeSet; +import org.apache.jackrabbit.oak.spi.observation.ChangeSetBuilder; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; Index: oak-core-spi/pom.xml =================================================================== --- oak-core-spi/pom.xml (revision 1809589) +++ oak-core-spi/pom.xml (working copy) @@ -44,6 +44,7 @@ org.apache.jackrabbit.oak.spi.gc, org.apache.jackrabbit.oak.spi.namespace, org.apache.jackrabbit.oak.spi.nodetype, + org.apache.jackrabbit.oak.spi.observation, org.apache.jackrabbit.oak.spi.mount, org.apache.jackrabbit.oak.spi.version, org.apache.jackrabbit.oak.spi.whiteboard, @@ -167,6 +168,12 @@ test + org.hamcrest + hamcrest-all + 1.3 + test + + org.apache.jackrabbit oak-commons ${project.version} Index: oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/observation/ChangeSet.java =================================================================== --- oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/observation/ChangeSet.java (revision 1809589) +++ oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/observation/ChangeSet.java (working copy) @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.jackrabbit.oak.plugins.observation; +package org.apache.jackrabbit.oak.spi.observation; import java.util.Set; @@ -62,6 +62,8 @@ */ public final class ChangeSet { + public static final String COMMIT_CONTEXT_OBSERVATION_CHANGESET = "oak.observation.changeSet"; + private final int maxPathDepth; private final Set parentPaths; private final Set parentNodeNames; Index: oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/observation/ChangeSetBuilder.java =================================================================== --- oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/observation/ChangeSetBuilder.java (revision 1809589) +++ oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/observation/ChangeSetBuilder.java (working copy) @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.jackrabbit.oak.plugins.observation; +package org.apache.jackrabbit.oak.spi.observation; import java.util.Set; Index: oak-core-spi/src/test/java/org/apache/jackrabbit/oak/spi/observation/ChangeSetBuilderTest.java =================================================================== --- oak-core-spi/src/test/java/org/apache/jackrabbit/oak/spi/observation/ChangeSetBuilderTest.java (revision 1809589) +++ oak-core-spi/src/test/java/org/apache/jackrabbit/oak/spi/observation/ChangeSetBuilderTest.java (working copy) @@ -17,7 +17,7 @@ * under the License. */ -package org.apache.jackrabbit.oak.plugins.observation; +package org.apache.jackrabbit.oak.spi.observation; import org.junit.Test; Index: oak-core-spi/src/test/java/org/apache/jackrabbit/oak/spi/observation/ChangeSetTest.java =================================================================== --- oak-core-spi/src/test/java/org/apache/jackrabbit/oak/spi/observation/ChangeSetTest.java (revision 1809589) +++ oak-core-spi/src/test/java/org/apache/jackrabbit/oak/spi/observation/ChangeSetTest.java (working copy) @@ -17,7 +17,7 @@ * under the License. */ -package org.apache.jackrabbit.oak.plugins.observation; +package org.apache.jackrabbit.oak.spi.observation; import com.google.common.collect.ImmutableSet; import org.junit.Test; Index: oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/ChangeProcessor.java =================================================================== --- oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/ChangeProcessor.java (revision 1809589) +++ oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/ChangeProcessor.java (working copy) @@ -23,8 +23,8 @@ import static java.util.Collections.emptyMap; import static org.apache.jackrabbit.api.stats.RepositoryStatistics.Type.OBSERVATION_EVENT_COUNTER; import static org.apache.jackrabbit.api.stats.RepositoryStatistics.Type.OBSERVATION_EVENT_DURATION; -import static org.apache.jackrabbit.oak.plugins.observation.ChangeCollectorProvider.COMMIT_CONTEXT_OBSERVATION_CHANGESET; import static org.apache.jackrabbit.oak.plugins.observation.filter.VisibleFilter.VISIBLE_FILTER; +import static org.apache.jackrabbit.oak.spi.observation.ChangeSet.COMMIT_CONTEXT_OBSERVATION_CHANGESET; import static org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardUtils.registerMBean; import static org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardUtils.scheduleWithFixedDelay; @@ -42,7 +42,6 @@ import org.apache.jackrabbit.commons.observation.ListenerTracker; import org.apache.jackrabbit.oak.api.ContentSession; import org.apache.jackrabbit.oak.namepath.NamePathMapper; -import org.apache.jackrabbit.oak.plugins.observation.ChangeSet; import org.apache.jackrabbit.oak.plugins.observation.CommitRateLimiter; import org.apache.jackrabbit.oak.plugins.observation.Filter; import org.apache.jackrabbit.oak.plugins.observation.FilteringAwareObserver; @@ -58,6 +57,7 @@ import org.apache.jackrabbit.oak.spi.commit.CommitContext; import org.apache.jackrabbit.oak.spi.commit.CommitInfo; import org.apache.jackrabbit.oak.spi.commit.Observer; +import org.apache.jackrabbit.oak.spi.observation.ChangeSet; import org.apache.jackrabbit.oak.spi.state.NodeState; import org.apache.jackrabbit.oak.spi.whiteboard.CompositeRegistration; import org.apache.jackrabbit.oak.spi.whiteboard.Registration;