Packages

abstract class Cache[K, V] extends javadsl.Cache[K, V]

API MAY CHANGE

General interface implemented by all akka-http cache implementations.

Self Type
Cache[K, V]
Annotations
@ApiMayChange() @DoNotInherit()
Source
Cache.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Cache
  2. Cache
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Cache()

Abstract Value Members

  1. abstract def apply(key: K, genValue: () ⇒ Future[V]): Future[V]

    Returns either the cached Future for the given key or evaluates the given value generating function producing a Future[V].

  2. abstract def clear(): Unit

    Clears the cache by removing all entries.

    Clears the cache by removing all entries.

    Definition Classes
    CacheCache
  3. abstract def get(key: K): Option[Future[V]]

    Retrieves the future instance that is currently in the cache for the given key.

    Retrieves the future instance that is currently in the cache for the given key. Returns None if the key has no corresponding cache entry.

  4. abstract def getOrLoad(key: K, loadValue: (K) ⇒ Future[V]): Future[V]

    Returns either the cached Future for the given key, or applies the given value loading function on the key, producing a Future[V].

  5. abstract def keys: Set[K]

    Returns the set of keys in the cache, in no particular order Should return in roughly constant time.

    Returns the set of keys in the cache, in no particular order Should return in roughly constant time. Note that this number might not reflect the exact keys of active, unexpired cache entries, since expired entries are only evicted upon next access (or by being thrown out by a capacity constraint).

  6. abstract def put(key: K, mayBeValue: Future[V])(implicit ex: ExecutionContext): Future[V]

    Cache the given future if not cached previously.

    Cache the given future if not cached previously. Or replace the old cached value on successful completion of given future. In case the given future fails, the previously cached value for that key (if any) will remain unchanged.

  7. abstract def remove(key: K): Unit

    Removes the cache item for the given key.

    Removes the cache item for the given key.

    Definition Classes
    CacheCache
  8. abstract def size(): Int

    Returns the upper bound for the number of currently cached entries.

    Returns the upper bound for the number of currently cached entries. Note that this number might not reflect the exact number of active, unexpired cache entries, since expired entries are only evicted upon next access (or by being thrown out by a capacity constraint).

    Definition Classes
    CacheCache

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from Cache[K, V] to any2stringadd[Cache[K, V]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Cache[K, V], B)
    Implicit
    This member is added by an implicit conversion from Cache[K, V] to ArrowAssoc[Cache[K, V]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def apply(key: K, f: (Promise[V]) ⇒ Unit): Future[V]

    Returns either the cached Future for the key or evaluates the given function which should lead to eventual completion of the promise.

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  9. def ensuring(cond: (Cache[K, V]) ⇒ Boolean, msg: ⇒ Any): Cache[K, V]
    Implicit
    This member is added by an implicit conversion from Cache[K, V] to Ensuring[Cache[K, V]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: (Cache[K, V]) ⇒ Boolean): Cache[K, V]
    Implicit
    This member is added by an implicit conversion from Cache[K, V] to Ensuring[Cache[K, V]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean, msg: ⇒ Any): Cache[K, V]
    Implicit
    This member is added by an implicit conversion from Cache[K, V] to Ensuring[Cache[K, V]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean): Cache[K, V]
    Implicit
    This member is added by an implicit conversion from Cache[K, V] to Ensuring[Cache[K, V]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Cache[K, V] to StringFormat[Cache[K, V]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  17. def get(key: K, block: () ⇒ V): Future[V]

    Returns either the cached Future for the given key or the given value as a Future

  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. final def getFuture(key: K, genValue: Creator[CompletionStage[V]]): CompletionStage[V]

    Returns either the cached CompletionStage for the given key or evaluates the given value generating function producing a CompletionStage<V>.

    Returns either the cached CompletionStage for the given key or evaluates the given value generating function producing a CompletionStage<V>.

    Definition Classes
    CacheCache
  20. def getKeys(): Set[K]

    Returns the set of keys in the cache, in no particular order Should return in roughly constant time.

    Returns the set of keys in the cache, in no particular order Should return in roughly constant time. Note that this number might not reflect the exact keys of active, unexpired cache entries, since expired entries are only evicted upon next access (or by being thrown out by a capacity constraint).

    Definition Classes
    CacheCache
  21. def getOptional(key: K): Optional[CompletionStage[V]]

    Retrieves the CompletionStage instance that is currently in the cache for the given key.

    Retrieves the CompletionStage instance that is currently in the cache for the given key. Returns None if the key has no corresponding cache entry.

    Definition Classes
    CacheCache
  22. def getOrCreateStrict(key: K, block: Creator[V]): CompletionStage[V]

    Returns either the cached CompletionStage for the given key or the given value as a CompletionStage

    Returns either the cached CompletionStage for the given key or the given value as a CompletionStage

    Definition Classes
    CacheCache
  23. final def getOrFulfil(key: K, f: Procedure[CompletableFuture[V]]): CompletionStage[V]

    Returns either the cached CompletionStage for the key, or evaluates the given function which should lead to eventual completion of the completable future.

    Returns either the cached CompletionStage for the key, or evaluates the given function which should lead to eventual completion of the completable future.

    Definition Classes
    CacheCache
  24. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  30. def toString(): String
    Definition Classes
    AnyRef → Any
  31. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  34. def [B](y: B): (Cache[K, V], B)
    Implicit
    This member is added by an implicit conversion from Cache[K, V] to ArrowAssoc[Cache[K, V]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from javadsl.Cache[K, V]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Cache[K, V] to any2stringadd[Cache[K, V]]

Inherited by implicit conversion StringFormat from Cache[K, V] to StringFormat[Cache[K, V]]

Inherited by implicit conversion Ensuring from Cache[K, V] to Ensuring[Cache[K, V]]

Inherited by implicit conversion ArrowAssoc from Cache[K, V] to ArrowAssoc[Cache[K, V]]

Ungrouped