March 2010
Intermediate to advanced
408 pages
9h 59m
English
Enabling read through in Coherence requires the implementation of an interface called CacheLoader. The CacheLoader interface in its entirety is as follows:
public interface CacheLoader {
Object load(Object key);
Map loadAll(Collection keys);
}The load method is responsible for retrieving the value from the database, based on the specified key. The loadAll method accepts a collection of keys that may be bulk loaded; it returns a map of the keys and their corresponding values loaded from the database. If one of the requested keys does not exist in the database, that key should be excluded from the result map. As can be observed via the key-based API, read through will only work with key-based access, that is, queries executed ...
Read now
Unlock full access