|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface BackingStore
Provides a means for a NamedCache to interact with a backing store (such as a database) to perform read-through, write-though, refresh-ahead,
and write-behind operations. To add backing store interaction, register a class implementing this interface by calling
NamedCache.setBackingStoreAdapter(BackingStore, BackingStorePolicy).
| Method Summary | ||
|---|---|---|
void |
erase(CachedObjectId id)
Removes an object from the backing store. |
|
CreatePolicy |
getCreatePolicy(CachedObjectId id)
Provides a policy object to be used when a load() operation inserts an object into the NamedCache. |
|
|
load(CachedObjectId<T> id)
Loads an object from the backing store. |
|
|
store(CachedObjectId<T> id,
T value)
Persists an object to the backing store. |
|
| Method Detail |
|---|
<T extends Serializable> T load(CachedObjectId<T> id)
null if there is no value in the backing store for the specified id.
id - The identifier of the object to retrieve.
<T extends Serializable> void store(CachedObjectId<T> id,
T value)
id - The identifier of the object to persist.value - The cached object to be written to the backing store.void erase(CachedObjectId id)
id - The identifier of the object to delete.CreatePolicy getCreatePolicy(CachedObjectId id)
NamedCache. If the method returns
null then the NamedCache's default CreatePolicy will be used.
id - The identifier of the object to be loaded into the cache.
null if the NamedCache's
NamedCache.DefaultCreatePolicy is to be used.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||