Interface ISynchronizer

  • All Known Implementing Classes:
    AbstractComponentRepository, AbstractExtComponentRepository

    public interface ISynchronizer
    A Synchronizer participates in system synchoronization. During a synchronization, a synchronizer may declare any number of resources invalid and subsequently perform synchronization post processing.

    The synchronization implementation looks up all synchronizers and implements the following steps:

    1. Pre-invalidation: Ask all synchronizers for invalid resources via the preInvalidation(ISynchronization) method
    2. Invalidate all declared resources.
    3. Completion:: Complete synchronization via the complete(ISynchronization) method.
    Synchronizers have a priority. Synchronizers with higher priority will be called later during the pre-invalidation phase and they will be called earlier during the completion phase.

    The following table lists priorities of common synchronizers:

    SynchronizerprioritypreInvalidationorderCompletionorder
    com.zfabrik.boot.repos/synchronizer900run pre-invalidation on all extensions of AbstractComponentReporun complete on all extensions of AbstractComponentRepo
    com.zfabrik.components.workeradapter/workerSynchronizer800 Reset worker side db
    com.zfabrik.components/querySynchronizer550 Verify component query subscriptions at home and workers
    com.zfabrik.workers/workerSynchronizer500 Propagate invalidations to worker. Attain worker target states
    com.zfabrik.hubcr/synchronizer100 Trigger update scan on worker-side Hub CR implementation
    com.zfabrik.boot.main/homeSynchronizer1 Attain home states (home_up)
    Author:
    hb
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PRIO
      Component property defining the priority of a synchronizer
      static java.lang.String TYPE
      Component type of a synchronizer
    • Field Detail

      • TYPE

        static final java.lang.String TYPE
        Component type of a synchronizer
        See Also:
        Constant Field Values
      • PRIO

        static final java.lang.String PRIO
        Component property defining the priority of a synchronizer
        See Also:
        Constant Field Values
    • Method Detail

      • preInvalidation

        void preInvalidation​(ISynchronization sync)
        synchronizers implement this method to collect the set of components to invalidate and log messages to the end user.
      • complete

        void complete​(ISynchronization sync)
        synchronizers implement this method to re-establish any desired system state after all invalidations have been performed. Note that the set of synchronizer in this call may be different to before, due to new system content.