Package com.mongodb.event
Class ClusterDescriptionChangedEvent
java.lang.Object
com.mongodb.event.ClusterDescriptionChangedEvent
An event signifying that the cluster description has changed.
- Since:
- 3.3
-
Constructor Summary
ConstructorDescriptionClusterDescriptionChangedEvent
(ClusterId clusterId, ClusterDescription newDescription, ClusterDescription previousDescription) Constructs a new instance of the event. -
Method Summary
Modifier and TypeMethodDescriptionGets the cluster id associated with this event.Gets the new cluster description.Gets the previous cluster description.toString()
-
Constructor Details
-
ClusterDescriptionChangedEvent
public ClusterDescriptionChangedEvent(ClusterId clusterId, ClusterDescription newDescription, ClusterDescription previousDescription) Constructs a new instance of the event.- Parameters:
clusterId
- the non-null cluster idnewDescription
- the non-null new cluster descriptionpreviousDescription
- the non-null previous cluster description
-
-
Method Details
-
getClusterId
Gets the cluster id associated with this event.- Returns:
- the cluster id
-
getNewDescription
Gets the new cluster description.- Returns:
- the cluster description
-
getPreviousDescription
Gets the previous cluster description.- Returns:
- the previous cluster description
-
toString
-