Class WatchesPathReport


  • public class WatchesPathReport
    extends java.lang.Object
    A watch report, essentially a mapping of path to session IDs of sessions that have set a watch on that path. This class is immutable.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.Long> getSessions​(java.lang.String path)
      Gets the session IDs of sessions that have set watches on the given path.
      boolean hasSessions​(java.lang.String path)
      Checks if the given path has watches set.
      java.util.Map<java.lang.String,​java.util.Set<java.lang.Long>> toMap()
      Converts this report to a map.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • hasSessions

        public boolean hasSessions​(java.lang.String path)
        Checks if the given path has watches set.
        Parameters:
        path - path
        Returns:
        true if path has watch set
      • getSessions

        public java.util.Set<java.lang.Long> getSessions​(java.lang.String path)
        Gets the session IDs of sessions that have set watches on the given path. The returned set is immutable.
        Parameters:
        path - session ID
        Returns:
        session IDs of sessions that have set watches on the path, or null if none
      • toMap

        public java.util.Map<java.lang.String,​java.util.Set<java.lang.Long>> toMap()
        Converts this report to a map. The returned map is mutable, and changes to it do not reflect back into this report.
        Returns:
        map representation of report