Class ServerDescriptionChangedEvent

java.lang.Object
com.mongodb.event.ServerDescriptionChangedEvent

public final class ServerDescriptionChangedEvent extends Object
An event for changes to the description of a server.
Since:
3.3
  • Constructor Details

    • ServerDescriptionChangedEvent

      public ServerDescriptionChangedEvent(ServerId serverId, ServerDescription newDescription, ServerDescription previousDescription)
      Construct an instance.
      Parameters:
      serverId - the non-null serverId
      newDescription - the non-null new description
      previousDescription - the non-null previous description
  • Method Details

    • getServerId

      public ServerId getServerId()
      Gets the serverId.
      Returns:
      the serverId
    • getNewDescription

      public ServerDescription getNewDescription()
      Gets the new server description.
      Returns:
      the new server description
    • getPreviousDescription

      public ServerDescription getPreviousDescription()
      Gets the previous server description.
      Returns:
      the previous server description
    • toString

      public String toString()
      Overrides:
      toString in class Object