org.jgroups.protocols.relay
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 ConcurrentMap<Short,Future<?>> |
down_tasks
Map to store tasks which set the status of a site from UNKNOWN to DOWN.
|
protected ConcurrentMap<Short,BlockingQueue<Message>> |
fwd_queue |
protected Log |
log |
protected RELAY2 |
relay |
protected Relayer.Route[] |
routes
The routing table.
|
Constructor and Description |
---|
Relayer(RELAY2 relay,
Log log,
int num_routes) |
Modifier and Type | Method and Description |
---|---|
boolean |
done() |
protected View |
getBridgeView(String cluster_name) |
protected Relayer.Route |
getRoute(short site) |
protected List<Relayer.Route> |
getRoutes(short... excluded_sites) |
protected void |
init(int num_routes) |
protected static boolean |
isExcluded(Relayer.Route route,
short... excluded_sites) |
String |
printRoutes() |
protected void |
setRoute(short site,
JChannel bridge,
SiteMaster site_master,
RELAY2.RouteStatus status) |
void |
start(List<RelayConfig.BridgeConfig> bridge_configs,
String bridge_name,
short my_site_id)
Creates all bridges from site_config and connects them (joining the bridge clusters)
|
void |
stop()
Disconnects and destroys all bridges
|
protected Relayer.Route[] routes
protected final Queue<Relayer.Bridge> bridges
protected final Log log
protected final RELAY2 relay
protected volatile boolean done
protected final ConcurrentMap<Short,BlockingQueue<Message>> fwd_queue
protected final ConcurrentMap<Short,Future<?>> down_tasks
public boolean done()
public void start(List<RelayConfig.BridgeConfig> bridge_configs, String bridge_name, short 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
protected void init(int num_routes)
public void stop()
public String printRoutes()
protected void setRoute(short site, JChannel bridge, SiteMaster site_master, RELAY2.RouteStatus status)
protected Relayer.Route getRoute(short site)
protected List<Relayer.Route> getRoutes(short... excluded_sites)
protected static boolean isExcluded(Relayer.Route route, short... excluded_sites)
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.