C# Class MongoDB.Driver.Internal.ReplicaSetMongoServerProxy

Proxy for connecting to a replica set.
Inheritance: MultipleInstanceMongoServerProxy
Afficher le fichier Open project: CloudMetal/mongo-csharp-driver

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
GetMatchingInstance ( List instancesWithPingTime, ReadPreference readPreference, System.TimeSpan secondaryAcceptableLatency ) : MongoServerInstance

Gets a randomly selected matching instance.

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

Method Details

ChooseServerInstance() protected méthode

protected ChooseServerInstance ( ConnectedInstanceCollection connectedInstances, ReadPreference readPreference ) : MongoServerInstance
connectedInstances ConnectedInstanceCollection
readPreference ReadPreference
Résultat MongoServerInstance

DetermineServerState() protected méthode

Determines the state of the server.
protected DetermineServerState ( MongoServerState currentState, IEnumerable instances ) : MongoServerState
currentState MongoServerState State of the current.
instances IEnumerable The instances.
Résultat MongoServerState

IsValidInstance() protected méthode

Determines whether the instance is a valid. If not, the instance is removed.
protected IsValidInstance ( MongoServerInstance instance ) : bool
instance MongoServerInstance The instance.
Résultat bool

ProcessConnectedInstanceStateChange() protected méthode

Processes the connected instance state change.
protected ProcessConnectedInstanceStateChange ( MongoServerInstance instance ) : void
instance MongoServerInstance The instance.
Résultat void

ReplicaSetMongoServerProxy() public méthode

Initializes a new instance of the ReplicaSetMongoServerProxy class.
public ReplicaSetMongoServerProxy ( MongoServerSettings settings ) : System
settings MongoServerSettings The settings.
Résultat System

ReplicaSetMongoServerProxy() public méthode

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.
Résultat System