Class/Object

com.github.blemale.scaffeine

Cache

Related Docs: object Cache | package scaffeine

Permalink

class Cache[K, V] extends AnyRef

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Cache
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Cache(underlying: benmanes.caffeine.cache.Cache[K, V])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def asMap(): Map[K, V]

    Permalink

    Returns a view of the entries stored in this cache as a thread-safe map.

    Returns a view of the entries stored in this cache as a thread-safe map. Modifications made to the map directly affect the cache.

    returns

    a thread-safe view of this cache

  6. def cleanUp(): Unit

    Permalink

    Performs any pending maintenance operations needed by the cache.

    Performs any pending maintenance operations needed by the cache. Exactly which activities are performed -- if any -- is implementation-dependent.

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def estimatedSize(): Long

    Permalink

    Returns the approximate number of entries in this cache.

    Returns the approximate number of entries in this cache.

    returns

    the estimated number of mappings

  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def get(key: K, mappingFunction: (K) ⇒ V): V

    Permalink

    Returns the value associated with key in this cache, obtaining that value from mappingFunction if necessary.

    Returns the value associated with key in this cache, obtaining that value from mappingFunction if necessary. This method provides a simple substitute for the conventional "if cached, return; otherwise create, cache and return" pattern.

    key

    key with which the specified value is to be associated

    mappingFunction

    the function to compute a value

    returns

    the current (existing or computed) value associated with the specified key

    Exceptions thrown

    java.lang.IllegalStateException if the computation detectably attempts a recursive update to this cache that would otherwise never complete

    java.lang.RuntimeException or Error if the mappingFunction does so, in which case the mapping is left unestablished

  13. def getAllPresent(keys: Iterable[K]): Map[K, V]

    Permalink

    Returns a map of the values associated with keys in this cache.

    Returns a map of the values associated with keys in this cache. The returned map will only contain entries which are already present in the cache.

    keys

    the keys whose associated values are to be returned

    returns

    the mapping of keys to values for the specified keys found in this cache

  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def getIfPresent(key: K): Option[V]

    Permalink

    Returns the value associated with key in this cache, or None if there is no cached value for key.

    Returns the value associated with key in this cache, or None if there is no cached value for key.

    key

    key whose associated value is to be returned

    returns

    an option value containing the value to which the specified key is mapped, or None if this map contains no mapping for the key

  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. def invalidate(key: K): Unit

    Permalink

    Discards any cached value for key key.

    Discards any cached value for key key.

    key

    key whose mapping is to be removed from the cache

  18. def invalidateAll(): Unit

    Permalink

    Discards all entries in the cache.

  19. def invalidateAll(keys: Iterable[K]): Unit

    Permalink

    Discards any cached values for keys keys.

    Discards any cached values for keys keys.

    keys

    the keys whose associated values are to be removed

  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. def policy(): Policy[K, V]

    Permalink

    Returns access to inspect and perform low-level operations on this cache based on its runtime characteristics.

    Returns access to inspect and perform low-level operations on this cache based on its runtime characteristics. These operations are optional and dependent on how the cache was constructed and what abilities the implementation exposes.

    returns

    access to inspect and perform advanced operations based on the cache's characteristics

  25. def put(key: K, value: V): Unit

    Permalink

    Associates value with key in this cache.

    Associates value with key in this cache. If the cache previously contained a value associated with key, the old value is replaced by value.

    key

    key with which the specified value is to be associated

    value

    value to be associated with the specified key

  26. def putAll(map: Map[K, V]): Unit

    Permalink

    Copies all of the mappings from the specified map to the cache.

    Copies all of the mappings from the specified map to the cache.

    map

    mappings to be stored in this cache

  27. def stats(): CacheStats

    Permalink

    Returns a current snapshot of this cache's cumulative statistics.

    Returns a current snapshot of this cache's cumulative statistics. All statistics are initialized to zero, and are monotonically increasing over the lifetime of the cache.

    returns

    the current snapshot of the statistics of this cache

  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. def toString(): String

    Permalink
    Definition Classes
    Cache → AnyRef → Any
  30. val underlying: benmanes.caffeine.cache.Cache[K, V]

    Permalink
  31. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped