C# Class MongoDB.Driver.Internal.ConnectedInstanceCollection

Maintains a sorted list of connected instances by ping time.
Afficher le fichier Open project: CloudMetal/mongo-csharp-driver Class Usage Examples

Méthodes publiques

Méthode Description
Clear ( ) : void

Clears all the instances.

ConnectedInstanceCollection ( ) : System

Initializes a new instance of the ConnectedInstanceCollection class.

EnsureContains ( MongoServerInstance instance ) : void

Ensures that the instance is in the collection.

GetAllInstances ( ) : List

Gets a list of all instances.

GetPrimary ( ) : MongoServerInstance

Gets the primary instance.

GetPrimaryAndSecondaries ( ) : List

Gets a list of primary and secondary instances.

GetSecondaries ( ) : List

Gets a list of secondaries.

Remove ( MongoServerInstance instance ) : void

Removes the specified instance.

Private Methods

Méthode Description
InstanceAveragePingTimeChanged ( object sender, EventArgs e ) : void

Method Details

Clear() public méthode

Clears all the instances.
public Clear ( ) : void
Résultat void

ConnectedInstanceCollection() public méthode

Initializes a new instance of the ConnectedInstanceCollection class.
public ConnectedInstanceCollection ( ) : System
Résultat System

EnsureContains() public méthode

Ensures that the instance is in the collection.
public EnsureContains ( MongoServerInstance instance ) : void
instance MongoServerInstance The instance.
Résultat void

GetAllInstances() public méthode

Gets a list of all instances.
public GetAllInstances ( ) : List
Résultat List

GetPrimary() public méthode

Gets the primary instance.
public GetPrimary ( ) : MongoServerInstance
Résultat MongoServerInstance

GetPrimaryAndSecondaries() public méthode

Gets a list of primary and secondary instances.
public GetPrimaryAndSecondaries ( ) : List
Résultat List

GetSecondaries() public méthode

Gets a list of secondaries.
public GetSecondaries ( ) : List
Résultat List

Remove() public méthode

Removes the specified instance.
public Remove ( MongoServerInstance instance ) : void
instance MongoServerInstance The instance.
Résultat void