Package com.db4o.internal.caching
Interface Cache4<K,V>
-
- All Superinterfaces:
java.lang.Iterable<V>
- All Known Subinterfaces:
PurgeableCache4<K,V>
- All Known Implementing Classes:
CacheStatistics,NullCache4
public interface Cache4<K,V> extends java.lang.Iterable<V>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Vproduce(K key, Function4<K,V> producer, Procedure4<V> finalizer)Retrieves the value associated to thekeyfrom the cache.
-
-
-
Method Detail
-
produce
V produce(K key, Function4<K,V> producer, Procedure4<V> finalizer)
Retrieves the value associated to thekeyfrom the cache. If the value is not yet cachedproducerwill be called to produce it. If the cache needs to discard a valuefinalizerwill be given a chance to process it.- Parameters:
key- the key for the value - must never change - cannot be nullproducer- will be called if value not yet in the cache - can only be null when the value is found in the cachefinalizer- will be called if a page needs to be discarded - can be null- Returns:
- the cached value
-
-