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

org.apache.zookeeper

## Class StatsTrack

- java.lang.Object
- - org.apache.zookeeper.StatsTrack

-     public class StatsTrack
      extends Object

  a class that represents the stats associated with quotas

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StatsTrack()` a default constructor for stats
    `StatsTrack(byte[] stat)`
    `StatsTrack(String stat)` the stat string should be of the form key1str=long,key2str=long,..

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getByteHardLimit()` get the count of bytes allowed as part of quota (hard limit)
    `long` | `getBytes()` get the count of bytes allowed as part of quota
    `long` | `getCount()` get the count of nodes allowed as part of quota
    `long` | `getCountHardLimit()` get the count of nodes allowed as part of quota (hard limit)
    `byte[]` | `getStatsBytes()`
    `void` | `setByteHardLimit(long bytes)` set the byte hard limit
    `void` | `setBytes(long bytes)` set the bytes for this stat tracker.
    `void` | `setCount(long count)` set the count for this stat tracker.
    `void` | `setCountHardLimit(long count)` set the count hard limit
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### StatsTrack

          public StatsTrack()

      a default constructor for stats

    - #### StatsTrack

          public StatsTrack(byte[] stat)

      Parameters:
        `stat` - the byte[] stat to be initialized with

    - #### StatsTrack

          public StatsTrack(String stat)

      the stat string should be of the form key1str=long,key2str=long,.. where either , or ; are valid separators uninitialized values are returned as -1
      Parameters:
        `stat` - the stat string to be initialized with

  - ### Method Detail

    - #### getCount

          public long getCount()

      get the count of nodes allowed as part of quota
      Returns:
        the count as part of this string

    - #### setCount

          public void setCount(long count)

      set the count for this stat tracker.
      Parameters:
        `count` - the count to set with

    - #### getCountHardLimit

          public long getCountHardLimit()

      get the count of nodes allowed as part of quota (hard limit)
      Returns:
        the count as part of this string

    - #### setCountHardLimit

          public void setCountHardLimit(long count)

      set the count hard limit
      Parameters:
        `count` - the count limit to set

    - #### getBytes

          public long getBytes()

      get the count of bytes allowed as part of quota
      Returns:
        the bytes as part of this string

    - #### setBytes

          public void setBytes(long bytes)

      set the bytes for this stat tracker.
      Parameters:
        `bytes` - the bytes to set with

    - #### getByteHardLimit

          public long getByteHardLimit()

      get the count of bytes allowed as part of quota (hard limit)
      Returns:
        the bytes as part of this string

    - #### setByteHardLimit

          public void setByteHardLimit(long bytes)

      set the byte hard limit
      Parameters:
        `bytes` - the byte limit to set

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getStatsBytes

          public byte[] getStatsBytes()

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