Class Bridge

java.lang.Object
org.jgroups.protocols.relay.Bridge
All Implemented Interfaces:
Receiver

public class Bridge extends Object implements Receiver
Class which joins the bridge cluster and send and receives messages to/from other sites. Also generates sitesUp()/sitesDown() notifications from view changes
Since:
5.2.17
  • Field Details

    • channel

      protected final JChannel channel
    • rel

      protected final Relayer3 rel
    • relay

      protected final RELAY relay
    • log

      protected final Log log
    • cluster_name

      protected final String cluster_name
    • view

      protected View view
    • join_timeout

      protected final long join_timeout
  • Constructor Details

  • Method Details

    • start

      protected void start() throws Exception
      Throws:
      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 and site
      Specified by:
      viewAccepted in interface Receiver
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • contains

      protected static boolean contains(List<Route> routes, Address addr)
    • removedRoutes

      protected static List<String> removedRoutes(View old_view, View new_view)
      Returns a list of routes that were in old_view, but are no longer in new_view