|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jgroups.protocols.relay.Relayer
public class Relayer
Maintains bridges and routing table. Does the routing of outgoing messages and dispatches incoming messages to the right members.
A Relayer cannot be reused once it is stopped, but a new Relayer instance must be created.
Nested Class Summary | |
---|---|
protected class |
Relayer.Bridge
|
class |
Relayer.Route
Includes information about the site master of the route and the channel to be used |
Field Summary | |
---|---|
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 java.util.concurrent.ConcurrentMap<java.lang.Short,java.util.concurrent.Future<?>> |
down_tasks
Map to store tasks which set the status of a site from UNKNOWN to DOWN. |
protected java.util.concurrent.ConcurrentMap<java.lang.Short,java.util.concurrent.BlockingQueue<Message>> |
fwd_queue
|
protected Log |
log
|
protected RELAY2 |
relay
|
protected Relayer.Route[] |
routes
The routing table. |
protected boolean |
stats
|
Constructor Summary | |
---|---|
Relayer(RELAY2 relay,
Log log,
int num_routes)
|
Method Summary | |
---|---|
boolean |
done()
|
protected View |
getBridgeView(java.lang.String cluster_name)
|
protected Relayer.Route |
getRoute(short site)
|
protected java.util.List<Relayer.Route> |
getRoutes(short... excluded_sites)
|
protected void |
init(int num_routes)
|
protected static boolean |
isExcluded(Relayer.Route route,
short... excluded_sites)
|
java.lang.String |
printRoutes()
|
protected void |
setRoute(short site,
JChannel bridge,
SiteMaster site_master,
RELAY2.RouteStatus status)
|
void |
start(java.util.List<RelayConfig.BridgeConfig> bridge_configs,
java.lang.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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Relayer.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
protected final java.util.concurrent.ConcurrentMap<java.lang.Short,java.util.concurrent.BlockingQueue<Message>> fwd_queue
protected final java.util.concurrent.ConcurrentMap<java.lang.Short,java.util.concurrent.Future<?>> down_tasks
Constructor Detail |
---|
public Relayer(RELAY2 relay, Log log, int num_routes)
Method Detail |
---|
public boolean done()
public void start(java.util.List<RelayConfig.BridgeConfig> bridge_configs, java.lang.String bridge_name, short 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 site
java.lang.Throwable
protected void init(int num_routes)
public void stop()
public java.lang.String printRoutes()
protected void setRoute(short site, JChannel bridge, SiteMaster site_master, RELAY2.RouteStatus status)
protected Relayer.Route getRoute(short site)
protected java.util.List<Relayer.Route> getRoutes(short... excluded_sites)
protected View getBridgeView(java.lang.String cluster_name)
protected static boolean isExcluded(Relayer.Route route, short... excluded_sites)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |