C# Class MongoDB.Driver.Internal.ShardedMongoServerProxy

Connects to a number of mongos' and distributes load based on ping times.
Inheritance: MultipleInstanceMongoServerProxy
Afficher le fichier Open project: CloudMetal/mongo-csharp-driver

Méthodes publiques

Méthode Description
ShardedMongoServerProxy ( MongoServerSettings settings ) : System

Initializes a new instance of the ShardedMongoServerProxy class.

ShardedMongoServerProxy ( MongoServerSettings settings, IEnumerable instances, BlockingQueue stateChangedQueue, int connectionAttempt ) : System

Initializes a new instance of the ShardedMongoServerProxy class.

Méthodes protégées

Méthode Description
ChooseServerInstance ( ConnectedInstanceCollection connectedInstances, ReadPreference readPreference ) : MongoServerInstance

Chooses the server instance.

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.

Method Details

ChooseServerInstance() protected méthode

Chooses the server instance.
protected ChooseServerInstance ( ConnectedInstanceCollection connectedInstances, ReadPreference readPreference ) : MongoServerInstance
connectedInstances ConnectedInstanceCollection The connected instances.
readPreference ReadPreference The read preference.
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

ShardedMongoServerProxy() public méthode

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

ShardedMongoServerProxy() public méthode

Initializes a new instance of the ShardedMongoServerProxy class.
public ShardedMongoServerProxy ( MongoServerSettings settings, IEnumerable instances, BlockingQueue stateChangedQueue, int connectionAttempt ) : System
settings MongoServerSettings The settings.
instances IEnumerable The instances.
stateChangedQueue BlockingQueue The state changed queue.
connectionAttempt int The connection attempt.
Résultat System