org.jgroups.protocols

Class STABLE

    • Constructor Detail

      • STABLE

        public STABLE()
    • Method Detail

      • getName

        public java.lang.String getName()
        Overrides:
        getName in class RpcProtocol
        Returns:
        this protocol name
      • requiredUpServices

        public java.util.Vector requiredUpServices()
        The events expected to be handled from some layer above:
        • GET_MSGS_RECEIVED: NAKACK layer
        Overrides:
        requiredUpServices in class Protocol
        Returns:
        a list of events expected by to be handled from some layer above
      • setProperties

        public boolean setProperties(java.util.Properties props)
        Set the parameters for this layer.
        • subset: the percentage of the group'size to which the msgs_seen_so_far gossip is sent periodically.
        • max_msgs: the max number of msgs to wait for between two consecutive gossipings.
        • max_wait_time: the max time to wait for between two consecutive gossipings.
        • highest_seqno_timeout: time to wait to receive from NAKACK the array of highest deliverable seqnos
        Overrides:
        setProperties in class Protocol
        Parameters:
        props - the list of parameters
      • start

        public void start()
                   throws java.lang.Exception
        Start the layer: i. Set the gossip task scheduler ii. Reset the layer's state. iii. Start the gossiping task
        Overrides:
        start in class MessageProtocol
        Throws:
        java.lang.Exception - Thrown if protocol cannot be started successfully. This will cause the ProtocolStack to fail, so Channel.connect(String) will throw an exception
      • stop

        public void stop()
        Stop scheduling the gossip task
        Overrides:
        stop in class MessageProtocol
      • gossip

        public void gossip(ViewId view_id,
                  long gossip_round,
                  long[] gossip_seqnos,
                  boolean[] heard,
                  java.lang.Object sender)
        Contains the highest sequence numbers as seen by sender
        Parameters:
        view_id - The view ID in which the gossip was sent. Must be the same as ours, otherwise it is discarded
        gossip_round - The round in which the gossip was sent
        gossip_seqnos - A vector with the highest sequence numbers as seen by sender
        heard - The sender's heard_from array. This allows us to minimize the gossip msgs for a given round as a member does not have to receive gossip msgs from each member, but members pass gossips they've received from others on in their own gossips. E.g. when a member P (of group {P,Q,R}) receives a gossip from R, its own gossip to Q might be {R,P}. Q, who hasn't received a gossip from R, will not need to receive it anymore as it is already sent by P. This simple scheme reduces the number of gossip messages needed.
        sender - The sender of the gossip message (obviously :-))
      • stability

        public void stability(ViewId view_id,
                     long gossip_round,
                     long[] stability_vector,
                     java.lang.Object sender)
        Contains the highest message sequence numbers (for each member) that can safely be deleted (because they have been seen by all members).
      • handleUpEvent

        public boolean handleUpEvent(Event evt)
        Callback. Called by superclass when event may be handled.

        Do not use PassUp in this method as the event is passed up by default by the superclass after this method returns !

        Overrides:
        handleUpEvent in class RpcProtocol
        Returns:
        boolean Defaults to true. If false, event will not be passed up the stack.
      • handleDownEvent

        public boolean handleDownEvent(Event evt)
        Callback. Called by superclass when event may be handled.

        Do not use PassDown in this method as the event is passed down by default by the superclass after this method returns !

        Overrides:
        handleDownEvent in class RpcProtocol
        Returns:
        boolean Defaults to true. If false, event will not be passed down the stack.

Copyright ? 1998-2006 Bela Ban. All Rights Reserved.