Class TcpDiscoveryIpFinderAdapter

    • Constructor Detail

      • TcpDiscoveryIpFinderAdapter

        public TcpDiscoveryIpFinderAdapter()
    • Method Detail

      • onSpiContextDestroyed

        public 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.
        Specified by:
        onSpiContextDestroyed in interface TcpDiscoveryIpFinder
      • isShared

        public 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.

        Specified by:
        isShared in interface TcpDiscoveryIpFinder
        Returns:
        true if IP finder is shared.
      • setShared

        @IgniteSpiConfiguration(optional=true)
        public TcpDiscoveryIpFinderAdapter setShared​(boolean shared)
        Sets shared flag. If true then it is expected that IP addresses registered with IP finder will be seen by IP finders on all other nodes.
        Parameters:
        shared - true if this IP finder is shared.
        Returns:
        this for chaining.
      • close

        public void close()
        Closes this IP finder and releases any system resources associated with it.
        Specified by:
        close in interface TcpDiscoveryIpFinder
      • discoveryClientMode

        @Deprecated
        protected boolean discoveryClientMode()
        Deprecated.
        Since 2.8. May return incorrect value if client and server nodes shares same TcpDiscoveryIpFinder instance.
        Returns:
        True if TCP discovery works in client mode.