public class TcpDiscoveryVmIpFinder extends TcpDiscoveryIpFinderAdapter
setAddresses(Collection) method. By default, this IP finder is
not shared, which means that all grid nodes have to be configured with the
same list of IP addresses when this IP finder is used.
setAddresses(Collection))TcpDiscoveryIpFinderAdapter.setShared(boolean))ignite| Constructor and Description |
|---|
TcpDiscoveryVmIpFinder()
Constructs new IP finder.
|
TcpDiscoveryVmIpFinder(boolean shared)
Constructs new IP finder.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<InetSocketAddress> |
getRegisteredAddresses()
Gets all addresses registered in this finder.
|
void |
registerAddresses(Collection<InetSocketAddress> addrs)
Registers new addresses.
|
void |
setAddresses(Collection<String> addrs)
Parses provided values and initializes the internal collection of addresses.
|
String |
toString() |
void |
unregisterAddresses(Collection<InetSocketAddress> addrs)
Unregisters provided addresses.
|
close, discoveryClientMode, initializeLocalAddresses, isShared, onSpiContextDestroyed, onSpiContextInitialized, setShared, spiContextpublic TcpDiscoveryVmIpFinder()
public TcpDiscoveryVmIpFinder(boolean shared)
shared - true if IP finder is shared.TcpDiscoveryIpFinderAdapter.setShared(boolean)@IgniteSpiConfiguration(optional=true) public void setAddresses(Collection<String> addrs) throws IgniteSpiException
Addresses may be represented as follows:
If port is 0 or not provided then default port will be used (depends on discovery SPI configuration).
If port range is provided (e.g. host:port1..port2) the following should be considered:
port1 < port2 should be true;port1 and port2 should be greater than 0.addrs - Known nodes addresses.IgniteSpiException - If any error occurs.public Collection<InetSocketAddress> getRegisteredAddresses()
null.public void registerAddresses(Collection<InetSocketAddress> addrs)
Implementation should accept duplicates quietly, but should not register address if it is already registered.
addrs - Addresses to register. Not null and not empty.public void unregisterAddresses(Collection<InetSocketAddress> addrs)
Implementation should accept addresses that are currently not registered quietly (just no-op).
addrs - Addresses to unregister. Not null and not empty.public String toString()
toString in class TcpDiscoveryIpFinderAdapter
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.11 Release Date : April 8 2016