Метод | Описание | |
---|---|---|
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 ( |
Chooses the server instance.
|
|
DetermineServerState ( MongoServerState currentState, IEnumerable |
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 |
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 |
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, |
||
ProcessInstanceStateChange ( MongoServerInstance instance ) : void | ||
RemoveInstance ( MongoServerInstance instance ) : void | ||
ThrowConnectionException ( ReadPreference readPreference ) : void |
protected abstract ChooseServerInstance ( |
||
connectedInstances | The connected instances. | |
readPreference | ReadPreference | The read preference. |
Результат | MongoServerInstance |
public ChooseServerInstance ( ReadPreference readPreference ) : MongoServerInstance | ||
readPreference | ReadPreference | The read preference. |
Результат | MongoServerInstance |
public Connect ( System.TimeSpan timeout, ReadPreference readPreference ) : void | ||
timeout | System.TimeSpan | The timeout. |
readPreference | ReadPreference | The read preference. |
Результат | void |
protected abstract DetermineServerState ( MongoServerState currentState, IEnumerable |
||
currentState | MongoServerState | State of the current. |
instances | IEnumerable |
The instances. |
Результат | MongoServerState |
protected EnsureInstanceWithAddress ( MongoServerAddress address ) : void | ||
address | MongoServerAddress | The address. |
Результат | void |
protected abstract IsValidInstance ( MongoServerInstance instance ) : bool | ||
instance | MongoServerInstance | The instance. |
Результат | bool |
protected MakeInstancesMatchAddresses ( IEnumerable |
||
addresses | IEnumerable |
The addresses. |
Результат | void |
protected MultipleInstanceMongoServerProxy ( MongoServerSettings settings ) : System | ||
settings | MongoServerSettings | The settings. |
Результат | System |
protected MultipleInstanceMongoServerProxy ( MongoServerSettings settings, IEnumerable |
||
settings | MongoServerSettings | The settings. |
instances | IEnumerable |
The instances. |
connectionQueue | BlockingQueue |
The state change queue. |
connectionAttempt | int | The connection attempt. |
Результат | System |
protected ProcessConnectedInstanceStateChange ( MongoServerInstance instance ) : void | ||
instance | MongoServerInstance | The instance. |
Результат | void |