Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1397

Implement JCR Observation in 3.0

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Blocker
    • 3.0.0.Alpha2
    • 3.0.0.Alpha1
    • JCR
    • None

    Description

      JCR Observation hasn't yet been ported to the '3.x' branch. The basic design and implementation will be pretty similar to how it worked in '2.x', except that the low-level evens are changed pretty dramatically in '3.x'. Also, it'd be useful to have a queue and worker pool to push events out to the registered observers.

      Here's the basic outline for the observation implementation:

      • implement the JCR ObservationManager interface and manage the registered listeners (much as in 2.x)
      • implement a o.m.j.cache.change.ChangeSetListener that receives the cache-level ChangeSet instances, submits each ChangeSet object into a queue, and call RepositoryStatistic.increment(ValueMetric.EVENT_QUEUE_SIZE)
      • have the queue worker(s) pull ChangeSet instances from the queue, call RepositoryStatistic.decrement(ValueMetric.EVENT_QUEUE_SIZE), convert to the appropriate JCR event objects, and then notify each registered listener
      • change JcrRepository to instantiate the JcrObsevationManager and to register the ChangeSetListener implementation with the RepositoryCache (similarly to how the LockManager is registered as a listener)

      Attachments

        Issue Links

          Activity

            People

              hchiorean Horia Chiorean (Inactive)
              rhauch Randall Hauch (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: