Class Relayer2.Bridge

  • All Implemented Interfaces:
    Receiver
    Enclosing class:
    Relayer2

    protected class Relayer2.Bridge
    extends java.lang.Object
    implements Receiver
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Bridge​(JChannel ch, java.lang.String cluster, java.lang.String name, AddressGenerator gen)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean contains​(java.util.List<Route> routes, Address addr)  
      protected java.util.Map<java.lang.String,​java.util.List<Address>> extract​(View view)
      Returns a map containing the site keys and addresses as values
      void receive​(Message msg)
      Called when a message is received.
      protected void start()  
      protected void stop()  
      void viewAccepted​(View new_view)
      The view contains a list of SiteUUIDs.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • cluster_name

        protected final java.lang.String cluster_name
      • view

        protected View view
    • Constructor Detail

      • Bridge

        protected Bridge​(JChannel ch,
                         java.lang.String cluster,
                         java.lang.String name,
                         AddressGenerator gen)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • start

        protected void start()
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • stop

        protected void stop()
      • receive

        public void receive​(Message msg)
        Description copied from interface: Receiver
        Called when a message is received.
        Specified by:
        receive in interface Receiver
        Parameters:
        msg - The message
      • viewAccepted

        public void viewAccepted​(View new_view)
        The view contains a list of SiteUUIDs. Adjust the routing table based on the SiteUUIDs UUID and site
        Specified by:
        viewAccepted in interface Receiver
      • contains

        protected boolean contains​(java.util.List<Route> routes,
                                   Address addr)
      • extract

        protected java.util.Map<java.lang.String,​java.util.List<Address>> extract​(View view)
        Returns a map containing the site keys and addresses as values