public class GridTcpDiscoveryJdbcIpFinder extends GridTcpDiscoveryIpFinderAdapter
setDataSource(DataSource)).The database will contain 1 table which will hold IP addresses.
| Modifier and Type | Field and Description |
|---|---|
static String |
CHK_QRY
Query to check database validity.
|
static String |
CREATE_ADDRS_TABLE_QRY
Query to create addresses table.
|
static String |
GET_ADDRS_QRY
Query to get addresses.
|
static String |
REG_ADDR_QRY
Query to register address.
|
static String |
UNREG_ADDR_QRY
Query to unregister address.
|
| Constructor and Description |
|---|
GridTcpDiscoveryJdbcIpFinder()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<InetSocketAddress> |
getRegisteredAddresses()
Gets all addresses registered in this finder.
|
void |
registerAddresses(Collection<InetSocketAddress> addrs)
Registers new addresses.
|
void |
setDataSource(DataSource dataSrc)
Sets data source.
|
String |
toString() |
void |
unregisterAddresses(Collection<InetSocketAddress> addrs)
Unregisters provided addresses.
|
close, initializeLocalAddresses, isShared, onSpiContextDestroyed, onSpiContextInitialized, setShared, spiContextpublic static final String GET_ADDRS_QRY
public static final String REG_ADDR_QRY
public static final String UNREG_ADDR_QRY
public static final String CREATE_ADDRS_TABLE_QRY
public static final String CHK_QRY
public Collection<InetSocketAddress> getRegisteredAddresses() throws GridSpiException
null.GridSpiException - In case of error.public void registerAddresses(Collection<InetSocketAddress> addrs) throws GridSpiException
Implementation should accept duplicates quietly, but should not register address if it is already registered.
addrs - Addresses to register. Not null and not empty.GridSpiException - In case of error.public void unregisterAddresses(Collection<InetSocketAddress> addrs) throws GridSpiException
Implementation should accept addresses that are currently not registered quietly (just no-op).
addrs - Addresses to unregister. Not null and not empty.GridSpiException - In case of error.@GridSpiConfiguration(optional=false) public void setDataSource(DataSource dataSrc)
Data source should be fully configured and ready-to-use.
dataSrc - Data source.public String toString()
toString in class GridTcpDiscoveryIpFinderAdapterCopyright © 2014. All rights reserved.