Package alluxio.client.quota
Class CacheQuota
- java.lang.Object
-
- alluxio.client.quota.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.
-
Constructor Summary
Constructors Constructor Description CacheQuota()
Empty cache quota.CacheQuota(java.util.Map<CacheScope.Level,java.lang.Long> quota)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
long
getQuota(CacheScope cacheScope)
int
hashCode()
-
-
-
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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-