C# 클래스 MongoDB.Driver.Internal.MultipleInstanceMongoServerProxy

Base class for proxies that maintain multiple server instances.
상속: IMongoServerProxy
파일 보기 프로젝트 열기: CloudMetal/mongo-csharp-driver

공개 메소드들

메소드 설명
ChooseServerInstance ( ReadPreference readPreference ) : MongoServerInstance

Chooses the server instance.

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

Connects to the instances respecting the timeout and readPreference.

Disconnect ( ) : void

Disconnects the server.

Ping ( ) : void

Checks whether the server is alive (throws an exception if not).

VerifyState ( ) : void

Verifies the state of the server.

보호된 메소드들

메소드 설명
ChooseServerInstance ( ConnectedInstanceCollection connectedInstances, ReadPreference readPreference ) : MongoServerInstance

Chooses the server instance.

DetermineServerState ( MongoServerState currentState, IEnumerable instances ) : MongoServerState

Determines the state of the server.

EnsureInstanceWithAddress ( MongoServerAddress address ) : void

Ensures that an instance with the address exists.

IsValidInstance ( MongoServerInstance instance ) : bool

Determines whether the instance is a valid. If not, the instance is removed.

MakeInstancesMatchAddresses ( IEnumerable addresses ) : void

Ensures that the current instance list has all the addresses provided and does not contain any not provided.

MultipleInstanceMongoServerProxy ( MongoServerSettings settings ) : System

Initializes a new instance of the MultipleInstanceMongoServerProxy class.

MultipleInstanceMongoServerProxy ( MongoServerSettings settings, IEnumerable instances, BlockingQueue connectionQueue, int connectionAttempt ) : System

Initializes a new instance of the MultipleInstanceMongoServerProxy class.

This constructor is used when the instances have already been instructed to connect.

ProcessConnectedInstanceStateChange ( MongoServerInstance instance ) : void

Processes the connected instance state change.

비공개 메소드들

메소드 설명
AddInstance ( MongoServerInstance instance ) : void
ConnectInstance ( MongoServerInstance instance ) : void
InstanceStateChanged ( object sender, EventArgs e ) : void
ProcessInstanceStateChange ( MongoServerInstance instance ) : void
RemoveInstance ( MongoServerInstance instance ) : void
ThrowConnectionException ( ReadPreference readPreference ) : void

메소드 상세

ChooseServerInstance() 보호된 추상적인 메소드

Chooses the server instance.
protected abstract ChooseServerInstance ( ConnectedInstanceCollection connectedInstances, ReadPreference readPreference ) : MongoServerInstance
connectedInstances ConnectedInstanceCollection The connected instances.
readPreference ReadPreference The read preference.
리턴 MongoServerInstance

ChooseServerInstance() 공개 메소드

Chooses the server instance.
public ChooseServerInstance ( ReadPreference readPreference ) : MongoServerInstance
readPreference ReadPreference The read preference.
리턴 MongoServerInstance

Connect() 공개 메소드

Connects to the instances respecting the timeout and readPreference.
public Connect ( System.TimeSpan timeout, ReadPreference readPreference ) : void
timeout System.TimeSpan The timeout.
readPreference ReadPreference The read preference.
리턴 void

DetermineServerState() 보호된 추상적인 메소드

Determines the state of the server.
protected abstract DetermineServerState ( MongoServerState currentState, IEnumerable instances ) : MongoServerState
currentState MongoServerState State of the current.
instances IEnumerable The instances.
리턴 MongoServerState

Disconnect() 공개 메소드

Disconnects the server.
public Disconnect ( ) : void
리턴 void

EnsureInstanceWithAddress() 보호된 메소드

Ensures that an instance with the address exists.
protected EnsureInstanceWithAddress ( MongoServerAddress address ) : void
address MongoServerAddress The address.
리턴 void

IsValidInstance() 보호된 추상적인 메소드

Determines whether the instance is a valid. If not, the instance is removed.
protected abstract IsValidInstance ( MongoServerInstance instance ) : bool
instance MongoServerInstance The instance.
리턴 bool

MakeInstancesMatchAddresses() 보호된 메소드

Ensures that the current instance list has all the addresses provided and does not contain any not provided.
protected MakeInstancesMatchAddresses ( IEnumerable addresses ) : void
addresses IEnumerable The addresses.
리턴 void

MultipleInstanceMongoServerProxy() 보호된 메소드

Initializes a new instance of the MultipleInstanceMongoServerProxy class.
protected MultipleInstanceMongoServerProxy ( MongoServerSettings settings ) : System
settings MongoServerSettings The settings.
리턴 System

MultipleInstanceMongoServerProxy() 보호된 메소드

Initializes a new instance of the MultipleInstanceMongoServerProxy class.
This constructor is used when the instances have already been instructed to connect.
protected MultipleInstanceMongoServerProxy ( MongoServerSettings settings, IEnumerable instances, BlockingQueue connectionQueue, int connectionAttempt ) : System
settings MongoServerSettings The settings.
instances IEnumerable The instances.
connectionQueue BlockingQueue The state change queue.
connectionAttempt int The connection attempt.
리턴 System

Ping() 공개 메소드

Checks whether the server is alive (throws an exception if not).
public Ping ( ) : void
리턴 void

ProcessConnectedInstanceStateChange() 보호된 메소드

Processes the connected instance state change.
protected ProcessConnectedInstanceStateChange ( MongoServerInstance instance ) : void
instance MongoServerInstance The instance.
리턴 void

VerifyState() 공개 메소드

Verifies the state of the server.
public VerifyState ( ) : void
리턴 void