public class Relayer extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
Relayer.Bridge |
class |
Relayer.Route
Includes information about the site master of the route and the channel to be used
|
Modifier and Type | Field and Description |
---|---|
protected 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 ConcurrentMap<String,List<Relayer.Route>> |
routes
The routing table.
|
protected boolean |
stats |
Modifier and Type | Method and Description |
---|---|
boolean |
done() |
protected View |
getBridgeView(String cluster_name) |
protected Relayer.Route |
getRoute(String site)
Grabs a random route
|
protected List<Relayer.Route> |
getRoutes(String... excluded_sites) |
protected List<String> |
getSiteNames() |
protected static boolean |
isExcluded(Relayer.Route route,
String... excluded_sites) |
String |
printRoutes() |
void |
start(List<RelayConfig.BridgeConfig> bridge_configs,
String bridge_name,
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 ConcurrentMap<String,List<Relayer.Route>> routes
protected final 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(List<RelayConfig.BridgeConfig> bridge_configs, String bridge_name, String my_site_id) throws 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 siteThrowable
public void stop()
public String printRoutes()
protected Relayer.Route getRoute(String site)
site
- protected List<Relayer.Route> getRoutes(String... excluded_sites)
protected static boolean isExcluded(Relayer.Route route, String... excluded_sites)
Copyright © 2023 JBoss, a division of Red Hat. All rights reserved.