org.feijoas.mango.common.cache

CacheWrapper

Related Doc: package cache

trait CacheWrapper[K, V] extends Cache[K, V]

An adapter that wraps a Guava-Cache in a Mango-Cache and forwards all method calls to the underlying Guava-Cache.

Attributes
protected[org.feijoas.mango]
Since

0.7

Linear Supertypes
Cache[K, V], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CacheWrapper
  2. Cache
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def cache: com.google.common.cache.Cache[K, V]

    Returns the backing Guava Cache delegate instance that methods are forwarded to.

    Returns the backing Guava Cache delegate instance that methods are forwarded to. Concrete subclasses override this method to supply the instance being decorated.

    Attributes
    protected

Concrete Value Members

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

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

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

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

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

    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.

    Definition Classes
    CacheWrapperCache
  6. def cleanUp(): Unit

    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.

    Definition Classes
    CacheWrapperCache
  7. def clone(): AnyRef

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

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

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def getAllPresent(keys: Traversable[K]): Map[K, V]

    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.

    Definition Classes
    CacheWrapperCache
  12. final def getClass(): Class[_]

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

    Returns an Option which is Some(value) with the value associated with key in this cache, or None if there is no cached value for key.

    Returns an Option which is Some(value) with the value associated with key in this cache, or None if there is no cached value for key.

    Definition Classes
    CacheWrapperCache
  14. def getOrElseUpdate(key: K, loader: () ⇒ V): V

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

    Returns the value associated with key in this cache, obtaining that value from loader if necessary. No observable state associated with this cache is modified until loading completes. This method provides a simple substitute for the conventional if cached, return; otherwise create, cache and return pattern.

    Warning: as with CacheLoader#load, loader must not return null; it may either return a non-null value or throw an exception. The recommend way would be to use a Cache[K, Option[V]] with loader return None instead of throwing an exception.

    This method is equivalent to Cache.get(K, Callable<? extends V>) from the Guava-Libraries.

    Definition Classes
    CacheWrapperCache
    Exceptions thrown

    ExecutionError if an error was thrown while loading the value

    ExecutionException if a checked exception was thrown while loading the value

    UncheckedExecutionException if an unchecked exception was thrown while loading the value

  15. def hashCode(): Int

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

    Discards any cached value for key key.

    Discards any cached value for key key.

    Definition Classes
    CacheWrapperCache
  17. def invalidateAll(): Unit

    Discards all entries in the cache.

    Discards all entries in the cache.

    Definition Classes
    CacheWrapperCache
  18. def invalidateAll(keys: Traversable[K]): Unit

    Discards any cached values for keys keys.

    Discards any cached values for keys keys.

    Definition Classes
    CacheWrapperCache
  19. final def isInstanceOf[T0]: Boolean

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

    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  23. def put(key: K, value: V): Unit

    Adds a new key/value pair to this cache.

    Adds a new key/value pair to this cache. If the cache previously contained a value associated with the key, the old value is replaced by the value.

    Prefer getOrElseUpdate(key, loader) when using the conventional if cached, return; otherwise create, cache and return pattern.

    Definition Classes
    CacheWrapperCache
  24. def putAll(kvs: Traversable[(K, V)]): Unit

    Puts all key/value pairs from the specified Traversable to the cache.

    Puts all key/value pairs from the specified Traversable to the cache. The effect of this call is equivalent to that of calling put(key, value) for each (key, value) in the Traversable. The behavior of this operation is undefined if the specified map is modified while the operation is in progress.

    Definition Classes
    CacheWrapperCache
  25. def size(): Long

    Returns the approximate number of entries in this cache.

    Returns the approximate number of entries in this cache.

    Definition Classes
    CacheWrapperCache
  26. def stats(): CacheStats

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

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

    Definition Classes
    CacheWrapperCache
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. def toString(): String

    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Cache[K, V]

Inherited from AnyRef

Inherited from Any

Ungrouped