Package org.jgroups.util
Class ResourceManager
java.lang.Object
org.jgroups.util.ResourceManager
Manages resources such as multicast addresses and multicast ports, and TCP
ports. This class is mainly used for running unit tests in parallel (TestNG)
and preventing clusters intended to be separate from joining each other.
- Author:
- Bela Ban
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns the next available multicast address, e.g.static shortgetNextMulticastPort(InetAddress bind_addr) getNextTcpPorts(InetAddress bind_addr, int num_requested_ports) static Stringstatic StringgetUniqueClusterName(String base_name) static void
-
Method Details
-
getNextMulticastAddress
Returns the next available multicast address, e.g. "228.1.2.3". This class is a JVM singleton- Returns:
-
getNextMulticastPort
- Throws:
Exception
-
getNextTcpPorts
public static List<Short> getNextTcpPorts(InetAddress bind_addr, int num_requested_ports) throws Exception - Throws:
Exception
-
getUniqueClusterName
-
getUniqueClusterName
-
main
- Throws:
Exception
-