Table of Contents

Struct ServerHeartbeatFailedEvent

Namespace
MongoDB.Driver.Core.Events
Assembly
MongoDB.Driver.Core.dll

Occurs when a heartbeat failed.

public struct ServerHeartbeatFailedEvent
Inherited Members

Constructors

ServerHeartbeatFailedEvent(ConnectionId, Exception, bool)

Initializes a new instance of the ServerHeartbeatFailedEvent struct.

[Obsolete("Use the other contstructor instead")]
public ServerHeartbeatFailedEvent(ConnectionId connectionId, Exception exception, bool awaited)

Parameters

connectionId ConnectionId

The connection identifier.

exception Exception

The exception.

awaited bool

The awaited flag.

ServerHeartbeatFailedEvent(ConnectionId, TimeSpan, Exception, bool)

Initializes a new instance of the ServerHeartbeatFailedEvent struct.

public ServerHeartbeatFailedEvent(ConnectionId connectionId, TimeSpan duration, Exception exception, bool awaited)

Parameters

connectionId ConnectionId

The connection identifier.

duration TimeSpan

The duration of time passed since corresponding ServerHeartbeatStartedEvent.

exception Exception

The exception.

awaited bool

The awaited flag.

Properties

Awaited

Determines if this heartbeat event is for an awaitable hello.

public bool Awaited { get; }

Property Value

bool

ClusterId

Gets the cluster identifier.

public ClusterId ClusterId { get; }

Property Value

ClusterId

ConnectionId

Gets the connection identifier.

public ConnectionId ConnectionId { get; }

Property Value

ConnectionId

Duration

Gets the duration of time passed since corresponding ServerHeartbeatStartedEvent.

public TimeSpan Duration { get; }

Property Value

TimeSpan

Exception

Gets the exception.

public Exception Exception { get; }

Property Value

Exception

ServerId

Gets the server identifier.

public ServerId ServerId { get; }

Property Value

ServerId

Timestamp

Gets the timestamp.

public DateTime Timestamp { get; }

Property Value

DateTime