public class TcpDiscoverySharedFsIpFinder extends TcpDiscoveryIpFinderAdapter
setPath(String))TcpDiscoveryIpFinderAdapter.setShared(boolean))
If getPath() is not provided, then DFLT_PATH will be used and
only local nodes will discover each other. To enable discovery over network
you must provide a path to a shared directory explicitly.
The directory will contain empty files named like the following 192.168.1.136#1001.
Note that this finder is shared by default (see TcpDiscoveryIpFinder.isShared().
| Modifier and Type | Field and Description |
|---|---|
static String |
DELIM
Delimiter to use between address and port tokens in file names.
|
static String |
DFLT_PATH
Default path for discovering of local nodes (testing only).
|
ignite| Constructor and Description |
|---|
TcpDiscoverySharedFsIpFinder()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getPath()
Gets path.
|
Collection<InetSocketAddress> |
getRegisteredAddresses()
Gets all addresses registered in this finder.
|
void |
registerAddresses(Collection<InetSocketAddress> addrs)
Registers new addresses.
|
void |
setPath(String path)
Sets path.
|
String |
toString() |
void |
unregisterAddresses(Collection<InetSocketAddress> addrs)
Unregisters provided addresses.
|
close, discoveryClientMode, initializeLocalAddresses, isShared, onSpiContextDestroyed, onSpiContextInitialized, setShared, spiContextpublic static final String DFLT_PATH
IGNITE_HOME/work folder if IGNITE_HOME system or environment variable specified,
otherwise it is relative to work folder under system java.io.tmpdir folder.public static final String DELIM
public String getPath()
@IgniteSpiConfiguration(optional=true) public void setPath(String path)
path - Shared path.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.public String toString()
toString in class TcpDiscoveryIpFinderAdapter
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.11 Release Date : April 8 2016