- Type Parameters:
K
- Key type.
- Enclosing class:
- LRUHybridCache<K,V>
public static interface LRUHybridCache.CycleHandler<K>
Should a cycle be detected during computation of a value
for given key, this interface allows client code to register
a callback that would get invoked in such a case.
The cycle is defined as follows. If any thread starts computation
for given key and code from the very same thread requests the computed value
before the computation ends, a cycle is detected.
Registered cycle handler is then given a chance to handle the cycle and
throw a runtime exception if appropriate.