C# Класс MongoDB.Driver.Internal.ReplicaSetMongoServerProxy

Proxy for connecting to a replica set.
Наследование: MultipleInstanceMongoServerProxy
Показать файл Открыть проект

Открытые методы

Метод Описание
ReplicaSetMongoServerProxy ( MongoServerSettings settings ) : System

Initializes a new instance of the ReplicaSetMongoServerProxy class.

ReplicaSetMongoServerProxy ( MongoServerSettings serverSettings, IEnumerable instances, BlockingQueue stateChangeQueue, int connectionAttempt ) : System

Initializes a new instance of the ReplicaSetMongoServerProxy class.

Защищенные методы

Метод Описание
ChooseServerInstance ( ConnectedInstanceCollection connectedInstances, ReadPreference readPreference ) : MongoServerInstance
DetermineServerState ( MongoServerState currentState, IEnumerable instances ) : MongoServerState

Determines the state of the server.

IsValidInstance ( MongoServerInstance instance ) : bool

Determines whether the instance is a valid. If not, the instance is removed.

ProcessConnectedInstanceStateChange ( MongoServerInstance instance ) : void

Processes the connected instance state change.

Приватные методы

Метод Описание
GetMatchingInstance ( List instancesWithPingTime, ReadPreference readPreference, System.TimeSpan secondaryAcceptableLatency ) : MongoServerInstance

Gets a randomly selected matching instance.

ProcessConnectedPrimaryStateChange ( MongoServerInstance instance ) : void
ProcessConnectedSecondaryStateChange ( MongoServerInstance instance ) : void

Описание методов

ChooseServerInstance() защищенный Метод

protected ChooseServerInstance ( ConnectedInstanceCollection connectedInstances, ReadPreference readPreference ) : MongoServerInstance
connectedInstances ConnectedInstanceCollection
readPreference ReadPreference
Результат MongoServerInstance

DetermineServerState() защищенный Метод

Determines the state of the server.
protected DetermineServerState ( MongoServerState currentState, IEnumerable instances ) : MongoServerState
currentState MongoServerState State of the current.
instances IEnumerable The instances.
Результат MongoServerState

IsValidInstance() защищенный Метод

Determines whether the instance is a valid. If not, the instance is removed.
protected IsValidInstance ( MongoServerInstance instance ) : bool
instance MongoServerInstance The instance.
Результат bool

ProcessConnectedInstanceStateChange() защищенный Метод

Processes the connected instance state change.
protected ProcessConnectedInstanceStateChange ( MongoServerInstance instance ) : void
instance MongoServerInstance The instance.
Результат void

ReplicaSetMongoServerProxy() публичный Метод

Initializes a new instance of the ReplicaSetMongoServerProxy class.
public ReplicaSetMongoServerProxy ( MongoServerSettings settings ) : System
settings MongoServerSettings The settings.
Результат System

ReplicaSetMongoServerProxy() публичный Метод

Initializes a new instance of the ReplicaSetMongoServerProxy class.
public ReplicaSetMongoServerProxy ( MongoServerSettings serverSettings, IEnumerable instances, BlockingQueue stateChangeQueue, int connectionAttempt ) : System
serverSettings MongoServerSettings The server settings.
instances IEnumerable The instances.
stateChangeQueue BlockingQueue The state change queue.
connectionAttempt int The connection attempt.
Результат System