Interface RuntimeStateProvider


  • public interface RuntimeStateProvider
    Runtime state is different from config state in that it can be updated by either node.

    When the nodes connect, depending on the situation, a full synchronization might be performed by calling getFullState on one node, and setFullState on the other.

    After that, the active node can post updates to the Redundancy manager, and they will be delivered via updateState.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.io.Serializable getFullState()
      Provides the full state of the provider, to be delivered via setFullState on the other node.
      java.lang.String getId()
      The id that will be used to post and deliver updates to the runtime state.
      void setFullState​(java.io.Serializable state)
      Receives the full state provided by the other node for synchronization purposes.
      void updateState​(java.io.Serializable update)
      Receives a state update provided by the other node.
    • Method Detail

      • getId

        java.lang.String getId()
        The id that will be used to post and deliver updates to the runtime state.
      • getFullState

        java.io.Serializable getFullState()
        Provides the full state of the provider, to be delivered via setFullState on the other node.
      • setFullState

        void setFullState​(java.io.Serializable state)
        Receives the full state provided by the other node for synchronization purposes.
      • updateState

        void updateState​(java.io.Serializable update)
        Receives a state update provided by the other node.