18. JSR 107
/**
* Type of Expiry
*/
public enum ExpiryType {
/**
* Time since last modified. Creation is also considered a modification
event.
*/
MODIFIED,
/**
* Time since last <em>accessed</em>. Access means any access to an entry
including
* a modification event. Examples are:
* <ul>
* <li>put</li>
* <li>get</li>
* <li>containsKey</li>
* <li>iteration</li>
* </ul>
*
*/
ACCESSED
}
18
23. Cache as a s-o-r : Read through
Database
Application
Ehcache
Persistence layer
#CodeMotion @MathildeLemee
24. public interface CacheLoader<K, V> {
/**
* Loads an object. Application developers should implement this
* method to customize the loading of a value for a cache entry.
This method
* is called by a cache when a requested entry is not in the
cache. If
* the object can't be loaded <code>null</code> should be
returned.
*/
V load(K key) throws CacheLoaderException;
/**
* Loads multiple objects. Application developers should
implement this
* method to customize the loading of cache entries. This method
is called
* when the requested object is not in the cache. If an object
can't be loaded,
* it is not returned in the resulting map.
*/
Map<K, V> loadAll(Iterable<? extends K> keys) throws
CacheLoaderException;
}
24
25. Cache as a s-o-r : Write through
Database
Application
Ehcache
Persistence layer
#CodeMotion @MathildeLemee
63. “Event processing is a
method of tracking and
analyzing (processing)
streams of information (data)
about things that happen
(events),[1] and deriving a
conclusion from them”#CodeMotion @MathildeLemee