Class Quotas


  • public class Quotas
    extends java.lang.Object
    this class manages quotas and has many other utils for quota
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String limitNode
      the limit node that has the limit of a subtree
      static java.lang.String procZookeeper
      the zookeeper nodes that acts as the management and status node
      static java.lang.String quotaZookeeper
      the zookeeper quota node that acts as the quota management node for zookeeper
      static java.lang.String statNode
      the stat node that monitors the limit of a subtree.
    • Constructor Summary

      Constructors 
      Constructor Description
      Quotas()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String limitPath​(java.lang.String path)
      return the limit quota path associated with this prefix
      static java.lang.String quotaPath​(java.lang.String path)
      return the quota path associated with this prefix
      static java.lang.String statPath​(java.lang.String path)
      return the stat quota path associated with this prefix.
      static java.lang.String trimQuotaPath​(java.lang.String quotaPath)
      return the real path associated with this quotaPath.
      • Methods inherited from class java.lang.Object

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

      • procZookeeper

        public static final java.lang.String procZookeeper
        the zookeeper nodes that acts as the management and status node
        See Also:
        Constant Field Values
      • quotaZookeeper

        public static final java.lang.String quotaZookeeper
        the zookeeper quota node that acts as the quota management node for zookeeper
        See Also:
        Constant Field Values
      • limitNode

        public static final java.lang.String limitNode
        the limit node that has the limit of a subtree
        See Also:
        Constant Field Values
      • statNode

        public static final java.lang.String statNode
        the stat node that monitors the limit of a subtree.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Quotas

        public Quotas()
    • Method Detail

      • quotaPath

        public static java.lang.String quotaPath​(java.lang.String path)
        return the quota path associated with this prefix
        Parameters:
        path - the actual path in zookeeper.
        Returns:
        the quota path
      • limitPath

        public static java.lang.String limitPath​(java.lang.String path)
        return the limit quota path associated with this prefix
        Parameters:
        path - the actual path in zookeeper.
        Returns:
        the limit quota path
      • statPath

        public static java.lang.String statPath​(java.lang.String path)
        return the stat quota path associated with this prefix.
        Parameters:
        path - the actual path in zookeeper
        Returns:
        the stat quota path
      • trimQuotaPath

        public static java.lang.String trimQuotaPath​(java.lang.String quotaPath)
        return the real path associated with this quotaPath.
        Parameters:
        quotaPath - the quotaPath which's started with /zookeeper/quota
        Returns:
        the real path associated with this quotaPath.