Package org.jgroups.tests
Class Probe
java.lang.Object
org.jgroups.tests.Probe
Discovers all UDP-based members running on a certain mcast address
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected classprotected class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AtomicIntegerprotected static final intprotected Stringprotected final AtomicIntegerprotected static final Stringprotected final AtomicIntegerprotected static final Stringprotected final List<Probe.Requester> protected ExecutorServiceprotected booleanprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleancheckDuplicateResponse(String response) protected voidfetchAddressesAndInvoke(SocketAddress dest, InetAddress bind_addr, String request, String passcode, long timeout, int ttl, boolean udp, boolean tcp) protected static voidhelp()static voidprivate static booleanprivate static StringparseAddress(String response) protected static Collection<SocketAddress> parseAddresses(String input, int port) Returns a list of addr:port responses.voidstart(List<InetAddress> addrs, InetAddress bind_addr, int port, int ttl, long timeout, String request, String match, boolean weed_out_duplicates, String passcode, boolean udp, boolean tcp) booleanverbose()verbose(boolean b)
-
Field Details
-
senders
-
weed_out_duplicates
protected boolean weed_out_duplicates -
match
-
DEFAULT_DIAG_PORT
protected static final int DEFAULT_DIAG_PORT- See Also:
-
MEMBER_ADDRS
- See Also:
-
thread_pool
-
requesters
-
matched
-
not_matched
-
count
-
verbose
protected boolean verbose -
PREFIX
- See Also:
-
-
Constructor Details
-
Probe
public Probe()
-
-
Method Details
-
verbose
public boolean verbose() -
verbose
-
start
public void start(List<InetAddress> addrs, InetAddress bind_addr, int port, int ttl, long timeout, String request, String match, boolean weed_out_duplicates, String passcode, boolean udp, boolean tcp) throws Exception - Throws:
Exception
-
fetchAddressesAndInvoke
protected void fetchAddressesAndInvoke(SocketAddress dest, InetAddress bind_addr, String request, String passcode, long timeout, int ttl, boolean udp, boolean tcp) throws IOException - Throws:
IOException
-
parseAddresses
Returns a list of addr:port responses. Counting the occurrences of a given address, e.g. 3 assumes we have 3 processes on the same host, yielding requests to host:port, host:port+1 and host_port+3. This is a quick-n-dirty scheme and it will fail when processes don't occupy adjacent ports.- Throws:
Exception
-
checkDuplicateResponse
-
parseAddress
-
matches
-
main
- Throws:
Exception
-
help
protected static void help()
-