Interface Cache.CycleHandler<K>

  • Type Parameters:
    K - Key type.
    Enclosing class:
    Cache<K,​V>

    public static interface Cache.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.
    • Method Detail

      • handleCycle

        void handleCycle​(K key)
        Handle cycle that was detected while computing a cache value for given key. This method would typically just throw a runtime exception.
        Parameters:
        key - instance that caused the cycle.