Interface ObserverProvider


  • public interface ObserverProvider
    Fluo Workers use this class to register Observers to process notifications. Implementations of this class should register zero or more Observers.

    When Fluo is initialized provideColumns(BiConsumer, Context) is called. The columns it registers are stored in Zookeeper. Transactions will use the columns stored in Zookeeper to determine when to set notifications. When Workers call provide(Registry, Context), the columns registered must be the same as those registered during initialization. If this is not the case, then the worker will fail to start.

    Since:
    1.1.0
    See Also:
    FluoConfiguration.setObserverProvider(String)
    • Method Detail

      • provide

        void provide​(ObserverProvider.Registry or,
                     ObserverProvider.Context ctx)
        This is method is called by Fluo Workers to register observers to process notifications.

        Observers registered may be called concurrently by multiple threads to process different notifications. Observers should be tolerant of this.

        Parameters:
        or - Register observers with this.