Package javax.cache.integration
This package contains interfaces for integration.
It contains the CacheLoader
and
CacheWriter
interfaces that
allow loading from and writing to other systems respectively.
A cache with a registered loader can be configured as a read-through cache, so that access will automatically load missing entries. And similarly a cache with a registered writer can be configured as a write-through cache, so that changes are written through to an underlying system.
In addition a common idiom is to use a loader to initially
populate or refresh a cache. For that purpose there is the
Cache.loadAll(java.util.Set, boolean, CompletionListener)
method.
- Since:
- 1.0
-
Interface Summary Interface Description CacheLoader<K,V> Used when a cache is read-through or when loading data into a cache via theCache.loadAll(java.util.Set, boolean, CompletionListener)
method.CacheWriter<K,V> A CacheWriter is used for write-through to an external resource.CompletionListener A CompletionListener is implemented by an application when it needs to be notified of the completion of some Cache operation. -
Class Summary Class Description CompletionListenerFuture A CompletionListenerFuture is a CompletionListener implementation that supports being used as a Future. -
Exception Summary Exception Description CacheLoaderException An exception to indicate a problem has occurred executing aCacheLoader
.CacheWriterException An exception to indicate a problem has occurred executing aCacheWriter
.