public class TcpSegmentationResolver extends Object implements 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.
|
TcpSegmentationResolver |
setAddress(InetSocketAddress addr)
Sets target address to check reachability of.
|
TcpSegmentationResolver |
setAddressAsString(String addr)
Convenient way to set address.
|
TcpSegmentationResolver |
setConnectTimeout(int connTimeout)
Sets connect timeout.
|
TcpSegmentationResolver |
setHost(String host)
Convenient way to set address.
|
TcpSegmentationResolver |
setLocalAddress(InetAddress locAddr)
Sets local address.
|
TcpSegmentationResolver |
setLocalAddressAsString(String locAddr)
Convenient way to set local address.
|
TcpSegmentationResolver |
setLocalPort(int locPort)
Sets local port.
|
TcpSegmentationResolver |
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 IgniteCheckedException
When segmentation happens every node ends up in either one of two segments:
segmentation policy
set
in configuration.isValidSegment
in interface SegmentationResolver
True
if segment is correct, false
otherwise.IgniteCheckedException
- If an error occurred.public TcpSegmentationResolver setAddress(InetSocketAddress addr)
This is required property. Address has to be set using one of the available methods.
addr
- Address to check reachability of.this
for chaining.setAddressAsString(String)
,
setHost(String)
,
setPort(int)
public TcpSegmentationResolver setAddressAsString(String addr) throws IgniteCheckedException
This is required property. Address has to be set using one of the available methods.
addr
- Address to check reachability of.this
for chaining.IgniteCheckedException
- If host is unknown or failed to parse address.setAddress(InetSocketAddress)
,
setHost(String)
,
setPort(int)
public TcpSegmentationResolver 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.this
for chaining.setAddress(InetSocketAddress)
,
setAddressAsString(String)
,
setPort(int)
public TcpSegmentationResolver 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.this
for chaining.setAddress(InetSocketAddress)
,
setAddressAsString(String)
,
setHost(String)
public TcpSegmentationResolver setLocalAddress(InetAddress locAddr) throws IgniteCheckedException
If not specified, check will be performed through any local address available.
locAddr
- Local address.this
for chaining.IgniteCheckedException
- If host is unknown.setLocalAddressAsString(String)
public TcpSegmentationResolver setLocalAddressAsString(String locAddr) throws IgniteCheckedException
If not specified, check will be performed through any local address available.
locAddr
- Local address.this
for chaining.IgniteCheckedException
- If host is unknown.setLocalAddress(InetAddress)
public TcpSegmentationResolver setLocalPort(int locPort)
If not specified, DFLT_LOC_PORT
is used.
locPort
- Local port.this
for chaining.public int getConnectTimeout()
public TcpSegmentationResolver setConnectTimeout(int connTimeout)
If not specified, DFLT_CONN_TIMEOUT
is used.
connTimeout
- Connect timeout.this
for chaining.
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024