StartNewFailoverClientAsync Method
StartNewFailoverClientAsync(Action<HazelcastFailoverOptions>, CancellationToken)
Starts a new IHazelcastClient instance in failover mode with configured options.
Declaration
public static ValueTask<IHazelcastClient> StartNewFailoverClientAsync(Action<HazelcastFailoverOptions> configure, CancellationToken cancellationToken = default)
Parameters
Action<HazelcastFailoverOptions> | configure | A HazelcastFailoverOptions configuration delegate. |
CancellationToken | cancellationToken | A optional cancellation token. |
Returns
ValueTask<IHazelcastClient> | A new IHazelcastClient instance. |
Remarks
Options are built via the HazelcastFailoverOptionsBuilder.Build() method
and passed to the configure
method,
where they can be refined and adjusted, before being used to create the client.
By default, the client connection timeout is 120 seconds. If this method cannot establish a connection to a cluster at the configured addresses, it may do failover. You may want to configure a timeout via the options.Networking.ConnectionRetry.ClusterConnectionTimeoutMilliseconds configuration option.
StartNewFailoverClientAsync(HazelcastFailoverOptions, CancellationToken)
Starts a new IHazelcastClient in failover mode instance with options.
Declaration
public static ValueTask<IHazelcastClient> StartNewFailoverClientAsync(HazelcastFailoverOptions options, CancellationToken cancellationToken = default)
Parameters
HazelcastFailoverOptions | options | Options. |
CancellationToken | cancellationToken | A optional cancellation token. |
Returns
ValueTask<IHazelcastClient> | A new IHazelcastClient instance. |
Remarks
By default, the client connection timeout is 120 seconds. If this method cannot establish a connection to a cluster at the configured addresses, it may do failover. You may want to configure a timeout via the options.Networking.ConnectionRetry.ClusterConnectionTimeoutMilliseconds configuration option.