public class Relayer
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected class |
Relayer.Bridge |
Modifier and Type | Field and Description |
---|---|
protected java.util.Queue<Relayer.Bridge> |
bridges
The bridges which are used to connect to different sites
|
protected boolean |
done
Flag set when stop() is called.
|
protected Log |
log |
protected RELAY2 |
relay |
protected java.util.concurrent.ConcurrentMap<java.lang.String,java.util.List<Route>> |
routes
The routing table.
|
protected boolean |
stats |
Modifier and Type | Method and Description |
---|---|
boolean |
done() |
protected View |
getBridgeView(java.lang.String cluster_name) |
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... excluded_sites) |
protected java.util.List<java.lang.String> |
getSiteNames() |
protected static boolean |
isExcluded(Route route,
java.lang.String... excluded_sites) |
java.lang.String |
printRoutes() |
void |
start(java.util.List<RelayConfig.BridgeConfig> bridge_configs,
java.lang.String bridge_name,
java.lang.String my_site_id)
Creates all bridges from site_config and connects them (joining the bridge clusters)
|
void |
stop()
Disconnects and destroys all bridges
|
protected java.util.concurrent.ConcurrentMap<java.lang.String,java.util.List<Route>> routes
protected final java.util.Queue<Relayer.Bridge> bridges
protected final Log log
protected final RELAY2 relay
protected volatile boolean done
protected boolean stats
public boolean done()
public void start(java.util.List<RelayConfig.BridgeConfig> bridge_configs, java.lang.String bridge_name, java.lang.String my_site_id) throws java.lang.Throwable
bridge_configs
- A list of bridge configurationsbridge_name
- The name of the local bridge channel, prefixed with '_'.my_site_id
- The ID of this sitejava.lang.Throwable
public void stop()
public java.lang.String printRoutes()
protected Route getRoute(java.lang.String site)
protected java.util.List<java.lang.String> getSiteNames()
protected java.util.List<Route> getRoutes(java.lang.String... excluded_sites)
protected View getBridgeView(java.lang.String cluster_name)
protected static boolean isExcluded(Route route, java.lang.String... excluded_sites)
Copyright © 1998-2020 Red Hat. All Rights Reserved.