public class TcpSegmentationResolver extends Object implements org.apache.ignite.plugin.segmentation.SegmentationResolver
| Modifier and Type | Field and Description |
|---|---|
static int |
DFLT_CONN_TIMEOUT
Default value for local port.
|
static int |
DFLT_LOC_PORT
Default value for local port.
|
| Constructor and Description |
|---|
TcpSegmentationResolver() |
| Modifier and Type | Method and Description |
|---|---|
int |
getConnectTimeout()
Gets connect timeout.
|
boolean |
isValidSegment()
Checks whether segment is valid.
|
void |
setAddress(InetSocketAddress addr)
Sets target address to check reachability of.
|
void |
setAddressAsString(String addr)
Convenient way to set address.
|
void |
setConnectTimeout(int connTimeout)
Sets connect timeout.
|
void |
setHost(String host)
Convenient way to set address.
|
void |
setLocalAddress(InetAddress locAddr)
Sets local address.
|
void |
setLocalAddressAsString(String locAddr)
Convenient way to set local address.
|
void |
setLocalPort(int locPort)
Sets local port.
|
void |
setPort(int port)
Convenient way to set address.
|
String |
toString() |
public static final int DFLT_LOC_PORT
public static final int DFLT_CONN_TIMEOUT
public boolean isValidSegment()
throws org.apache.ignite.IgniteCheckedException
When segmentation happens every node ends up in either one of two segments:
segmentation policy set
in configuration.isValidSegment in interface org.apache.ignite.plugin.segmentation.SegmentationResolverTrue if segment is correct, false otherwise.org.apache.ignite.IgniteCheckedException - If an error occurred.public void setAddress(InetSocketAddress addr)
This is required property. Address has to be set using one of the available methods.
addr - Address to check reachability of.setAddressAsString(String),
setHost(String),
setPort(int)public void setAddressAsString(String addr) throws org.apache.ignite.IgniteCheckedException
This is required property. Address has to be set using one of the available methods.
addr - Address to check reachability of.org.apache.ignite.IgniteCheckedException - If host is unknown or failed to parse address.setAddress(InetSocketAddress),
setHost(String),
setPort(int)public void setHost(String host)
This is required property. Address has to be set using one of the available methods.
host - Host name to check reachability of.setAddress(InetSocketAddress),
setAddressAsString(String),
setPort(int)public void setPort(int port)
This is required property. Address has to be set using one of the available methods.
port - Port number on the host to check reachability of.setAddress(InetSocketAddress),
setAddressAsString(String),
setHost(String)public void setLocalAddress(InetAddress locAddr) throws org.apache.ignite.IgniteCheckedException
If not specified, check will be performed through any local address available.
locAddr - Local address.org.apache.ignite.IgniteCheckedException - If host is unknown.setLocalAddressAsString(String)public void setLocalAddressAsString(String locAddr) throws org.apache.ignite.IgniteCheckedException
If not specified, check will be performed through any local address available.
locAddr - Local address.org.apache.ignite.IgniteCheckedException - If host is unknown.setLocalAddress(InetAddress)public void setLocalPort(int locPort)
If not specified, DFLT_LOC_PORT is used.
locPort - Local port.public int getConnectTimeout()
public void setConnectTimeout(int connTimeout)
If not specified, DFLT_CONN_TIMEOUT is used.
connTimeout - Connect timeout.
GridGain Fabric : ver. 7.8.12 Release Date : October 2 2017