Skip to main content

Manages high availability failover for Kinetica connections. More…

Public Member Functions

 HAFailoverManager ()
 Creates a new HAFailoverManager.
 
IList< ClusterAddressInfoGetHostAddresses ()
 Gets all cluster addresses.
 
IList< Uri > GetUrls ()
 Gets the list of URLs of the active head ranks of all clusters.
 
IList< Uri > GetFailoverUrls ()
 Gets the list of URLs in failover order.
 
ClusterAddressInfoGetClusterInfo ()
 Gets the active cluster’s information.
 
Uri? GetUrl ()
 Gets the current active URL.
 
void AddCluster (ClusterAddressInfo clusterInfo)
 Adds a cluster address to the manager.
 
void Initialize (IList< Uri > urls, Kinetica? kinetica=null)
 Initializes the manager with a list of URLs.
 
Uri SwitchUrl (Uri oldUrl, int oldNumClusterSwitches, Func< Uri, bool >? isKineticaRunning=null)
 Switches to the next available cluster URL for HA failover.
 
 HAFailoverManager ()
 Creates a new HAFailoverManager.
 
IList< ClusterAddressInfoGetHostAddresses ()
 Gets all cluster addresses.
 
IList< Uri > GetUrls ()
 Gets the list of URLs of the active head ranks of all clusters.
 
IList< Uri > GetFailoverUrls ()
 Gets the list of URLs in failover order.
 
ClusterAddressInfoGetClusterInfo ()
 Gets the active cluster’s information.
 
Uri? GetUrl ()
 Gets the current active URL.
 
void AddCluster (ClusterAddressInfo clusterInfo)
 Adds a cluster address to the manager.
 
void Initialize (IList< Uri > urls, Kinetica? kinetica=null)
 Initializes the manager with a list of URLs.
 
Uri SwitchUrl (Uri oldUrl, int oldNumClusterSwitches, Func< Uri, bool >? isKineticaRunning=null)
 Switches to the next available cluster URL for HA failover.
 

Static Public Attributes

const int DefaultHostManagerPort = 9300
 The default port used for host-manager URLs (9300).
 

Properties

bool DisableFailover [get, set]
 Whether failover is disabled.
 
bool DisableAutoDiscovery [get, set]
 Whether auto-discovery is disabled.
 
int HostManagerPort [get, set]
 Host manager port.
 
HAFailoverOrder FailoverOrder [get, set]
 HA failover order.
 
Regex? HostnameRegex [get, set]
 Optional hostname regex for filtering URLs.
 
ILogger Logger = Microsoft.Extensions.Logging.Abstractions.NullLogger.Instance [get, set]
 Optional logger (category “Kinetica.HAFailover”).
 
int HARingSize [get]
 Gets the number of clusters in the HA ring.
 
int NumClusterSwitches [get]
 Gets the number of times the client has switched to a different cluster.
 

Detailed Description

Manages high availability failover for Kinetica connections.

This class tracks multiple cluster addresses and handles failover logic when a cluster becomes unavailable.

Definition at line 187 of file HAFailover.cs.

Constructor & Destructor Documentation

◆ HAFailoverManager() [1/2]

kinetica.HAFailoverManager.HAFailoverManager ()
inline

Creates a new HAFailoverManager.

Definition at line 241 of file HAFailover.cs.

◆ HAFailoverManager() [2/2]

kinetica.HAFailoverManager.HAFailoverManager ()
inline

Creates a new HAFailoverManager.

Definition at line 241 of file HAFailover.cs.

Member Function Documentation

◆ AddCluster() [1/2]

void kinetica.HAFailoverManager.AddCluster (ClusterAddressInfoclusterInfo)
inline

Adds a cluster address to the manager.

Definition at line 353 of file HAFailover.cs.

◆ AddCluster() [2/2]

void kinetica.HAFailoverManager.AddCluster (ClusterAddressInfoclusterInfo)
inline

Adds a cluster address to the manager.

Definition at line 353 of file HAFailover.cs.

◆ GetClusterInfo() [1/2]

ClusterAddressInfo? kinetica.HAFailoverManager.GetClusterInfo ()
inline

Gets the active cluster’s information.

Definition at line 321 of file HAFailover.cs.

◆ GetClusterInfo() [2/2]

ClusterAddressInfo? kinetica.HAFailoverManager.GetClusterInfo ()
inline

Gets the active cluster’s information.

Definition at line 321 of file HAFailover.cs.

◆ GetFailoverUrls() [1/2]

IList< Uri > kinetica.HAFailoverManager.GetFailoverUrls ()
inline

Gets the list of URLs in failover order.

Definition at line 307 of file HAFailover.cs.

◆ GetFailoverUrls() [2/2]

IList< Uri > kinetica.HAFailoverManager.GetFailoverUrls ()
inline

Gets the list of URLs in failover order.

Definition at line 307 of file HAFailover.cs.

◆ GetHostAddresses() [1/2]

IList< ClusterAddressInfo > kinetica.HAFailoverManager.GetHostAddresses ()
inline

Gets all cluster addresses.

Definition at line 285 of file HAFailover.cs.

◆ GetHostAddresses() [2/2]

IList< ClusterAddressInfo > kinetica.HAFailoverManager.GetHostAddresses ()
inline

Gets all cluster addresses.

Definition at line 285 of file HAFailover.cs.

◆ GetUrl() [1/2]

Uri? kinetica.HAFailoverManager.GetUrl ()
inline

Gets the current active URL.

Definition at line 345 of file HAFailover.cs.

◆ GetUrl() [2/2]

Uri? kinetica.HAFailoverManager.GetUrl ()
inline

Gets the current active URL.

Definition at line 345 of file HAFailover.cs.

◆ GetUrls() [1/2]

IList< Uri > kinetica.HAFailoverManager.GetUrls ()
inline

Gets the list of URLs of the active head ranks of all clusters.

Definition at line 296 of file HAFailover.cs.

◆ GetUrls() [2/2]

IList< Uri > kinetica.HAFailoverManager.GetUrls ()
inline

Gets the list of URLs of the active head ranks of all clusters.

Definition at line 296 of file HAFailover.cs.

◆ Initialize() [1/2]

void kinetica.HAFailoverManager.Initialize (IList< Uri >urls,
Kinetica?kinetica = null )
inline

Initializes the manager with a list of URLs.

Parameters
urlsThe URLs to initialize with
kineticaThe Kinetica client for system property queries

Definition at line 366 of file HAFailover.cs.

◆ Initialize() [2/2]

void kinetica.HAFailoverManager.Initialize (IList< Uri >urls,
Kinetica?kinetica = null )
inline

Initializes the manager with a list of URLs.

Parameters
urlsThe URLs to initialize with
kineticaThe Kinetica client for system property queries

Definition at line 366 of file HAFailover.cs.

◆ SwitchUrl() [1/2]

Uri kinetica.HAFailoverManager.SwitchUrl (UrioldUrl,
intoldNumClusterSwitches,
Func< Uri, bool >?isKineticaRunning = null )
inline

Switches to the next available cluster URL for HA failover.

Parameters
oldUrlThe URL that was in use when the failure occurred
oldNumClusterSwitchesThe switch count before this switch was initiated
isKineticaRunningFunction to check if Kinetica is running at a URL
Returns
The new URL to use
Exceptions
KineticaExceptionIf failover is not possible

Definition at line 746 of file HAFailover.cs.

◆ SwitchUrl() [2/2]

Uri kinetica.HAFailoverManager.SwitchUrl (UrioldUrl,
intoldNumClusterSwitches,
Func< Uri, bool >?isKineticaRunning = null )
inline

Switches to the next available cluster URL for HA failover.

Parameters
oldUrlThe URL that was in use when the failure occurred
oldNumClusterSwitchesThe switch count before this switch was initiated
isKineticaRunningFunction to check if Kinetica is running at a URL
Returns
The new URL to use
Exceptions
KineticaExceptionIf failover is not possible

Definition at line 746 of file HAFailover.cs.

Member Data Documentation

◆ DefaultHostManagerPort

const int kinetica.HAFailoverManager.DefaultHostManagerPort = 9300
static

The default port used for host-manager URLs (9300).

Definition at line 190 of file HAFailover.cs.

Property Documentation

◆ DisableAutoDiscovery

bool kinetica.HAFailoverManager.DisableAutoDiscovery
getset

Whether auto-discovery is disabled.

Definition at line 216 of file HAFailover.cs.

◆ DisableFailover

bool kinetica.HAFailoverManager.DisableFailover
getset

Whether failover is disabled.

Definition at line 211 of file HAFailover.cs.

◆ FailoverOrder

HAFailoverOrder kinetica.HAFailoverManager.FailoverOrder
getset

HA failover order.

Definition at line 226 of file HAFailover.cs.

◆ HARingSize

int kinetica.HAFailoverManager.HARingSize
get

Gets the number of clusters in the HA ring.

Definition at line 257 of file HAFailover.cs.

◆ HostManagerPort

int kinetica.HAFailoverManager.HostManagerPort
getset

Host manager port.

Definition at line 221 of file HAFailover.cs.

◆ HostnameRegex

Regex kinetica.HAFailoverManager.HostnameRegex
getset

Optional hostname regex for filtering URLs.

Definition at line 231 of file HAFailover.cs.

◆ Logger

ILogger kinetica.HAFailoverManager.Logger = Microsoft.Extensions.Logging.Abstractions.NullLogger.Instance
getset

Optional logger (category “Kinetica.HAFailover”).

Defaults to no-op when unset.

Definition at line 236 of file HAFailover.cs.

◆ NumClusterSwitches

int kinetica.HAFailoverManager.NumClusterSwitches
get

Gets the number of times the client has switched to a different cluster.

Definition at line 271 of file HAFailover.cs.


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