Package com.scaleout.client.caching
Interface ValueFactory<K,V>
- Type Parameters:
K
- the key type.V
- the value type.
public interface ValueFactory<K,V>
Call back used to load objects into a
Cache
.-
Method Summary
-
Method Details
-
create
Creates aValueFactoryResult
based on the key. This is called whenServiceEvents.setLoadObjectHandler(Cache, ValueFactory)
fires an event, supplied toCache.readOrAdd(Object, ValueFactory, ReadPolicy)
and the object doesn't exist, orCache.readOrAddAsync(Object, ValueFactory, ReadPolicy)
and the object doesn't exist.- Parameters:
key
- the key.- Returns:
- the value factory result.
-