Package org.jgroups.protocols.relay
Class Relayer.Bridge
- java.lang.Object
-
- org.jgroups.ReceiverAdapter
-
- org.jgroups.protocols.relay.Relayer.Bridge
-
- All Implemented Interfaces:
MembershipListener
,MessageListener
,Receiver
,StateListener
- Enclosing class:
- Relayer
protected class Relayer.Bridge extends ReceiverAdapter
-
-
Field Summary
Fields Modifier and Type Field Description protected JChannel
channel
protected java.lang.String
cluster_name
protected View
view
-
Constructor Summary
Constructors Modifier Constructor Description protected
Bridge(JChannel ch, java.lang.String cluster_name, java.lang.String channel_name, AddressGenerator addr_generator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
contains(java.util.List<Route> routes, Address addr)
protected java.util.Map<java.lang.String,java.util.List<Address>>
extract(View view)
Returns a map containing the site keys and addresses as valuesvoid
receive(Message msg)
Called when a message is received.protected void
start()
protected void
stop()
void
viewAccepted(View new_view)
The view contains a list of SiteUUIDs.
-
-
-
Constructor Detail
-
Bridge
protected Bridge(JChannel ch, java.lang.String cluster_name, java.lang.String channel_name, AddressGenerator addr_generator) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-
Method Detail
-
start
protected void start() throws java.lang.Exception
- Throws:
java.lang.Exception
-
stop
protected void stop()
-
receive
public void receive(Message msg)
Description copied from interface:MessageListener
Called when a message is received.- Specified by:
receive
in interfaceMessageListener
- Overrides:
receive
in classReceiverAdapter
-
viewAccepted
public void viewAccepted(View new_view)
The view contains a list of SiteUUIDs. Adjust the routing table based on the SiteUUIDs UUID and site- Specified by:
viewAccepted
in interfaceMembershipListener
- Overrides:
viewAccepted
in classReceiverAdapter
-
-