Interface TcpDiscoveryIpFinder

    • Method Detail

      • onSpiContextDestroyed

        void onSpiContextDestroyed()
        Callback invoked prior to stopping grid before SPI context is destroyed. Note that invoking SPI context after this callback is complete is considered illegal and may produce unknown results.
      • isShared

        boolean isShared()
        Checks whether IP finder is shared or not.

        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.

        Returns:
        true if IP finder is shared.
      • registerAddresses

        void registerAddresses​(Collection<InetSocketAddress> addrs)
                        throws IgniteSpiException
        Registers new addresses.

        Implementation should accept duplicates quietly, but should not register address if it is already registered.

        Parameters:
        addrs - Addresses to register. Not null and not empty.
        Throws:
        IgniteSpiException - In case of error.
      • unregisterAddresses

        void unregisterAddresses​(Collection<InetSocketAddress> addrs)
                          throws IgniteSpiException
        Unregisters provided addresses.

        Implementation should accept addresses that are currently not registered quietly (just no-op).

        Parameters:
        addrs - Addresses to unregister. Not null and not empty.
        Throws:
        IgniteSpiException - In case of error.
      • close

        void close()
        Closes this IP finder and releases any system resources associated with it.