C# Class MongoDB.Driver.Internal.ConnectedInstanceCollection

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

Public Methods

Method 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

Method Description
InstanceAveragePingTimeChanged ( object sender, EventArgs e ) : void

Method Details

Clear() public method

Clears all the instances.
public Clear ( ) : void
return void

ConnectedInstanceCollection() public method

Initializes a new instance of the ConnectedInstanceCollection class.
public ConnectedInstanceCollection ( ) : System
return System

EnsureContains() public method

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

GetAllInstances() public method

Gets a list of all instances.
public GetAllInstances ( ) : List
return List

GetPrimary() public method

Gets the primary instance.
public GetPrimary ( ) : MongoServerInstance
return MongoServerInstance

GetPrimaryAndSecondaries() public method

Gets a list of primary and secondary instances.
public GetPrimaryAndSecondaries ( ) : List
return List

GetSecondaries() public method

Gets a list of secondaries.
public GetSecondaries ( ) : List
return List

Remove() public method

Removes the specified instance.
public Remove ( MongoServerInstance instance ) : void
instance MongoServerInstance The instance.
return void