This project has retired. For details please refer to its
Attic page .
Cache (REEF 0.14.0 API)
JavaScript is disabled on your browser.
Summary:
Nested |
Field |
Constr |
Method
Detail:
Field |
Constr |
Method
All Known Implementing Classes:
CacheImpl , NameCache
public interface Cache <K,V>
Cache with get-if-absent-compute semantics.
Supports explicit invalidation.
Implementation may add other features, e.g. eviction on expire-after-write
Method Summary
Methods
Modifier and Type
Method and Description
V
get (K key,
Callable <V > valueFetcher)
Returns a value for the key if cached; otherwise creates, caches and returns.
void
invalidate (K key)
Invalidates a key from the cache.
Method Detail
get
V get (K key,
Callable <V > valueFetcher)
throws ExecutionException
Returns a value for the key if cached; otherwise creates, caches and returns.
When it creates a value for a key, only one callable for the key is executed
Parameters: key
- a keyvalueFetcher
- a value fetcher
Returns: a value
Throws:
ExecutionException
Summary:
Nested |
Field |
Constr |
Method
Detail:
Field |
Constr |
Method
Copyright © 2016 The Apache Software Foundation . All rights reserved.