Package org.availlang.cache

Types

Link copied to clipboard
sealed class CacheException : RuntimeException

An abstract RuntimeException specific for use with the LRUCache.

Link copied to clipboard
class CacheInsertException(e: RuntimeException) : CacheException

A CacheException that is used to wrap an exception raised during the run of the LRUCache.transformer to calculate a value to store in the cache.

Link copied to clipboard
class LRUCache<K, V> @JvmOverloads constructor(    softCapacity: Int,     strongCapacity: Int,     transformer: (K) -> V,     retirementAction: (K, V) -> Unit? = null)

LRUCache implements a memory-sensitive least-recently-used cache. All public operations support concurrent access. It avoids redundant simultaneous computation of values by racing threads that present the same keys.