public class ObjectCache extends Object implements ObjectCache
| Constructor and Description |
|---|
ObjectCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
release(String key) |
void |
remove(String key)
Removes the specified key from the object cache.
|
<T> T |
retrieve(String key)
Retrieve object from cache.
|
<T> T |
retrieve(String key,
Callable<T> fn)
Retrieve object from cache.
|
<T> Future<T> |
retrieveAsync(String key,
Callable<T> fn)
Retrieve object from cache asynchronously.
|
public void release(String key)
release in interface ObjectCachepublic <T> T retrieve(String key) throws HiveException
ObjectCacheretrieve in interface ObjectCachekey - function to generate the object if it's not thereHiveExceptionpublic <T> T retrieve(String key, Callable<T> fn) throws HiveException
ObjectCacheretrieve in interface ObjectCachefn - function to generate the object if it's not thereHiveExceptionpublic <T> Future<T> retrieveAsync(String key, Callable<T> fn) throws HiveException
ObjectCacheretrieveAsync in interface ObjectCachefn - function to generate the object if it's not thereHiveExceptionpublic void remove(String key)
ObjectCacheremove in interface ObjectCachekey - - key to be removedCopyright © 2019 The Apache Software Foundation. All Rights Reserved.