Class TcpDiscoverySharedFsIpFinder
- java.lang.Object
- 
- org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinderAdapter
- 
- org.apache.ignite.spi.discovery.tcp.ipfinder.sharedfs.TcpDiscoverySharedFsIpFinder
 
 
- 
- All Implemented Interfaces:
- TcpDiscoveryIpFinder
 
 public class TcpDiscoverySharedFsIpFinder extends TcpDiscoveryIpFinderAdapter Shared filesystem-based IP finder.ConfigurationMandatoryThere are no mandatory configuration parameters.Optional- Path (see setPath(String))
- Shared flag (see setShared(boolean))
 If getPath()is not provided, thenDFLT_PATHwill 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().
- 
- 
Field SummaryFields Modifier and Type Field Description static StringDELIMDelimiter to use between address and port tokens in file names.static StringDFLT_PATHDefault path for discovering of local nodes (testing only).- 
Fields inherited from class org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinderAdapterignite
 
- 
 - 
Constructor SummaryConstructors Constructor Description TcpDiscoverySharedFsIpFinder()Constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetPath()Gets path.Collection<InetSocketAddress>getRegisteredAddresses()Gets all addresses registered in this finder.voidregisterAddresses(Collection<InetSocketAddress> addrs)Registers new addresses.TcpDiscoverySharedFsIpFindersetPath(String path)Sets path.TcpDiscoverySharedFsIpFindersetShared(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
 
- 
 
- 
- 
- 
Field Detail- 
DFLT_PATHpublic static final String DFLT_PATH Default path for discovering of local nodes (testing only). Note that this path is relative toIGNITE_HOME/workfolder ifIGNITE_HOMEsystem or environment variable specified, otherwise it is relative toworkfolder under systemjava.io.tmpdirfolder.
 - 
DELIMpublic static final String DELIM Delimiter to use between address and port tokens in file names.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getPathpublic String getPath() Gets path.- Returns:
- Shared path.
 
 - 
setPath@IgniteSpiConfiguration(optional=true) public TcpDiscoverySharedFsIpFinder setPath(String path) Sets path.- Parameters:
- path- Shared path.
- Returns:
- thisfor chaining.
 
 - 
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.
 
 - 
setSharedpublic TcpDiscoverySharedFsIpFinder 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
 
 
- 
 
-