public class CacheContext extends Object
Modifier | Constructor and Description |
---|---|
protected |
CacheContext()
Expected to be inherited in PrestoDB or other local cache caller.
|
Modifier and Type | Method and Description |
---|---|
static CacheContext |
defaults() |
boolean |
equals(Object o) |
String |
getCacheIdentifier()
Returns an string as a hint from computation to indicate the file.
|
CacheQuota |
getCacheQuota() |
CacheScope |
getCacheScope() |
HiveCacheContext |
getHiveCacheContext() |
int |
hashCode() |
void |
incrementCounter(String name,
long value)
Increments the counter
name by value . |
CacheContext |
setCacheIdentifier(String identifier) |
CacheContext |
setCacheQuota(CacheQuota cacheQuota) |
CacheContext |
setCacheScope(CacheScope cacheScope) |
CacheContext |
setHiveCacheContext(HiveCacheContext hiveCacheContext) |
String |
toString() |
protected CacheContext()
public static CacheContext defaults()
@Nullable public String getCacheIdentifier()
@Nullable public HiveCacheContext getHiveCacheContext()
public CacheQuota getCacheQuota()
public CacheScope getCacheScope()
public CacheContext setCacheIdentifier(String identifier)
identifier
- the id to useCacheContext
public CacheContext setCacheQuota(CacheQuota cacheQuota)
cacheQuota
- the cache quotaCacheContext
public CacheContext setCacheScope(CacheScope cacheScope)
cacheScope
- the cache quotaCacheContext
public CacheContext setHiveCacheContext(HiveCacheContext hiveCacheContext)
hiveCacheContext
- the hive cache contextCacheContext
public void incrementCounter(String name, long value)
name
by value
.
Default implementation does nothing. Subclass can implement its own tracking mechanism.
name
- name of the countervalue
- value of the counterCopyright © 2023. All Rights Reserved.