On Wed, Mar 11, 2020 at 4:40 PM Matt Ryan <mattr...@apache.org> wrote:
> Hi oak-dev, > > I'm researching how indexing works in Oak to better understand it, and > lately the focus is how indexes register for notification of changes in the > repository. > > This appears to be pretty straightforward: When the Jcr object is being > set up, you provide one or more Observer instances, and then when the > repository is created these Observer instances are registered to be called > when changes happen. > > What confused me was the use of Observer rather than an > ObservationManager, EventListeners, and EventFilters as described in [0]. > Other than addressing what seems to be a similar problem, these two > approaches don't appear to be related to each other. It appears that Oak > recommends the ObservationManager approach, but doesn't use it for index > change management. > > Can anyone help clarify this? Why the two approaches? > > > [0] - https://jackrabbit.apache.org/oak/docs/features/observation.html > > > -MR > Further digging revealed what I suspected - that the ObservationManager approach actually uses an Observer registered with the whiteboard under the covers. The question remains though - why the two approaches, and in specific why are indexes registered as Observers rather than via the ObservationManager method? -MR