Class IgniteClientConfiguration
Ignite thin client configuration.
Ignite thin client connects to a specific Ignite node with a socket and does not start JVM in process. This configuration should correspond to ClientConnectorConfiguration on a target node.
Inheritance
Namespace: Apache.Ignite.Core.Client
Assembly: Apache.Ignite.Core.dll
Syntax
public class IgniteClientConfiguration : object
Constructors
IgniteClientConfiguration()
Initializes a new instance of the IgniteClientConfiguration class.
Declaration
public IgniteClientConfiguration()
IgniteClientConfiguration(IgniteClientConfiguration)
Initializes a new instance of the IgniteClientConfiguration class.
Declaration
public IgniteClientConfiguration(IgniteClientConfiguration cfg)
Parameters
Type | Name | Description |
---|---|---|
IgniteClientConfiguration | cfg | The configuration to copy. |
IgniteClientConfiguration(String)
Initializes a new instance of the IgniteClientConfiguration class.
Declaration
public IgniteClientConfiguration(string host)
Parameters
Type | Name | Description |
---|---|---|
System.String | host | The host to connect to. |
Fields
DefaultEnableClusterDiscovery
Default value of EnableClusterDiscovery property.
Declaration
public const bool DefaultEnableClusterDiscovery = null
Field Value
Type | Description |
---|---|
System.Boolean |
DefaultEnablePartitionAwareness
Default value of EnablePartitionAwareness property.
Declaration
public const bool DefaultEnablePartitionAwareness = null
Field Value
Type | Description |
---|---|
System.Boolean |
DefaultHeartbeatInterval
Default value for HeartbeatInterval.
Declaration
public static readonly TimeSpan DefaultHeartbeatInterval
Field Value
Type | Description |
---|---|
TimeSpan |
DefaultPort
Default port.
Declaration
public const int DefaultPort = null
Field Value
Type | Description |
---|---|
System.Int32 |
DefaultSocketBufferSize
Default socket buffer size.
Declaration
public const int DefaultSocketBufferSize = null
Field Value
Type | Description |
---|---|
System.Int32 |
DefaultSocketTimeout
Default socket timeout.
Declaration
public static readonly TimeSpan DefaultSocketTimeout
Field Value
Type | Description |
---|---|
TimeSpan |
DefaultTcpNoDelay
Default value of TcpNoDelay property.
Declaration
public const bool DefaultTcpNoDelay = null
Field Value
Type | Description |
---|---|
System.Boolean |
Properties
BinaryConfiguration
Gets or sets the binary configuration.
Declaration
public BinaryConfiguration BinaryConfiguration { get; set; }
Property Value
Type | Description |
---|---|
BinaryConfiguration |
EnableClusterDiscovery
Gets or sets a value indicating whether Cluster Discovery should be enabled.
Default is true: Ignite will maintain an actual list of all server nodes in the cluster and connect to them when necessary. When EnablePartitionAwareness is false, this list of nodes will be used for failover. When EnablePartitionAwareness is true, connections will be established to all known nodes.
When false: Ignite client will connect only to nodes in the Endpoints list.
Declaration
public bool EnableClusterDiscovery { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
EnableHeartbeats
Gets or sets a value indicating whether heartbeats are enabled.
When thin client connection is idle (no operations are performed), heartbeat messages are sent periodically to keep the connection alive and detect potential half-open state.
See also HeartbeatInterval.
Declaration
public bool EnableHeartbeats { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
EnablePartitionAwareness
Gets or sets a value indicating whether Partition Awareness should be enabled.
Default is true: for cache operations, Ignite client attempts to send the request directly to the primary node for the given cache key. To do so, connection is established to every known server node at all times.
When false: only one connection is established at a given moment to a random server node.
See also EnableClusterDiscovery.
Declaration
public bool EnablePartitionAwareness { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Endpoints
Gets or sets endpoints to connect to. Examples of supported formats:
- 192.168.1.25 (default port is used, see DefaultPort).
- 192.168.1.25:780 (custom port)
- 192.168.1.25:780..787 (custom port range)
- my-host.com (default port is used, see DefaultPort).
- my-host.com:780 (custom port)
- my-host.com:780..787 (custom port range)
When multiple endpoints are specified, failover and load-balancing mechanism is enabled:
- Ignite picks random endpoint and connects to it.
- On disconnect, next endpoint is picked from the list (.
Declaration
public ICollection<string> Endpoints { get; set; }
Property Value
Type | Description |
---|---|
ICollection<System.String> |
HeartbeatInterval
Sets the heartbeat message interval.
Default is DefaultHeartbeatInterval.
When server-side IdleTimeout is not zero, effective heartbeat
interval is set to Min(HeartbeatInterval, IdleTimeout / 3)
.
When thin client connection is idle (no operations are performed), heartbeat messages are sent periodically to keep the connection alive and detect potential half-open state.
Declaration
public TimeSpan HeartbeatInterval { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Host
Gets or sets the host. Should not be null.
Declaration
public string Host { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Logger
Gets or sets the logger.
Default is ConsoleLogger. Set to null
to disable logging.
Declaration
public ILogger Logger { get; set; }
Property Value
Type | Description |
---|---|
ILogger |
Password
Password to be used to connect to secured cluster.
Declaration
public string Password { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Port
Gets or sets the port.
Declaration
public int Port { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
ReconnectDisabled
Gets or sets a value indicating whether automatic reconnect is disabled.
Declaration
public bool ReconnectDisabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
RetryLimit
Gets or sets the retry limit. When a request fails due to a connection error,
Ignite will retry the request if the specified RetryPolicy allows it. When this property is
greater than 0
, Ignite will limit the number of retries.
Default is 0
: no limit on retries.
Declaration
public int RetryLimit { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
RetryPolicy
Gets or sets the retry policy. When a request fails due to a connection error, Ignite will retry the request if the specified policy allows it.
Default is null: operations won't be retried.
See also ClientRetryAllPolicy, ClientRetryReadPolicy, RetryLimit.
Declaration
public IClientRetryPolicy RetryPolicy { get; set; }
Property Value
Type | Description |
---|---|
IClientRetryPolicy |
SocketReceiveBufferSize
Gets or sets the size of the socket receive buffer. When set to 0, operating system default is used.
Declaration
public int SocketReceiveBufferSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
SocketSendBufferSize
Gets or sets the size of the socket send buffer. When set to 0, operating system default is used.
Declaration
public int SocketSendBufferSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
SocketTimeout
Gets or sets the socket operation timeout. Zero or negative means infinite timeout.
Declaration
public TimeSpan SocketTimeout { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
SslStreamFactory
Gets or sets the SSL stream factory.
When not null, secure socket connection will be established.
Declaration
public ISslStreamFactory SslStreamFactory { get; set; }
Property Value
Type | Description |
---|---|
ISslStreamFactory |
TcpNoDelay
Gets or sets the value for TCP_NODELAY
socket option. Each
socket will be opened using provided value.
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
.
Declaration
public bool TcpNoDelay { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TransactionConfiguration
Gets or sets the transaction configuration. See ITransactionsClient, GetTransactions().
Declaration
public TransactionClientConfiguration TransactionConfiguration { get; set; }
Property Value
Type | Description |
---|---|
TransactionClientConfiguration |
UserName
Username to be used to connect to secured cluster.
Declaration
public string UserName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
FromXml(String)
Deserializes IgniteClientConfiguration from the XML string.
Declaration
public static IgniteClientConfiguration FromXml(string xml)
Parameters
Type | Name | Description |
---|---|---|
System.String | xml | Xml string. |
Returns
Type | Description |
---|---|
IgniteClientConfiguration | Deserialized instance. |
FromXml(XmlReader)
Deserializes IgniteClientConfiguration from the XML reader.
Declaration
public static IgniteClientConfiguration FromXml(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
XmlReader | reader | The reader. |
Returns
Type | Description |
---|---|
IgniteClientConfiguration | Deserialized instance. |
ToXml()
Serializes this instance to an XML string.
Declaration
public string ToXml()
Returns
Type | Description |
---|---|
System.String |
ToXml(XmlWriter, String)
Serializes this instance to the specified XML writer.
Declaration
public void ToXml(XmlWriter writer, string rootElementName)
Parameters
Type | Name | Description |
---|---|---|
XmlWriter | writer | The writer. |
System.String | rootElementName | Name of the root element. |