Kinetica   C#   API  Version 7.2.3.1
HAFailoverManager Class Reference

Manages high availability failover for Kinetica connections. More...

Public Member Functions

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

Public Attributes

const int DefaultHostManagerPort = 9300
 

Properties

bool DisableFailover [get, set]
 Whether failover is disabled More...
 
bool DisableAutoDiscovery [get, set]
 Whether auto-discovery is disabled More...
 
int HostManagerPort [get, set]
 Host manager port More...
 
HAFailoverOrder FailoverOrder [get, set]
 HA failover order More...
 
Regex? HostnameRegex [get, set]
 Optional hostname regex for filtering URLs More...
 
int HARingSize [get]
 Gets the number of clusters in the HA ring. More...
 
int NumClusterSwitches [get]
 Gets the number of times the client has switched to a different cluster. More...
 

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 190 of file HAFailover.cs.

Constructor & Destructor Documentation

◆ HAFailoverManager()

HAFailoverManager.HAFailoverManager ( )
inline

Creates a new HAFailoverManager.

Definition at line 239 of file HAFailover.cs.

Member Function Documentation

◆ AddCluster()

void HAFailoverManager.AddCluster ( ClusterAddressInfo  clusterInfo)
inline

Adds a cluster address to the manager.

Definition at line 351 of file HAFailover.cs.

◆ GetClusterInfo()

ClusterAddressInfo? HAFailoverManager.GetClusterInfo ( )
inline

Gets the active cluster's information.

Definition at line 319 of file HAFailover.cs.

◆ GetFailoverUrls()

IList<Uri> HAFailoverManager.GetFailoverUrls ( )
inline

Gets the list of URLs in failover order.

Definition at line 305 of file HAFailover.cs.

◆ GetHostAddresses()

IList<ClusterAddressInfo> HAFailoverManager.GetHostAddresses ( )
inline

Gets all cluster addresses.

Definition at line 283 of file HAFailover.cs.

◆ GetUrl()

Uri? HAFailoverManager.GetUrl ( )
inline

Gets the current active URL.

Definition at line 343 of file HAFailover.cs.

◆ GetUrls()

IList<Uri> HAFailoverManager.GetUrls ( )
inline

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

Definition at line 294 of file HAFailover.cs.

◆ Initialize()

void 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 364 of file HAFailover.cs.

◆ SwitchUrl()

Uri HAFailoverManager.SwitchUrl ( Uri  oldUrl,
int  oldNumClusterSwitches,
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 703 of file HAFailover.cs.

Member Data Documentation

◆ DefaultHostManagerPort

const int HAFailoverManager.DefaultHostManagerPort = 9300

Definition at line 193 of file HAFailover.cs.

Property Documentation

◆ DisableAutoDiscovery

bool HAFailoverManager.DisableAutoDiscovery
getset

Whether auto-discovery is disabled

Definition at line 219 of file HAFailover.cs.

◆ DisableFailover

bool HAFailoverManager.DisableFailover
getset

Whether failover is disabled

Definition at line 214 of file HAFailover.cs.

◆ FailoverOrder

HAFailoverOrder HAFailoverManager.FailoverOrder
getset

HA failover order

Definition at line 229 of file HAFailover.cs.

◆ HARingSize

int HAFailoverManager.HARingSize
get

Gets the number of clusters in the HA ring.

Definition at line 256 of file HAFailover.cs.

◆ HostManagerPort

int HAFailoverManager.HostManagerPort
getset

Host manager port

Definition at line 224 of file HAFailover.cs.

◆ HostnameRegex

Regex? HAFailoverManager.HostnameRegex
getset

Optional hostname regex for filtering URLs

Definition at line 234 of file HAFailover.cs.

◆ NumClusterSwitches

int HAFailoverManager.NumClusterSwitches
get

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

Definition at line 270 of file HAFailover.cs.


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