Class ABP


  • @Deprecated
    public class ABP
    extends Protocol
    Deprecated.
    Mainly used as a design study of Pluscal / TLA+
    Alternating Bit Protocol. Use without any UNICASTX protocol. Place it somewhere below NAKACKX. Provides reliable p2p unicasting. Design is in ./doc/design/ABP.txt
    Since:
    3.6.3
    Author:
    Bela Ban
    • Field Detail

      • resend_interval

        protected long resend_interval
        Deprecated.
      • send_map

        protected final java.util.concurrent.ConcurrentHashMap<Address,​ABP.Entry> send_map
        Deprecated.
      • recv_map

        protected final java.util.concurrent.ConcurrentHashMap<Address,​ABP.Entry> recv_map
        Deprecated.
      • local_addr

        protected Address local_addr
        Deprecated.
    • Constructor Detail

      • ABP

        public ABP()
        Deprecated.
    • Method Detail

      • init

        public void init()
                  throws java.lang.Exception
        Deprecated.
        Description copied from class: Protocol
        Called after instance has been created (null constructor) and before protocol is started. Properties are already set. Other protocols are not yet connected and events cannot yet be sent.
        Overrides:
        init in class Protocol
        Throws:
        java.lang.Exception - Thrown if protocol cannot be initialized successfully. This will cause the ProtocolStack to fail, so the channel constructor will throw an exception
      • down

        public java.lang.Object down​(Event evt)
        Deprecated.
        Description copied from class: Protocol
        An event is to be sent down the stack. A protocol may want to examine its type and perform some action on it, depending on the event's type. If the event is a message MSG, then the protocol may need to add a header to it (or do nothing at all) before sending it down the stack using down_prot.down().
        Overrides:
        down in class Protocol
      • down

        public java.lang.Object down​(Message msg)
        Deprecated.
        Description copied from class: Protocol
        A message is sent down the stack. Protocols may examine the message and do something (e.g. add a header) with it before passing it down.
        Overrides:
        down in class Protocol
      • up

        public java.lang.Object up​(Message msg)
        Deprecated.
        Description copied from class: Protocol
        A single message was received. Protocols may examine the message and do something (e.g. add a header) with it before passing it up.
        Overrides:
        up in class Protocol