Class TcpDiscoveryJdbcIpFinder

  • All Implemented Interfaces:
    TcpDiscoveryIpFinder

    public class TcpDiscoveryJdbcIpFinder
    extends TcpDiscoveryIpFinderAdapter
    JDBC-based IP finder.

    Configuration

    Mandatory

    Optional

    The following configuration parameters are optional:
    • Flag indicating whether DB schema should be initialized by Ignite (default behaviour) or was explicitly created by user (see setInitSchema(boolean))

    The database will contain 1 table which will hold IP addresses.

    • Constructor Detail

      • TcpDiscoveryJdbcIpFinder

        public TcpDiscoveryJdbcIpFinder()
        Constructor.
    • Method Detail

      • registerAddresses

        public 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

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

        @IgniteSpiConfiguration(optional=true)
        public TcpDiscoveryJdbcIpFinder setInitSchema​(boolean initSchema)
        Flag indicating whether DB schema should be initialized by Ignite (default behaviour) or was explicitly created by user.
        Parameters:
        initSchema - True if DB schema should be initialized by Ignite (default behaviour), {code @false} if schema was explicitly created by user.
        Returns:
        this for chaining.
      • setShared

        public TcpDiscoveryJdbcIpFinder 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.
        Overrides:
        setShared in class TcpDiscoveryIpFinderAdapter
        Parameters:
        shared - true if this IP finder is shared.
        Returns:
        this for chaining.