@@ -0,0 +1,3087 @@
+/*%0A * Licensed to the Apache Software Foundation (ASF) under one or more%0A * contributor license agreements.  See the NOTICE file distributed with%0A * this work for additional information regarding copyright ownership.%0A * The ASF licenses this file to You under the Apache License, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License.  You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.apache.jackrabbit.oak.spi.commit;%0A%0Aimport org.apache.jackrabbit.oak.spi.state.NodeState;%0Aimport org.apache.jackrabbit.oak.spi.state.NodeStore;%0A%0A/**%0A * Extension point for observing changes in an Oak repository. Content%0A * changes are reported by passing the %22before%22 and %22after%22 state of the%0A * content tree to the %7B@link #contentChanged(NodeStore, NodeState, NodeState)%7D%0A * callback method.%0A * %3Cp%3E%0A * Each observer is guaranteed to see a linear sequence of changes, i.e.%0A * the %22after%22 state of one method call is guaranteed to be the %22before%22%0A * state of the following call. This sequence of changes only applies while%0A * a hook is registered with a specific repository instance, and is thus for%0A * example %3Cem%3Enot%3C/me%3E guaranteed across repository restarts.%0A * %3Cp%3E%0A * Note also that two observers may not necessarily see the same sequence of%0A * content changes, and each commit does not necessarily trigger a separate%0A * observer callback. It is also possible for an observer to be notified%0A * when no actual changes have been committed.%0A * %3Cp%3E%0A * A specific implementation or deployment may offer more guarantees about%0A * when and how observers are notified of content changes. See the relevant%0A * documentation for more details about such cases.%0A *%0A * @since Oak 0.3%0A */%0Apublic interface Observer %7B%0A%0A    /**%0A     * Observes a content change. The implementation might for example%0A     * use this information to update caches, trigger JCR-level observation%0A     * events or otherwise record the change.%0A     * %3Cp%3E%0A     * Content changes are observed for both commits made locally against%0A     * the repository instance to which the hook is registered and any%0A     * other changes committed by other repository instances in the same%0A     * cluster.%0A     * %3Cp%3E%0A     * After-commit hooks are executed synchronously within the context of%0A     * a repository instance, so to prevent delaying access to latest changes%0A     * the after-commit hooks should avoid any potentially blocking%0A     * operations.%0A     *%0A     * @param store the node store that contains the repository content%0A     * @param before content tree before the changes%0A     * @param after content tree after the changes%0A     */%0A    void contentChanged(NodeStore store, NodeState before, NodeState after);%0A%0A%7D%0A

Split the CommitHook interface