Class WatchesSummary
java.lang.Object
org.apache.zookeeper.server.watch.WatchesSummary
A summary of watch information. This class is immutable.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe key in the map returned bytoMap()for the number of connections.static final StringThe key in the map returned bytoMap()for the number of paths.static final StringThe key in the map returned bytoMap()for the total number of watches. -
Method Summary
Modifier and TypeMethodDescriptionintGets the number of connections (sessions) that have set watches.intGets the number of paths that have watches set on them.intGets the total number of watches set.toMap()Converts this summary to a map.
-
Field Details
-
Method Details
-
getNumConnections
public int getNumConnections()Gets the number of connections (sessions) that have set watches.- Returns:
- number of connections
-
getNumPaths
public int getNumPaths()Gets the number of paths that have watches set on them.- Returns:
- number of paths
-
getTotalWatches
public int getTotalWatches()Gets the total number of watches set.- Returns:
- total watches
-
toMap
Converts this summary to a map. The returned map is mutable, and changes to it do not reflect back into this summary.- Returns:
- map representation of summary
-