public interface TcpDiscoveryIpFinder
TcpDiscoverySpi
.Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this IP finder and releases any system resources associated with it.
|
Collection<InetSocketAddress> |
getRegisteredAddresses()
Gets all addresses registered in this finder.
|
void |
initializeLocalAddresses(Collection<InetSocketAddress> addrs)
Initializes addresses discovery SPI binds to.
|
boolean |
isShared()
Checks whether IP finder is shared or not.
|
void |
onSpiContextDestroyed()
Callback invoked prior to stopping grid before SPI context is destroyed.
|
void |
onSpiContextInitialized(IgniteSpiContext spiCtx)
Callback invoked when SPI context is initialized after
TcpDiscoverySpi.spiStart(String)
method is completed, SPI context can be stored for future access. |
void |
registerAddresses(Collection<InetSocketAddress> addrs)
Registers new addresses.
|
void |
unregisterAddresses(Collection<InetSocketAddress> addrs)
Unregisters provided addresses.
|
void onSpiContextInitialized(IgniteSpiContext spiCtx) throws IgniteSpiException
TcpDiscoverySpi.spiStart(String)
method is completed, SPI context can be stored for future access.spiCtx
- Spi context.IgniteSpiException
- In case of error.void onSpiContextDestroyed()
void initializeLocalAddresses(Collection<InetSocketAddress> addrs) throws IgniteSpiException
addrs
- Addresses discovery SPI binds to.IgniteSpiException
- In case of error.Collection<InetSocketAddress> getRegisteredAddresses() throws IgniteSpiException
null
.IgniteSpiException
- In case of error.boolean isShared()
If this property is set to true
then IP finder allows to add and remove
addresses in runtime and this is how, for example, IP finder should work in
Amazon EC2 environment or any other environment where IPs may not be known beforehand.
If this property is set to false
then IP finder is immutable and all the addresses
should be listed in configuration before Ignite start. This is the most use case for IP finders
local to current VM. Since, usually such IP finders are created per each Ignite instance and
all the known IPs are listed right away, but there is also an option to make such IP finders shared
by setting this property to true
and literally share it between local VM Ignite instances.
This way user does not have to list any IPs before start, instead all starting nodes add their addresses
to the finder, then get the registered addresses and continue with discovery procedure.
true
if IP finder is shared.void registerAddresses(Collection<InetSocketAddress> addrs) throws IgniteSpiException
Implementation should accept duplicates quietly, but should not register address if it is already registered.
addrs
- Addresses to register. Not null
and not empty.IgniteSpiException
- In case of error.void unregisterAddresses(Collection<InetSocketAddress> addrs) throws IgniteSpiException
Implementation should accept addresses that are currently not registered quietly (just no-op).
addrs
- Addresses to unregister. Not null
and not empty.IgniteSpiException
- In case of error.void close()
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024