Package com.mongodb.event
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 Summary
Constructors Constructor Description ClusterDescriptionChangedEvent(ClusterId clusterId, ClusterDescription newDescription, ClusterDescription previousDescription)Constructs a new instance of the event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClusterIdgetClusterId()Gets the cluster id associated with this event.ClusterDescriptiongetNewDescription()Gets the new cluster description.ClusterDescriptiongetPreviousDescription()Gets the previous cluster description.StringtoString()
-
-
-
Constructor Detail
-
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 Detail
-
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
-
-