public class TcpDiscoveryJdbcIpFinder extends TcpDiscoveryIpFinderAdapter
setDataSource(DataSource)
).setInitSchema(boolean)
)The database will contain 1 table which will hold IP addresses.
ignite
Constructor and Description |
---|
TcpDiscoveryJdbcIpFinder()
Constructor.
|
TcpDiscoveryJdbcIpFinder(JdbcIpFinderDialect jdbcDialect) |
Modifier and Type | Method and Description |
---|---|
Collection<InetSocketAddress> |
getRegisteredAddresses()
Gets all addresses registered in this finder.
|
void |
registerAddresses(Collection<InetSocketAddress> addrs)
Registers new addresses.
|
TcpDiscoveryJdbcIpFinder |
setDataSource(DataSource dataSrc)
Sets data source.
|
TcpDiscoveryJdbcIpFinder |
setInitSchema(boolean initSchema)
Flag indicating whether DB schema should be initialized by Ignite (default behaviour) or
was explicitly created by user.
|
TcpDiscoveryJdbcIpFinder |
setShared(boolean shared)
Sets shared flag.
|
String |
toString() |
void |
unregisterAddresses(Collection<InetSocketAddress> addrs)
Unregisters provided addresses.
|
close, discoveryClientMode, initializeLocalAddresses, isShared, onSpiContextDestroyed, onSpiContextInitialized, spiContext
public TcpDiscoveryJdbcIpFinder()
public TcpDiscoveryJdbcIpFinder(JdbcIpFinderDialect jdbcDialect)
jdbcDialect
- SQL dialect to use with TcpDiscoveryJdbcIpFinder
.public Collection<InetSocketAddress> getRegisteredAddresses() throws IgniteSpiException
null
.IgniteSpiException
- In case of error.public 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.public 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.@IgniteSpiConfiguration(optional=false) public TcpDiscoveryJdbcIpFinder setDataSource(DataSource dataSrc)
Data source should be fully configured and ready-to-use.
dataSrc
- Data source.this
for chaining.@IgniteSpiConfiguration(optional=true) public TcpDiscoveryJdbcIpFinder setInitSchema(boolean initSchema)
initSchema
- True
if DB schema should be initialized by Ignite (default behaviour),
{code @false} if schema was explicitly created by user.this
for chaining.public TcpDiscoveryJdbcIpFinder setShared(boolean shared)
true
then it is expected that IP addresses registered
with IP finder will be seen by IP finders on all other nodes.setShared
in class TcpDiscoveryIpFinderAdapter
shared
- true
if this IP finder is shared.this
for chaining.public String toString()
toString
in class TcpDiscoveryIpFinderAdapter
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.16.0 Release Date : December 15 2023