Class Relayer

java.lang.Object
org.jgroups.protocols.relay.Relayer
Direct Known Subclasses:
Relayer2, Relayer3

public abstract class Relayer extends Object
Base class for all relayers
Since:
5.2.17
  • Field Details

    • relay

      protected final RELAY relay
    • log

      protected final Log log
    • done

      protected volatile boolean done
      Flag set when stop() is called. Since a Relayer should not be used after stop() has been called, a new instance needs to be created
    • stats

      protected boolean stats
    • routes

      protected final Map<String,List<Route>> routes
      The routing table. Site IDs are the keys (e.g. "sfo", and list of routes are the values
    • forward_routes

      protected final Set<ForwardingRoute> forward_routes
  • Constructor Details

    • Relayer

      public Relayer(RELAY relay, Log log)
  • Method Details

    • stop

      public abstract void stop()
    • relay

      public RELAY relay()
    • log

      public Log log()
    • done

      public boolean done()
    • getBridgeView

      protected abstract View getBridgeView(String cluster_name)
    • getRoute

      protected Route getRoute(String site)
    • toString

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

      public int getNumRoutes()
    • getRoute

      protected Route getRoute(String site, Address sender)
    • getRoutes

      protected List<Route> getRoutes(String... excluded_sites)
    • addRoutes

      protected void addRoutes(String site, List<Route> new_routes)
    • hasRouteTo

      protected boolean hasRouteTo(String r)
    • removeRoute

      protected void removeRoute(String site)
    • getRoutes

      protected List<Route> getRoutes(String site)
      Gets routes for a given site. The result is the real value, which can be modified, so make a copy!
    • printRoutes

      protected String printRoutes()
    • getForwardingRouteMatching

      protected Route getForwardingRouteMatching(String site, Address sender)
      Returns a Route matching any of the ForwardingRoutes, or null if none matches
    • getSiteNames

      protected Collection<String> getSiteNames()
    • isExcluded

      protected static boolean isExcluded(Route route, String... excluded_sites)