WatchesSummary (Apache ZooKeeper - Server 3.7.0 API)
Date: 2021-03-17

org.apache.zookeeper.server.watch

## Class WatchesSummary

- java.lang.Object
- - org.apache.zookeeper.server.watch.WatchesSummary

-     public class WatchesSummary
      extends Object

  A summary of watch information. This class is immutable.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `KEY_NUM_CONNECTIONS` The key in the map returned by `toMap()` for the number of connections.
    `static String` | `KEY_NUM_PATHS` The key in the map returned by `toMap()` for the number of paths.
    `static String` | `KEY_NUM_TOTAL_WATCHES` The key in the map returned by `toMap()` for the total number of watches.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getNumConnections()` Gets the number of connections (sessions) that have set watches.
    `int` | `getNumPaths()` Gets the number of paths that have watches set on them.
    `int` | `getTotalWatches()` Gets the total number of watches set.
    `Map<String,Object>` | `toMap()` Converts this summary to a map.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### KEY_NUM_CONNECTIONS

          public static final String KEY_NUM_CONNECTIONS

      The key in the map returned by `toMap()` for the number of connections.
      See Also:
        Constant Field Values

    - #### KEY_NUM_PATHS

          public static final String KEY_NUM_PATHS

      The key in the map returned by `toMap()` for the number of paths.
      See Also:
        Constant Field Values

    - #### KEY_NUM_TOTAL_WATCHES

          public static final String KEY_NUM_TOTAL_WATCHES

      The key in the map returned by `toMap()` for the total number of watches.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### 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

          public Map<String,Object> 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

Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.