| java.lang.Object org.jgroups.blocks.LogicalLink
All known Subclasses: org.jgroups.protocols.WANPIPE,
LogicalLink | public class LogicalLink implements Link.Receiver(Code) | | Implements a logical point-to-point link between 2 entities consisting of a number of physical links.
Traffic is routed over any of the physical link, according to policies. Examples are: send traffic
over all links, round-robin, use first link for 70% of traffic, other links for the remaining 30%.
author: Bela Ban, June 2000 |
Inner Class :public class NoLinksAvailable extends Exception | |
Inner Class :public class AllLinksDown extends Exception | |
Inner Class :public interface Receiver | |
Method Summary | |
public void | addLink(String local_addr, int local_port, String remote_addr, int remote_port) | public void | addLink(String local_addr, int local_port, String remote_addr, int remote_port, long timeout, long hb_interval) | public Vector | getLinks() | public synchronized void | linkDown(InetAddress local, int local_port, InetAddress remote, int remote_port) | public synchronized void | linkUp(InetAddress local, int local_port, InetAddress remote, int remote_port) | public static void | main(String[] args) | public synchronized void | missedHeartbeat(InetAddress local, int local_port, InetAddress remote, int remote_port, int num_missed_hbs) Missed one or more heartbeats. | public int | numberOfEstablishedLinks() | public int | numberOfLinks() | public synchronized void | receive(byte[] buf) Receive a message from any of the physical links. | public synchronized void | receivedHeartbeatAgain(InetAddress local, int local_port, InetAddress remote, int remote_port) | public void | removeAllLinks() | public boolean | send(byte[] buf) | public void | setReceiver(Receiver r) | public void | start() | public void | stop() |
link_to_use | final int link_to_use(Code) | | |
receiver | Receiver receiver(Code) | | |
LogicalLink | public LogicalLink(Receiver r)(Code) | | |
LogicalLink | public LogicalLink()(Code) | | |
addLink | public void addLink(String local_addr, int local_port, String remote_addr, int remote_port)(Code) | | |
addLink | public void addLink(String local_addr, int local_port, String remote_addr, int remote_port, long timeout, long hb_interval)(Code) | | |
linkDown | public synchronized void linkDown(InetAddress local, int local_port, InetAddress remote, int remote_port)(Code) | | One of the physical links went down
|
linkUp | public synchronized void linkUp(InetAddress local, int local_port, InetAddress remote, int remote_port)(Code) | | One of the physical links came up
|
missedHeartbeat | public synchronized void missedHeartbeat(InetAddress local, int local_port, InetAddress remote, int remote_port, int num_missed_hbs)(Code) | | Missed one or more heartbeats. Link is not yet down, though
|
numberOfEstablishedLinks | public int numberOfEstablishedLinks()(Code) | | |
numberOfLinks | public int numberOfLinks()(Code) | | |
receive | public synchronized void receive(byte[] buf)(Code) | | Receive a message from any of the physical links. That's why this and the next methods have to be
synchronized
|
receivedHeartbeatAgain | public synchronized void receivedHeartbeatAgain(InetAddress local, int local_port, InetAddress remote, int remote_port)(Code) | | Heartbeat came back again (before link was taken down) after missing some heartbeats
|
removeAllLinks | public void removeAllLinks()(Code) | | |
send | public boolean send(byte[] buf) throws AllLinksDown, NoLinksAvailable(Code) | | Send a message to the other side
|
setReceiver | public void setReceiver(Receiver r)(Code) | | |
start | public void start()(Code) | | Start all links
|
stop | public void stop()(Code) | | Stop all links
|
|
|