Class CacheQuota


  • public class CacheQuota
    extends java.lang.Object
    Data structure that stores and returns cache size in number of bytes associated with a cache scope.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static CacheQuota UNLIMITED
      A predefined CacheQuota instance that sets NO limit.
    • Field Detail

      • UNLIMITED

        public static final CacheQuota UNLIMITED
        A predefined CacheQuota instance that sets NO limit.
    • Constructor Detail

      • CacheQuota

        public CacheQuota​(java.util.Map<CacheScope.Level,​java.lang.Long> quota)
        Parameters:
        quota - a map from scope level to size in bytes
      • CacheQuota

        public CacheQuota()
        Empty cache quota.
    • Method Detail

      • getQuota

        public long getQuota​(CacheScope cacheScope)
        Parameters:
        cacheScope - the scope to query
        Returns:
        size of quota of this scope in bytes
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object