Interface MamdaBookAtomicBookHandler


  • public interface MamdaBookAtomicBookHandler
    MamdaBookAtomicBookHandler is an interface for applications that need to know when a MamdaBookAtomicListener finishes processing a single book update. This may be useful for applications that wish to destroy the subscription from a callback as the subscription can only be destroyed after the message processing is complete. Furthermore, it allows applications to determine when to clear the book when a recap arrives.
    • Method Detail

      • onBookAtomicBeginBook

        void onBookAtomicBeginBook​(MamdaSubscription subscription,
                                   MamdaBookAtomicListener listener,
                                   boolean isRecap)
        Method invoked before we start processing the first level in a message. The book should be cleared when isRecap == true.
        Parameters:
        subscription - The MamdaSubscription handle.
        listener - The listener handling recaps/updates.
        isRecap - Whether the first update was a recap.
      • onBookAtomicEndBook

        void onBookAtomicEndBook​(MamdaSubscription subscription,
                                 MamdaBookAtomicListener listener)
        Method invoked when we stop processing the last level in a message. We invoke this method after the last entry for the level gets processed. The subscription may be destroyed from this callback.
        Parameters:
        subscription - The MamdaSubscription handle.
        listener - The listener handling recaps/updates.
      • onBookAtomicClear

        void onBookAtomicClear​(MamdaSubscription subscription,
                               MamdaBookAtomicListener listener,
                               com.wombat.mama.MamaMsg msg)
        Method invoked when an order book is cleared.
        Parameters:
        subscription - The MamdaSubscription handle.
        listener - The listener handling recaps/updates.
        msg - The MamaMsg that triggered this invocation.
      • onBookAtomicGap

        void onBookAtomicGap​(MamdaSubscription subscription,
                             MamdaBookAtomicListener listener,
                             com.wombat.mama.MamaMsg msg,
                             MamdaBookAtomicGap event)
        Method invoked when a gap in orderBook reports is discovered.
        Parameters:
        subscription - The MamdaSubscription handle.
        listener - The listener handling recaps/updates.
        msg - The MamaMsg that triggered this invocation.
        event - The gap value object.