C# Class MongoDB.Driver.Internal.DirectMongoServerProxy

Connects directly to a specified instance, failing over to other addresses as necessary.
Inheritance: IMongoServerProxy
Afficher le fichier Open project: CloudMetal/mongo-csharp-driver

Méthodes publiques

Méthode Description
ChooseServerInstance ( ReadPreference readPreference ) : MongoServerInstance

Chooses the server instance.

Connect ( System.TimeSpan timeout, ReadPreference readPreference ) : void

Connects to the server respecting the timeout and readPreference.

DirectMongoServerProxy ( MongoServerSettings settings ) : System

Initializes a new instance of the DirectMongoServerProxy class.

DirectMongoServerProxy ( MongoServerSettings serverSettings, MongoServerInstance instance, int connectionAttempt ) : System

Initializes a new instance of the DirectMongoServerProxy class.

Disconnect ( ) : void

Disconnects from the server.

Ping ( ) : void

Pings the server.

VerifyState ( ) : void

Verifies the state of the server.

Method Details

ChooseServerInstance() public méthode

Chooses the server instance.
public ChooseServerInstance ( ReadPreference readPreference ) : MongoServerInstance
readPreference ReadPreference The read preference.
Résultat MongoServerInstance

Connect() public méthode

Connects to the server respecting the timeout and readPreference.
public Connect ( System.TimeSpan timeout, ReadPreference readPreference ) : void
timeout System.TimeSpan The timeout.
readPreference ReadPreference The read preference.
Résultat void

DirectMongoServerProxy() public méthode

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

DirectMongoServerProxy() public méthode

Initializes a new instance of the DirectMongoServerProxy class.
public DirectMongoServerProxy ( MongoServerSettings serverSettings, MongoServerInstance instance, int connectionAttempt ) : System
serverSettings MongoServerSettings The server settings.
instance MongoServerInstance The instance.
connectionAttempt int The connection attempt.
Résultat System

Disconnect() public méthode

Disconnects from the server.
public Disconnect ( ) : void
Résultat void

Ping() public méthode

Pings the server.
public Ping ( ) : void
Résultat void

VerifyState() public méthode

Verifies the state of the server.
public VerifyState ( ) : void
Résultat void