Skip to main content

Connection Options. More…

Static Public Attributes

const int DefaultServerConnectionTimeout = 5000
 Default value (milliseconds) for ServerConnectionTimeout.
 

Properties

string Username = string.Empty [get, set]
 Optional: User Name for Kinetica security.
 
string Password = string.Empty [get, set]
 Optional: Password for user.
 
string OauthToken = string.Empty [get, set]
 Optional: OauthToken for user.
 
bool UseSnappy = false [get, set]
 Use Snappy compression for requests.
 
int ThreadCount = 1 [get, set]
 Thread Count.
 
bool DisableFailover = false [get, set]
 Whether to disable failing over to a secondary cluster when a failure event is encountered on the current cluster that is appropriate for retrying on another cluster.
 
bool DisableAutoDiscovery = false [get, set]
 Whether to disable automatic discovery of HA clusters and worker ranks.
 
HAFailoverOrder HAFailoverOrder = HAFailoverOrder.Random [get, set]
 Order in which to failover to backup clusters.
 
int Timeout = 0 [get, set]
 Overall request timeout in milliseconds.
 
int HostManagerPort = HAFailoverManager.DefaultHostManagerPort [get, set]
 Host manager port number.
 
string? HostnameRegex = null [get, set]
 Optional: Regex pattern to filter URLs by hostname/IP.
 
string PrimaryUrl = string.Empty [get, set]
 URL of the primary cluster in the HA environment.
 
int InitialConnectionAttemptTimeout = 0 [get, set]
 Initial connection attempt timeout in milliseconds.
 
int ServerConnectionTimeout = DefaultServerConnectionTimeout [get, set]
 Maximum time, in milliseconds, to establish a TCP connection to the server.
 
TimeSpan PooledConnectionLifetime = TimeSpan.FromMinutes(2) [get, set]
 Maximum lifetime of pooled HTTP connections.
 
TimeSpan PooledConnectionIdleTimeout = TimeSpan.FromMinutes(2) [get, set]
 Idle timeout for pooled HTTP connections.
 
ILoggerFactory? LoggerFactory = null [get, set]
 Optional logger factory used by the client to report diagnostics.
 
string? ClientName = null [get, set]
 Optional client application name to include in the User-Agent HTTP header.
 
string? ClientVersion = null [get, set]
 Optional client application version to include in the User-Agent HTTP header.
 

Detailed Description

Connection Options.

Definition at line 50 of file Kinetica.cs.

Member Data Documentation

◆ DefaultServerConnectionTimeout

const int kinetica.Kinetica.Options.DefaultServerConnectionTimeout = 5000
static

Default value (milliseconds) for ServerConnectionTimeout.

Also used directly as the timeout for the Kinetica.IsKineticaRunning(Uri) liveness ping.

Definition at line 194 of file Kinetica.cs.

Property Documentation

◆ ClientName

string kinetica.Kinetica.Options.ClientName = null
getset

Optional client application name to include in the User-Agent HTTP header.

When set, this value is included in the User-Agent header sent with all HTTP requests to the Kinetica server. This helps identify the client application making requests for logging and debugging purposes.

The User-Agent header format is: Kinetica C# API/version (runtime)client_name/client_version where the client_name/client_version suffix is only included if these properties are set.

Definition at line 265 of file Kinetica.cs.

◆ ClientVersion

string kinetica.Kinetica.Options.ClientVersion = null
getset

Optional client application version to include in the User-Agent HTTP header.

When set along with ClientName, this value is included in the User-Agent header sent with all HTTP requests to the Kinetica server.

This property is only meaningful when ClientName is also set. If ClientName is null or empty, this property is ignored.

Definition at line 280 of file Kinetica.cs.

◆ DisableAutoDiscovery

bool kinetica.Kinetica.Options.DisableAutoDiscovery = false
getset

Whether to disable automatic discovery of HA clusters and worker ranks.

“Auto-discovery” encompasses two independent server-side queries the client makes during construction: HA ring topology (peer cluster URLs) and worker rank URLs (used by multi-head operations like BulkInserter<T> and RecordRetriever<T>). When this flag is true, both queries are suppressed and multi-head operations become unavailable as a consequence.

When set to false (default), the constructor will attempt to call showSystemProperties() to discover HA ring topology and worker rank URLs. This network call can block if the server is slow or unreachable.

If auto-discovery fails and InitialConnectionAttemptTimeout is 0 (default), the constructor will automatically disable auto-discovery and retry once using only the provided URLs (without discovering additional cluster information).

If auto-discovery fails and InitialConnectionAttemptTimeout is greater than 0, the constructor will retry with exponential backoff until the timeout is exceeded.

For single-node deployments or when constructor blocking is unacceptable, set this to true along with DisableFailover = true to skip all network I/O during construction.

Definition at line 130 of file Kinetica.cs.

◆ DisableFailover

bool kinetica.Kinetica.Options.DisableFailover = false
getset

Whether to disable failing over to a secondary cluster when a failure event is encountered on the current cluster that is appropriate for retrying on another cluster.

Failover operates between the cluster URLs known to the client &#8212; those the user specified plus any discovered via auto-discovery (see DisableAutoDiscovery). This flag controls whether cluster rotation happens on failure; it doesn’t prevent the initial polling of the server for other known HA clusters.

When only a single URL is available, this flag has no observable effect. When multiple URLs are available (user-specified, discovered, or both), setting this to true short-circuits cluster rotation: failed requests are retried against the same cluster but won’t be rerouted to peers.

Definition at line 97 of file Kinetica.cs.

◆ HAFailoverOrder

HAFailoverOrder kinetica.Kinetica.Options.HAFailoverOrder = HAFailoverOrder.Random
getset

Order in which to failover to backup clusters.

Definition at line 135 of file Kinetica.cs.

◆ HostManagerPort

int kinetica.Kinetica.Options.HostManagerPort = HAFailoverManager.DefaultHostManagerPort
getset

Host manager port number.

Definition at line 153 of file Kinetica.cs.

◆ HostnameRegex

string kinetica.Kinetica.Options.HostnameRegex = null
getset

Optional: Regex pattern to filter URLs by hostname/IP.

Definition at line 158 of file Kinetica.cs.

◆ InitialConnectionAttemptTimeout

int kinetica.Kinetica.Options.InitialConnectionAttemptTimeout = 0
getset

Initial connection attempt timeout in milliseconds.

Controls retry behavior when auto-discovery fails during initialization. Auto-discovery (calling showSystemProperties()) is always attempted first unless DisableAutoDiscovery is set to true.

When set to 0 (default): If auto-discovery fails, the client will disable auto-discovery and retry once using only the provided URLs without further cluster discovery. No exponential backoff is used.

When set to a positive value (e.g., 300000 for 5 minutes): If auto-discovery fails, the client will retry with exponential backoff (starting at 1 minute, doubling each time) until this timeout is exceeded. If multiple URLs are given, the API will try all of them once before sleeping and retrying. After the timeout is exceeded, the client falls back to initialization without auto-discovery.

Definition at line 187 of file Kinetica.cs.

◆ LoggerFactory

ILoggerFactory kinetica.Kinetica.Options.LoggerFactory = null
getset

Optional logger factory used by the client to report diagnostics.

When supplied, the client creates per-component category loggers (e.g. “Kinetica”, “Kinetica.HAFailover”, “Kinetica.BulkInserter”) and emits messages through the standard ILogger abstraction. This is the channel through which non-fatal conditions &#8212; such as auto-discovery failing and the connection falling back to a degraded, single-head mode &#8212; are surfaced without throwing.

When left null (default), logging is a no-op (NullLoggerFactory); no output is produced and behavior is unchanged. Pass an ILoggerFactory (e.g. obtained from dependency injection) to route messages into the host’s logging pipeline.

Definition at line 247 of file Kinetica.cs.

◆ OauthToken

string kinetica.Kinetica.Options.OauthToken = string.Empty
getset

Optional: OauthToken for user.

Definition at line 65 of file Kinetica.cs.

◆ Password

string kinetica.Kinetica.Options.Password = string.Empty
getset

Optional: Password for user.

Definition at line 60 of file Kinetica.cs.

◆ PooledConnectionIdleTimeout

TimeSpan kinetica.Kinetica.Options.PooledConnectionIdleTimeout = TimeSpan.FromMinutes(2)
getset

Idle timeout for pooled HTTP connections.

Default: 2 minutes.

Definition at line 226 of file Kinetica.cs.

◆ PooledConnectionLifetime

TimeSpan kinetica.Kinetica.Options.PooledConnectionLifetime = TimeSpan.FromMinutes(2)
getset

Maximum lifetime of pooled HTTP connections.

Lower values improve DNS refresh frequency but increase connection churn. Default: 2 minutes.

Definition at line 221 of file Kinetica.cs.

◆ PrimaryUrl

string kinetica.Kinetica.Options.PrimaryUrl = string.Empty
getset

URL of the primary cluster in the HA environment.

Definition at line 163 of file Kinetica.cs.

◆ ServerConnectionTimeout

int kinetica.Kinetica.Options.ServerConnectionTimeout = DefaultServerConnectionTimeout
getset

Maximum time, in milliseconds, to establish a TCP connection to the server.

Default: DefaultServerConnectionTimeout (5 seconds); 0 leaves connection establishment unbounded.

Maps to System.Net.Http.SocketsHttpHandler.ConnectTimeout. It bounds the connection handshake specifically — most visibly when a host is unreachable/black-holed during initial discovery — and is independent of Timeout, which caps the overall request. For an unreachable host the client gives up after whichever of the two elapses first; since Timeout defaults to infinite, this is the effective bound on how long a connection attempt to an unreachable host blocks by default.

This is distinct from InitialConnectionAttemptTimeout, which is the overall budget across discovery retries rather than a per-connection bound.

Definition at line 215 of file Kinetica.cs.

◆ ThreadCount

int kinetica.Kinetica.Options.ThreadCount = 1
getset

Thread Count.

Definition at line 75 of file Kinetica.cs.

◆ Timeout

int kinetica.Kinetica.Options.Timeout = 0
getset

Overall request timeout in milliseconds.

0 (the default) means infinite — no overall timeout, matching the Java API.

This is the end-to-end per-request cap. Connection establishment is bounded separately by ServerConnectionTimeout, so even with an infinite request timeout an unreachable host fails when the connection attempt times out rather than hanging forever; an infinite value only allows an already-connected, slow-responding server to block without limit.

Definition at line 148 of file Kinetica.cs.

◆ Username

string kinetica.Kinetica.Options.Username = string.Empty
getset

Optional: User Name for Kinetica security.

Definition at line 55 of file Kinetica.cs.

◆ UseSnappy

bool kinetica.Kinetica.Options.UseSnappy = false
getset

Use Snappy compression for requests.

Definition at line 70 of file Kinetica.cs.


The documentation for this class was generated from the following files: