Package org.jgroups.tests
Class McastDiscovery
java.lang.Object
org.jgroups.tests.McastDiscovery
Discovers all neighbors in an IP multicast environment by using expanding ring multicasts (increasing TTL).
The sender multicasts a discovery packet on all available network interfaces, while also listening on
all interfaces. The discovery packet contains the sender's address, which is the address and port of the
interface on which the packet was sent. A receiver replies with an ACK back to the sender's address and port.
After n responses or m milliseconds, the sender terminates and computes the network interfaces which should be used.
The network interface is the intersection of the interface variable of all ACKs received.
- Version:
- $Revision: 1.1 $
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class(package private) class -
Field Summary
FieldsModifier and TypeFieldDescription(package private) List(package private) long(package private) HashMap(package private) InetAddress(package private) int(package private) McastDiscovery.McastSender(package private) boolean(package private) int -
Constructor Summary
ConstructorsConstructorDescriptionMcastDiscovery(InetAddress mcast_addr, int mcast_port, long interval, int ttl) -
Method Summary
-
Field Details
-
ttl
int ttl -
handlers
List handlers -
mcast_addr
InetAddress mcast_addr -
mcast_port
int mcast_port -
interval
long interval -
mcast_sender
McastDiscovery.McastSender mcast_sender -
running
volatile boolean running -
map
HashMap map
-
-
Constructor Details
-
McastDiscovery
-
-
Method Details
-
start
- Throws:
Exception
-
printValidInterfaces
void printValidInterfaces() -
main
-
help
static void help()
-