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)
)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.
|
TcpDiscoveryVmIpFinder |
setAddresses(Collection<String> addrs)
Parses provided values and initializes the internal collection of addresses.
|
TcpDiscoveryVmIpFinder |
setShared(boolean shared)
Sets shared flag.
|
String |
toString() |
void |
unregisterAddresses(Collection<InetSocketAddress> addrs)
Unregisters provided addresses.
|
close, discoveryClientMode, initializeLocalAddresses, isShared, onSpiContextDestroyed, onSpiContextInitialized, spiContext
public TcpDiscoveryVmIpFinder()
public TcpDiscoveryVmIpFinder(boolean shared)
shared
- true
if IP finder is shared.setShared(boolean)
@IgniteSpiConfiguration(optional=true) public TcpDiscoveryVmIpFinder 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.this
for chaining.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 TcpDiscoveryVmIpFinder setShared(boolean shared)
true
then it is expected that IP addresses registered
with IP finder will be seen by IP finders on all other nodes.setShared
in class TcpDiscoveryIpFinderAdapter
shared
- true
if this IP finder is shared.this
for chaining.public String toString()
toString
in class TcpDiscoveryIpFinderAdapter
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024