Collapse All Expand All | Language Filter: C#Language Filter: Visual Basic Language Filter: Visual C++ C# Visual Basic Visual C++ | See Also
StreamBase Client API
ConnectionMode Enumeration

Used when creating a MultiConnectionConfig to define how it will connect to the servers.

Namespace: StreamBase.LiveView.API
Assembly: StreamBase.LiveView.API (in StreamBase.LiveView.API.dll) Version: 10.3.0.4 (10.3.0.4)

# Syntax

| C# |  |  | Visual Basic |  |  | Visual C++ |

    public enum ConnectionMode

    Public Enumeration ConnectionMode

    public enum class ConnectionMode

# Members

Member | Value | Description
--- | --- | ---
SINGLE_CONNECTION_ROUND_ROBIN | 0 | Only one server will be connected at a time, and will be considered 'current' If it fails, the next will be tried. then the next, etc. If 'current' goes down, it will cause a roughFailover notification.
SINGLE_CONNECT_RETURN_TO_PREFERRED | 1 | Only one server will be connected at a time, and will be considered 'current' If it fails, the next will be tried. When any server other than the preferred server (the first in the list) is 'current', a background thread will attempt to reconnect to the preferred server, and 'current' will switch back to that one if it becomes available (causing a smoothFailover notification). If 'current' goes down, it will cause a roughFailover notification.
SIMULTANEOUS_CONNECT_SINGLE_ACTIVE | 2 | On startup, attempt to connect to all servers, first one to connect becomes 'current' and all others remain warm. Only a single connection will be active (the 'current' server), which means all queries will go to it. Constant attempts will be made to reconnect to any server that is not currently connected (unless they are specifically set to inactive through the API). If 'current' goes down and any others are connected, then one of the others will become 'current' and a smoothFailover notification will be given. If 'current' goes down and not others are connected, then a roughFailover notification will be given This is the default value if the ConnectionMode is not specified.
SIMULTANEOUS_CONNECT_SINGLE_ACTIVE_RETURN_TO_PREFERRED | 3 | On startup, attempt to connect to all servers, first one to connect becomes 'current' and all others remain warm. Only a single connection will be active (the 'current' server), which means all queries will go to it. Constant attempts will be made to reconnect to any server that is not currently connected (unless they are specifically set to inactive through the API). If 'current' goes down and any others are connected, then one of the others will become 'current' and a smoothFailover notification will be given. If 'current' goes down and not others are connected, then a roughFailover notification will be given If preferred server connects, it is always made 'current' and a smoothFailover to it occurs
SIMULTANEOUS_CONNECT_MULTIPLE_ACTIVE | 4 | On startup, attempt to connect to all servers, all that connect will be considered active. Queries will be assigned to all active connections in a round robin. Constant attempts will be made to reconnect to any server that is not currently connected (unless they are specifically set to inactive through the API). If any server goes down, its queries will be reassigned to other active servers (assuming at least one other is active). This will cause a smoothFailover notification. If the last active server goes down, it will cause a roughFailover notification.

# See Also

StreamBase.LiveView.API Namespace