Class TcpCommunicationConfiguration
- java.lang.Object
-
- org.apache.ignite.spi.communication.tcp.internal.TcpCommunicationConfiguration
-
- All Implemented Interfaces:
Serializable
public class TcpCommunicationConfiguration extends Object implements Serializable
Class of configuration forTcpCommunicationSpisegregation.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static longDFLT_SELECTOR_SPINSstatic StringIGNITE_SELECTOR_SPINS
-
Constructor Summary
Constructors Constructor Description TcpCommunicationConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intackSendThreshold()voidackSendThreshold(int ackSndThreshold)AddressResolveraddrRslvr()Address resolver.voidaddrRslvr(AddressResolver rslvr)intboundTcpPort()voidboundTcpPort(int boundTcpPort)intboundTcpShmemPort()Deprecated.This property is deprecated and will be removed in future releases.voidboundTcpShmemPort(int boundTcpShmemPort)Deprecated.Setter is ignored.ConnectionRequestorconnectionRequestor()voidconnectionRequestor(ConnectionRequestor requestor)intconnectionsPerNode()voidconnectionsPerNode(int connectionsPerNode)longconnectionTimeout()voidconnectionTimeout(long connTimeout)booleandirectBuffer()voiddirectBuffer(boolean directBuf)booleandirectSendBuffer()voiddirectSendBuffer(boolean directSndBuf)longfailureDetectionTimeout()Returns failure detection timeout used byTcpDiscoverySpiandTcpCommunicationSpi.voidfailureDetectionTimeout(long failureDetectionTimeout)booleanfailureDetectionTimeoutEnabled()voidfailureDetectionTimeoutEnabled(boolean failureDetectionTimeoutEnabled)booleanfilterReachableAddresses()voidfilterReachableAddresses(boolean filterReachableAddrs)booleanforceClientToSrvConnections()voidforceClientToSrvConnections(boolean forceClientToSrvConnections)Applicable for clients only.longidleConnectionTimeout()voididleConnectionTimeout(long idleConnTimeout)StringlocalAddress()voidlocalAddress(String locAddr)InetAddresslocalHost()voidlocalHost(InetAddress locHost)intlocalPort()voidlocalPort(int locPort)intlocalPortRange()voidlocalPortRange(int locPortRange)longmaxConnectionTimeout()voidmaxConnectionTimeout(long maxConnTimeout)intmessageQueueLimit()voidmessageQueueLimit(int msgQueueLimit)intreconCount()voidreconCount(int reconCnt)intselectorsCount()voidselectorsCount(int selectorsCnt)longselectorSpins()voidselectorSpins(long selectorSpins)intshmemPort()Deprecated.This property is ignored and will be removed in future releases.voidshmemPort(int shmemPort)Deprecated.This property is ignored and will be removed in future releases.intslowClientQueueLimit()voidslowClientQueueLimit(int slowClientQueueLimit)intsocketReceiveBuffer()voidsocketReceiveBuffer(int sockRcvBuf)intsocketSendBuffer()voidsocketSendBuffer(int sockSndBuf)longsocketWriteTimeout()voidsocketWriteTimeout(long sockWriteTimeout)booleantcpNoDelay()voidtcpNoDelay(boolean tcpNoDelay)intunackedMsgsBufferSize()voidunackedMsgsBufferSize(int unackedMsgsBufSize)booleanusePairedConnections()voidusePairedConnections(boolean usePairedConnections)
-
-
-
Field Detail
-
DFLT_SELECTOR_SPINS
public static final long DFLT_SELECTOR_SPINS
- See Also:
IGNITE_SELECTOR_SPINS, Constant Field Values
-
IGNITE_SELECTOR_SPINS
@SystemProperty(value="Defines how many non-blocking selector.selectNow() should be made before falling into selector.select(long) in NIO server. Can be set to Long.MAX_VALUE so selector threads will never block", type=java.lang.Long.class, defaults="0") public static final String IGNITE_SELECTOR_SPINS
- See Also:
- Constant Field Values
-
-
Method Detail
-
addrRslvr
public AddressResolver addrRslvr()
Address resolver.
-
addrRslvr
public void addrRslvr(AddressResolver rslvr)
- Parameters:
rslvr- Resolver.
-
localAddress
public String localAddress()
- Returns:
- Local IP address.
-
localAddress
public void localAddress(String locAddr)
- Parameters:
locAddr- New local IP address.
-
localPort
public int localPort()
- Returns:
- Local port which node uses.
-
localPort
public void localPort(int locPort)
- Parameters:
locPort- New local port which node uses.
-
localPortRange
public int localPortRange()
- Returns:
- Local port range.
-
localPortRange
public void localPortRange(int locPortRange)
- Parameters:
locPortRange- New local port range.
-
shmemPort
@Deprecated public int shmemPort()
Deprecated.This property is ignored and will be removed in future releases.
-
shmemPort
@Deprecated public void shmemPort(int shmemPort)
Deprecated.This property is ignored and will be removed in future releases.
-
directBuffer
public boolean directBuffer()
- Returns:
- Allocate direct buffer or heap buffer.
-
directBuffer
public void directBuffer(boolean directBuf)
- Parameters:
directBuf- New allocate direct buffer or heap buffer.
-
directSendBuffer
public boolean directSendBuffer()
- Returns:
- Allocate direct buffer or heap buffer.
-
directSendBuffer
public void directSendBuffer(boolean directSndBuf)
- Parameters:
directSndBuf- New allocate direct buffer or heap buffer.
-
idleConnectionTimeout
public long idleConnectionTimeout()
- Returns:
- Idle connection timeout.
-
idleConnectionTimeout
public void idleConnectionTimeout(long idleConnTimeout)
- Parameters:
idleConnTimeout- New idle connection timeout.
-
connectionTimeout
public long connectionTimeout()
- Returns:
- Connect timeout.
-
connectionTimeout
public void connectionTimeout(long connTimeout)
- Parameters:
connTimeout- New connect timeout.
-
maxConnectionTimeout
public long maxConnectionTimeout()
- Returns:
- Maximum connect timeout.
-
maxConnectionTimeout
public void maxConnectionTimeout(long maxConnTimeout)
- Parameters:
maxConnTimeout- New maximum connect timeout.
-
reconCount
public int reconCount()
- Returns:
- Reconnect attempts count.
-
reconCount
public void reconCount(int reconCnt)
- Parameters:
reconCnt- New reconnect attempts count.
-
socketSendBuffer
public int socketSendBuffer()
- Returns:
- Socket send buffer.
-
socketSendBuffer
public void socketSendBuffer(int sockSndBuf)
- Parameters:
sockSndBuf- New socket send buffer.
-
socketReceiveBuffer
public int socketReceiveBuffer()
- Returns:
- Socket receive buffer.
-
socketReceiveBuffer
public void socketReceiveBuffer(int sockRcvBuf)
- Parameters:
sockRcvBuf- New socket receive buffer.
-
messageQueueLimit
public int messageQueueLimit()
- Returns:
- Message queue limit.
-
messageQueueLimit
public void messageQueueLimit(int msgQueueLimit)
- Parameters:
msgQueueLimit- New message queue limit.
-
usePairedConnections
public boolean usePairedConnections()
- Returns:
- Use paired connections.
-
usePairedConnections
public void usePairedConnections(boolean usePairedConnections)
- Parameters:
usePairedConnections- New use paired connections.
-
connectionsPerNode
public int connectionsPerNode()
- Returns:
- Connections per node.
-
connectionsPerNode
public void connectionsPerNode(int connectionsPerNode)
- Parameters:
connectionsPerNode- New connections per node.
-
tcpNoDelay
public boolean tcpNoDelay()
- Returns:
- Option value for created sockets.
-
tcpNoDelay
public void tcpNoDelay(boolean tcpNoDelay)
- Parameters:
tcpNoDelay- New option value for created sockets.
-
filterReachableAddresses
public boolean filterReachableAddresses()
- Returns:
- Option value for created sockets.
-
filterReachableAddresses
public void filterReachableAddresses(boolean filterReachableAddrs)
- Parameters:
filterReachableAddrs- New option value for created sockets.
-
ackSendThreshold
public int ackSendThreshold()
- Returns:
- Number of received messages after which acknowledgment is sent.
-
ackSendThreshold
public void ackSendThreshold(int ackSndThreshold)
- Parameters:
ackSndThreshold- New number of received messages after which acknowledgment is sent.
-
unackedMsgsBufferSize
public int unackedMsgsBufferSize()
- Returns:
- Maximum number of unacknowledged messages.
-
unackedMsgsBufferSize
public void unackedMsgsBufferSize(int unackedMsgsBufSize)
- Parameters:
unackedMsgsBufSize- New maximum number of unacknowledged messages.
-
socketWriteTimeout
public long socketWriteTimeout()
- Returns:
- Socket write timeout.
-
socketWriteTimeout
public void socketWriteTimeout(long sockWriteTimeout)
- Parameters:
sockWriteTimeout- New socket write timeout.
-
boundTcpPort
public int boundTcpPort()
- Returns:
- Bound port.
-
boundTcpPort
public void boundTcpPort(int boundTcpPort)
- Parameters:
boundTcpPort- New bound port.
-
boundTcpShmemPort
@Deprecated public int boundTcpShmemPort()
Deprecated.This property is deprecated and will be removed in future releases.
-
boundTcpShmemPort
public void boundTcpShmemPort(int boundTcpShmemPort)
Deprecated.Setter is ignored.
-
selectorsCount
public int selectorsCount()
- Returns:
- Count of selectors to use in TCP server.
-
selectorsCount
public void selectorsCount(int selectorsCnt)
- Parameters:
selectorsCnt- New count of selectors to use in TCP server.
-
localHost
public InetAddress localHost()
- Returns:
- Complex variable that represents this node IP address.
-
localHost
public void localHost(InetAddress locHost)
- Parameters:
locHost- New complex variable that represents this node IP address.
-
selectorSpins
public long selectorSpins()
- Returns:
- Defines how many non-blocking should be made before falling into in NIO server. Long value. Default is . Can be set to so selector threads will never block.
-
selectorSpins
public void selectorSpins(long selectorSpins)
- Parameters:
selectorSpins- New defines how many non-blocking should be made before falling into in NIO server. Long value. Default is . Can be set to so selector threads will never block.
-
slowClientQueueLimit
public int slowClientQueueLimit()
- Returns:
- Slow client queue limit.
-
slowClientQueueLimit
public void slowClientQueueLimit(int slowClientQueueLimit)
- Parameters:
slowClientQueueLimit- New slow client queue limit.
-
failureDetectionTimeoutEnabled
public boolean failureDetectionTimeoutEnabled()
- Returns:
- Failure detection timeout usage switch.
-
failureDetectionTimeoutEnabled
public void failureDetectionTimeoutEnabled(boolean failureDetectionTimeoutEnabled)
- Parameters:
failureDetectionTimeoutEnabled- New failure detection timeout usage switch.
-
failureDetectionTimeout
public long failureDetectionTimeout()
Returns failure detection timeout used byTcpDiscoverySpiandTcpCommunicationSpi.Default is
IgniteConfiguration.DFLT_FAILURE_DETECTION_TIMEOUT.- Returns:
- Failure detection timeout in milliseconds.
- See Also:
IgniteConfiguration.setFailureDetectionTimeout(long)
-
failureDetectionTimeout
public void failureDetectionTimeout(long failureDetectionTimeout)
- Parameters:
failureDetectionTimeout- New failure detection timeout. Initialized with the value of .
-
forceClientToSrvConnections
public boolean forceClientToSrvConnections()
- Returns:
- Force client to server connections flag.
- See Also:
forceClientToSrvConnections(boolean)
-
forceClientToSrvConnections
public void forceClientToSrvConnections(boolean forceClientToSrvConnections)
Applicable for clients only. Sets PSI in the mode when server node cannot open TCP connection to the current node. Possile reasons for that may be specific network configurations or security rules. In this mode, when server needs the connection with client, it usesDiscoverySpiprotocol to notify client about it. After that client opens the required connection from its side.
-
connectionRequestor
public void connectionRequestor(ConnectionRequestor requestor)
-
connectionRequestor
public ConnectionRequestor connectionRequestor()
-
-