Top Description Interfaces Classes
[default module]

Package javax.cache.integration


This package contains interfaces for integration.

It contains the javax.cache.integration.CacheLoader and javax.cache.integration.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 javax.cache.Cache#loadAll(java.util.Set, boolean, CompletionListener) method.

Author
Greg Luck
Since
1.0

Interface Summary

Modifier and TypeInterface and Description
public interface
CacheLoader<
the type of keys handled by this loader
K
,
the type of values generated by this loader
V
>

Used when a cache is read-through or when loading data into a cache via the javax.cache.Cache#loadAll(java.util.Set, boolean, CompletionListener) method.

public interface
CacheWriter<
the type of keys maintained by this map
K
,
the type of mapped values
V
>

A CacheWriter is used for write-through to an external resource.

public interface
CompletionListener

A CompletionListener is implemented by an application when it needs to be notified of the completion of some Cache operation.

Class Summary

Modifier and TypeClass and Description
public class
CacheLoaderException

An exception to indicate a problem has occurred executing a CacheLoader.

public class
CacheWriterException

An exception to indicate a problem has occurred executing a CacheWriter.

public class
CompletionListenerFuture

A CompletionListenerFuture is a CompletionListener implementation that supports being used as a Future.