com.sleepycat.je.rep.utilint
Class HostPortPair
java.lang.Object
com.sleepycat.je.rep.utilint.HostPortPair
public class HostPortPair
- extends Object
Encapsulates the functionality around dealing with HostPort string pairs
having the format:
host[:port]
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SEPARATOR
public static final String SEPARATOR
- See Also:
- Constant Field Values
HostPortPair
public HostPortPair()
getSocket
public static InetSocketAddress getSocket(String hostPortPair)
- Parses a hostPort pair into the socket it represents.
- Parameters:
hostPortPair
-
- Returns:
- socket address for this host pair
- Throws:
IllegalArgumentException
- via ReplicatedEnvironment and Monitor
ctors.
getSockets
public static Set<InetSocketAddress> getSockets(String hostPortPairs)
- Parses hostPort pairs into sockets it represents.
- Parameters:
hostPortPair
-
- Returns:
- a set of socket addresses for these host pairs
getString
public static String getString(String host,
int port)
Copyright (c) 2004-2010 Oracle. All rights reserved.