Class ObservationUtil

  • public class ObservationUtil
    extends Object
    Utility for common JCR Observations
    • Constructor Detail

      • ObservationUtil

        public ObservationUtil()
    • Method Detail

      • isExternal

        public static boolean isExternal​(Event event)
        On a JCR implementation which supports cluster-aware event processing, checks if the event has originally happened locally (internal) or remotely (external).

        If the result of this method call is used to filter out external events, the recommended approach is to use one of the following dedicated APIs:

        1. Register observation listeners with a org.apache.jackrabbit.api.observation.JackrabbitEventFilter and specify setNoExternal(true)
        2. Implement the org.apache.jackrabbit.oak.plugins.observation.ExcludeExternal marker interface ( Oak-only )
        This ensures that external events are not delivered within the cluster only to be filtered away by the receiving listener.

        event - The event to be checked.
        true if the JCR implementation is cluster aware and the event is external.