Class TcpDiscoveryJdbcIpFinder
- java.lang.Object
- 
- org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinderAdapter
- 
- org.apache.ignite.spi.discovery.tcp.ipfinder.jdbc.TcpDiscoveryJdbcIpFinder
 
 
- 
- All Implemented Interfaces:
- TcpDiscoveryIpFinder
 
 public class TcpDiscoveryJdbcIpFinder extends TcpDiscoveryIpFinderAdapter JDBC-based IP finder.ConfigurationMandatory- Data source (see setDataSource(DataSource)).
 OptionalThe 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. 
- 
- 
Field Summary- 
Fields inherited from class org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinderAdapterignite
 
- 
 - 
Constructor SummaryConstructors Constructor Description TcpDiscoveryJdbcIpFinder()Constructor.TcpDiscoveryJdbcIpFinder(JdbcIpFinderDialect jdbcDialect)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<InetSocketAddress>getRegisteredAddresses()Gets all addresses registered in this finder.voidregisterAddresses(Collection<InetSocketAddress> addrs)Registers new addresses.TcpDiscoveryJdbcIpFindersetDataSource(DataSource dataSrc)Sets data source.TcpDiscoveryJdbcIpFindersetInitSchema(boolean initSchema)Flag indicating whether DB schema should be initialized by Ignite (default behaviour) or was explicitly created by user.TcpDiscoveryJdbcIpFindersetShared(boolean shared)Sets shared flag.StringtoString()voidunregisterAddresses(Collection<InetSocketAddress> addrs)Unregisters provided addresses.- 
Methods inherited from class org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinderAdapterclose, discoveryClientMode, initializeLocalAddresses, isShared, onSpiContextDestroyed, onSpiContextInitialized, spiContext
 
- 
 
- 
- 
- 
Constructor Detail- 
TcpDiscoveryJdbcIpFinderpublic TcpDiscoveryJdbcIpFinder() Constructor.
 - 
TcpDiscoveryJdbcIpFinderpublic TcpDiscoveryJdbcIpFinder(JdbcIpFinderDialect jdbcDialect) - Parameters:
- jdbcDialect- SQL dialect to use with- TcpDiscoveryJdbcIpFinder.
 
 
- 
 - 
Method Detail- 
getRegisteredAddressespublic Collection<InetSocketAddress> getRegisteredAddresses() throws IgniteSpiException Gets all addresses registered in this finder.- Returns:
- All known addresses, potentially empty, but never null.
- Throws:
- IgniteSpiException- In case of error.
 
 - 
registerAddressespublic 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- nulland not empty.
- Throws:
- IgniteSpiException- In case of error.
 
 - 
unregisterAddressespublic 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- nulland not empty.
- Throws:
- IgniteSpiException- In case of error.
 
 - 
setDataSource@IgniteSpiConfiguration(optional=false) public TcpDiscoveryJdbcIpFinder setDataSource(DataSource dataSrc) Sets data source.Data source should be fully configured and ready-to-use. - Parameters:
- dataSrc- Data source.
- Returns:
- thisfor chaining.
 
 - 
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-- Trueif DB schema should be initialized by Ignite (default behaviour), {code @false} if schema was explicitly created by user.
- Returns:
- thisfor chaining.
 
 - 
setSharedpublic TcpDiscoveryJdbcIpFinder setShared(boolean shared) Sets shared flag. Iftruethen it is expected that IP addresses registered with IP finder will be seen by IP finders on all other nodes.- Overrides:
- setSharedin class- TcpDiscoveryIpFinderAdapter
- Parameters:
- shared-- trueif this IP finder is shared.
- Returns:
- thisfor chaining.
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- TcpDiscoveryIpFinderAdapter
 
 
- 
 
-