Apache Ignite.NET
|
TcpCommunicationSpi is default communication SPI which uses TCP/IP protocol and Java NIO to communicate with other nodes. More...
Public Member Functions | |
TcpCommunicationSpi () | |
Initializes a new instance of the TcpCommunicationSpi class. More... | |
Public Attributes | |
const int | DefaultAckSendThreshold = 16 |
Default value of AckSendThreshold property. More... | |
const bool | DefaultDirectBuffer = true |
Default value of DirectBuffer property. More... | |
const bool | DefaultDirectSendBuffer = false |
Default value of DirectSendBuffer property. More... | |
const int | DefaultLocalPort = 47100 |
Default value of LocalPort property. More... | |
const int | DefaultLocalPortRange = 100 |
Default value of LocalPortRange property. More... | |
const int | DefaultMessageQueueLimit = 1024 |
Default value of MessageQueueLimit property. More... | |
const int | DefaultReconnectCount = 10 |
Default value of ReconnectCount property. More... | |
const int | DefaultSocketBufferSize = 32 * 1024 |
Default socket buffer size. More... | |
const bool | DefaultTcpNoDelay = true |
Default value of TcpNoDelay property. More... | |
Static Public Attributes | |
static readonly TimeSpan | DefaultConnectTimeout = TimeSpan.FromSeconds(5) |
Default value of ConnectTimeout property. More... | |
static readonly TimeSpan | DefaultIdleConnectionTimeout = TimeSpan.FromSeconds(30) |
Default value of IdleConnectionTimeout property. More... | |
static readonly TimeSpan | DefaultMaxConnectTimeout = TimeSpan.FromMinutes(10) |
Default value of MaxConnectTimeout property. More... | |
static readonly int | DefaultSelectorsCount = Math.Min(4, Environment.ProcessorCount) |
Default value of SelectorsCount property. More... | |
Properties | |
int | AckSendThreshold [get, set] |
Gets or sets the number of received messages per connection to node after which acknowledgment message is sent. More... | |
TimeSpan | ConnectTimeout [get, set] |
Gets or sets the connect timeout used when establishing connection with remote nodes. More... | |
bool | DirectBuffer [get, set] |
Gets or sets a value indicating whether to allocate direct (ByteBuffer.allocateDirect) or heap (ByteBuffer.allocate) buffer. More... | |
bool | DirectSendBuffer [get, set] |
Gets or sets a value indicating whether to allocate direct (ByteBuffer.allocateDirect) or heap (ByteBuffer.allocate) send buffer. More... | |
TimeSpan | IdleConnectionTimeout [get, set] |
Sets maximum idle connection timeout upon which a connection to client will be closed. More... | |
string | LocalAddress [get, set] |
Gets or sets the local host address for socket binding. Note that one node could have additional addresses beside the loopback one. This configuration parameter is optional. More... | |
int | LocalPort [get, set] |
Gets or sets the local port for socket binding. More... | |
int | LocalPortRange [get, set] |
Gets or sets local port range for local host ports (value must greater than or equal to 0 ). If provided local port LocalPort is occupied, implementation will try to increment the port number for as long as it is less than initial value plus this range. More... | |
TimeSpan | MaxConnectTimeout [get, set] |
Gets or sets maximum connect timeout. If handshake is not established within connect timeout, then SPI tries to repeat handshake procedure with increased connect timeout. Connect timeout can grow till maximum timeout value, if maximum timeout value is reached then the handshake is considered as failed. More... | |
int | MessageQueueLimit [get, set] |
Gets or sets the message queue limit for incoming and outgoing messages. More... | |
int | ReconnectCount [get, set] |
Gets or sets the maximum number of reconnect attempts used when establishing connection with remote nodes. More... | |
int | SelectorsCount [get, set] |
Gets or sets the count of selectors te be used in TCP server. More... | |
int | SlowClientQueueLimit [get, set] |
Gets or sets slow client queue limit. When set to a positive number, communication SPI will monitor clients outbound message queue sizes and will drop those clients whose queue exceeded this limit. Usually this value should be set to the same value as MessageQueueLimit which controls message back-pressure for server nodes. The default value for this parameter is 0 which means unlimited. More... | |
int | SocketReceiveBufferSize [get, set] |
Gets or sets the size of the socket receive buffer. More... | |
int | SocketSendBufferSize [get, set] |
Gets or sets the size of the socket send buffer. More... | |
bool | TcpNoDelay [get, set] |
Gets or sets the value for TCP_NODELAY socket option. Each socket will be opened using provided value. More... | |
int | UnacknowledgedMessagesBufferSize [get, set] |
Gets or sets the maximum number of stored unacknowledged messages per connection to node. If number of unacknowledged messages exceeds this number then connection to node is closed and reconnect is attempted. More... | |
At startup, this SPI tries to start listening to local port specified by LocalPort property. If local port is occupied, then SPI will automatically increment the port number until it can successfully bind for listening. LocalPortRange configuration parameter controls maximum number of ports that SPI will try before it fails. Port range comes very handy when starting multiple grid nodes on the same machine or even in the same VM. In this case all nodes can be brought up without a single change in configuration.
Apache.Ignite.Core.Communication.Tcp.TcpCommunicationSpi.TcpCommunicationSpi | ( | ) |
const int Apache.Ignite.Core.Communication.Tcp.TcpCommunicationSpi.DefaultAckSendThreshold = 16 |
|
static |
const bool Apache.Ignite.Core.Communication.Tcp.TcpCommunicationSpi.DefaultDirectBuffer = true |
const bool Apache.Ignite.Core.Communication.Tcp.TcpCommunicationSpi.DefaultDirectSendBuffer = false |
|
static |
const int Apache.Ignite.Core.Communication.Tcp.TcpCommunicationSpi.DefaultLocalPort = 47100 |
const int Apache.Ignite.Core.Communication.Tcp.TcpCommunicationSpi.DefaultLocalPortRange = 100 |
|
static |
const int Apache.Ignite.Core.Communication.Tcp.TcpCommunicationSpi.DefaultMessageQueueLimit = 1024 |
const int Apache.Ignite.Core.Communication.Tcp.TcpCommunicationSpi.DefaultReconnectCount = 10 |
|
static |
const int Apache.Ignite.Core.Communication.Tcp.TcpCommunicationSpi.DefaultSocketBufferSize = 32 * 1024 |
const bool Apache.Ignite.Core.Communication.Tcp.TcpCommunicationSpi.DefaultTcpNoDelay = true |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
If port range value is 0
, then implementation will try bind only to the port provided by LocalPort method and fail if binding to this port did not succeed.
|
getset |
0
is interpreted as infinite timeout.
|
getset |
When set to positive number send queue is limited to the configured value. 0
disables the limitation.
|
getset |
|
getset |
Default value is DefaultSelectorsCount, which is calculated as Math.Min(4, Environment.ProcessorCount)
|
getset |
|
getset |
|
getset |
|
getset |
Setting this option to true
disables Nagle's algorithm for socket decreasing latency and delivery time for small messages.
For systems that work under heavy network load it is advisable to set this value to false
.
|
getset |