Skip to main content

LeastConnectionsStrategy

  • Namespace: PPDS.Dataverse.Pooling.Strategies
  • Assembly: PPDS.Dataverse
  • Kind: Class
  • Implements: IConnectionSelectionStrategy

Summary

Selects the connection with the fewest active clients.

Members

Methods

SelectConnection

string SelectConnection(IReadOnlyList<DataverseConnection> connections, IThrottleTracker throttleTracker, IReadOnlyDictionary<string, int> activeConnections)

Selects a connection based on the strategy's criteria.

  • Param connections: Available connection configurations.

  • Param throttleTracker: Throttle tracker for checking throttle state.

  • Param activeConnections: Number of active connections per configuration name.

  • Returns: The name of the selected connection.