Class PercentLimitUsage<T extends Usage>

    • Field Detail

      • percentLimit

        protected int percentLimit
      • total

        protected long total
    • Constructor Detail

      • PercentLimitUsage

        public PercentLimitUsage​(T parent,
                                 String name,
                                 float portion)
        Parameters:
        parent -
        name -
        portion -
    • Method Detail

      • setPercentLimit

        public void setPercentLimit​(int percentLimit)
      • getPercentLimit

        public int getPercentLimit()
      • setTotal

        public void setTotal​(long max)
        Sets the total available space in bytes. When non zero, the filesystem totalAvailableSpace is ignored. When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
      • getTotal

        public long getTotal()
      • percentLimitFromFile

        protected void percentLimitFromFile​(File directory)
      • updateLimitBasedOnPercent

        protected abstract void updateLimitBasedOnPercent()