Package org.jgroups.protocols.relay
Class Relayer
- java.lang.Object
-
- org.jgroups.protocols.relay.Relayer
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
done
Flag set when stop() is called.protected java.util.Set<ForwardingRoute>
forward_routes
protected Log
log
protected RELAY
relay
protected java.util.Map<java.lang.String,java.util.List<Route>>
routes
The routing table.protected boolean
stats
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addRoutes(java.lang.String site, java.util.List<Route> new_routes)
boolean
done()
protected abstract View
getBridgeView(java.lang.String cluster_name)
protected Route
getForwardingRouteMatching(java.lang.String site, Address sender)
Returns a Route matching any of the ForwardingRoutes, or null if none matchesint
getNumRoutes()
protected Route
getRoute(java.lang.String site)
protected Route
getRoute(java.lang.String site, Address sender)
protected java.util.List<Route>
getRoutes(java.lang.String site)
Gets routes for a given site.protected java.util.List<Route>
getRoutes(java.lang.String... excluded_sites)
protected java.util.Collection<java.lang.String>
getSiteNames()
protected boolean
hasRouteTo(java.lang.String r)
protected static boolean
isExcluded(Route route, java.lang.String... excluded_sites)
Log
log()
protected java.lang.String
printRoutes()
RELAY
relay()
protected void
removeRoute(java.lang.String site)
abstract void
stop()
java.lang.String
toString()
-
-
-
Field Detail
-
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 java.util.Map<java.lang.String,java.util.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 java.util.Set<ForwardingRoute> forward_routes
-
-
Method Detail
-
stop
public abstract void stop()
-
relay
public RELAY relay()
-
log
public Log log()
-
done
public boolean done()
-
getBridgeView
protected abstract View getBridgeView(java.lang.String cluster_name)
-
getRoute
protected Route getRoute(java.lang.String site)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getNumRoutes
public int getNumRoutes()
-
getRoutes
protected java.util.List<Route> getRoutes(java.lang.String... excluded_sites)
-
addRoutes
protected void addRoutes(java.lang.String site, java.util.List<Route> new_routes)
-
hasRouteTo
protected boolean hasRouteTo(java.lang.String r)
-
removeRoute
protected void removeRoute(java.lang.String site)
-
getRoutes
protected java.util.List<Route> getRoutes(java.lang.String site)
Gets routes for a given site. The result is the real value, which can be modified, so make a copy!
-
printRoutes
protected java.lang.String printRoutes()
-
getForwardingRouteMatching
protected Route getForwardingRouteMatching(java.lang.String site, Address sender)
Returns a Route matching any of the ForwardingRoutes, or null if none matches
-
getSiteNames
protected java.util.Collection<java.lang.String> getSiteNames()
-
isExcluded
protected static boolean isExcluded(Route route, java.lang.String... excluded_sites)
-
-