Class ClusterDescriptionChangedEvent

java.lang.Object
com.mongodb.event.ClusterDescriptionChangedEvent

public final class ClusterDescriptionChangedEvent extends Object
An event signifying that the cluster description has changed.
Since:
3.3
  • Constructor Details

    • ClusterDescriptionChangedEvent

      public ClusterDescriptionChangedEvent(ClusterId clusterId, ClusterDescription newDescription, ClusterDescription previousDescription)
      Constructs a new instance of the event.
      Parameters:
      clusterId - the non-null cluster id
      newDescription - the non-null new cluster description
      previousDescription - the non-null previous cluster description
  • Method Details

    • getClusterId

      public ClusterId getClusterId()
      Gets the cluster id associated with this event.
      Returns:
      the cluster id
    • getNewDescription

      public ClusterDescription getNewDescription()
      Gets the new cluster description.
      Returns:
      the cluster description
    • getPreviousDescription

      public ClusterDescription getPreviousDescription()
      Gets the previous cluster description.
      Returns:
      the previous cluster description
    • toString

      public String toString()
      Overrides:
      toString in class Object