Class MongoServerInstance
Represents an instance of a MongoDB server host.
public sealed class MongoServerInstance
- Inheritance
-
MongoServerInstance
- Inherited Members
- Extension Methods
Properties
Address
Gets the address of this server instance.
public MongoServerAddress Address { get; }
Property Value
InstanceType
Gets the instance type.
public MongoServerInstanceType InstanceType { get; }
Property Value
IsArbiter
Gets a value indicating whether this server instance is an arbiter instance.
public bool IsArbiter { get; }
Property Value
IsPassive
Gets a value indicating whether this server instance is a passive instance.
[Obsolete("Passives are treated the same as secondaries.")]
public bool IsPassive { get; }
Property Value
IsPrimary
Gets a value indicating whether this server instance is a primary.
public bool IsPrimary { get; }
Property Value
IsSecondary
Gets a value indicating whether this server instance is a secondary.
public bool IsSecondary { get; }
Property Value
MaxBatchCount
Gets the maximum batch count for write operations.
public int MaxBatchCount { get; }
Property Value
MaxDocumentSize
Gets the max document size for this server instance.
public int MaxDocumentSize { get; }
Property Value
MaxMessageLength
Gets the max message length for this server instance.
public int MaxMessageLength { get; }
Property Value
MaxWireDocumentSize
Gets the maximum size of a wire document. Normally slightly larger than MaxDocumentSize.
public int MaxWireDocumentSize { get; }
Property Value
MaxWireVersion
Gets the maximum wire version.
public int MaxWireVersion { get; }
Property Value
SequentialId
Gets the unique sequential Id for this server instance.
public int SequentialId { get; }
Property Value
Settings
Gets the server for this server instance.
public MongoServerSettings Settings { get; }
Property Value
State
Gets the state of this server instance.
public MongoServerState State { get; }
Property Value
Methods
GetIPEndPoint()
Gets the IP end point of this server instance.
public IPEndPoint GetIPEndPoint()
Returns
- IPEndPoint
The IP end point of this server instance.
GetServerDescription()
Gets the server description.
public ServerDescription GetServerDescription()
Returns
- ServerDescription
The server description.
Ping()
Checks whether the server is alive (throws an exception if not).
public void Ping()
Supports(FeatureId)
Checks whether this server instance supports a feature.
public bool Supports(FeatureId featureId)
Parameters
featureId
FeatureIdThe id of the feature.
Returns
- bool
True if this server instance supports the feature; otherwise, false.
Events
StateChanged
Occurs when the value of the State property changes.
public event EventHandler StateChanged