FutureFulfillingExpiringCache
This class is almost exactly like SelfFulfillingExpiringCache but the get method returns a Future[V] rather than a Option[V]. There is a corresponding change in the definition of the evaluationFunc function (passed in as a parameter).
Created by scalaprof on 4/5/16.
Type parameters
- K
-
they key type
- V
-
the value type
Value parameters
- carper
-
a (implicit) method which processes a String and returns Unit
- evaluationFunc
-
the method which, in the event of a key-value not being found, will result in an (optional) value
- executor
-
an (implicit) execution context
Attributes
- Graph
-
- Supertypes
Members list
Type members
Types
Define T as Future[V]
Define T as Future[V]
Attributes
Value members
Inherited methods
Composes two instances of Function1 in a new Function1, with this function applied first.
Composes two instances of Function1 in a new Function1, with this function applied first.
Type parameters
- A
-
the result type of function
g
Value parameters
- g
-
a function R => A
Attributes
- Returns
-
a new function
fsuch thatf(x) == g(apply(x)) - Inherited from:
- Function1
Return a V value for the given K value. This method is not normally called by users of a cache as it could result in an exception being thrown. Use get instead.
Return a V value for the given K value. This method is not normally called by users of a cache as it could result in an exception being thrown. Use get instead.
Value parameters
- k
-
the K value we are interested in
Attributes
- Returns
-
the corresponding V value
- Inherited from:
- AbstractFulfillingCache
Composes two instances of Function1 in a new Function1, with this function applied last.
Composes two instances of Function1 in a new Function1, with this function applied last.
Type parameters
- A
-
the type to which function
gcan be applied
Value parameters
- g
-
a function A => T1
Attributes
- Returns
-
a new function
fsuch thatf(x) == apply(g(x)) - Inherited from:
- Function1
Evaluate key k as an M[V]
Evaluate key k as an M[V]
Value parameters
- k
-
the key to be evaluated
Attributes
- Returns
-
a V wrapped in an M
- Inherited from:
- AbstractFulfillingCache
Non-blocking call to get the value v from the cache.
Non-blocking call to get the value v from the cache.
Value parameters
- k
-
the key of the element which we wish to get
Attributes
- Returns
-
the value wrapped as a T
- Inherited from:
- Fulfilling
Attributes
- Inherited from:
- AbstractFulfillingCache
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
- Inherited from:
- AbstractFulfillingCache
Method to unwrap a value of type M[V].
Method to unwrap a value of type M[V].
Value parameters
- vm
-
the M[V] value to be unwrapped
Attributes
- Returns
-
the unwrapped V value
- Inherited from:
- AbstractFulfillingCache
Inherited and Abstract methods
method to remove a key from the cache
method to remove a key from the cache
Value parameters
- k
-
the key to the element which is to be expired.
Attributes
- Inherited from:
- Expiring
method to take action whenever a key value is actually fulfilled.
method to take action whenever a key value is actually fulfilled.
Value parameters
- k
-
the key of the element which has been fulfilled
- v
-
the value of the element which has been fulfilled
Attributes
- Inherited from:
- Fulfilling