|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Cache
Interface used to interact with the second-level cache.
If a cache is not in use, the methods of this interface have
no effect, except for contains
, which returns false.
Method Summary | ||
---|---|---|
boolean |
contains(java.lang.Class cls,
java.lang.Object primaryKey)
Whether the cache contains data for the given entity. |
|
void |
evict(java.lang.Class cls)
Remove the data for entities of the specified class (and its subclasses) from the cache. |
|
void |
evict(java.lang.Class cls,
java.lang.Object primaryKey)
Remove the data for the given entity from the cache. |
|
void |
evictAll()
Clear the cache. |
|
|
unwrap(java.lang.Class<T> cls)
Return an object of the specified type to allow access to the provider-specific API. |
Method Detail |
---|
boolean contains(java.lang.Class cls, java.lang.Object primaryKey)
cls
- entity classprimaryKey
- primary key
void evict(java.lang.Class cls, java.lang.Object primaryKey)
cls
- entity classprimaryKey
- primary keyvoid evict(java.lang.Class cls)
cls
- entity classvoid evictAll()
<T> T unwrap(java.lang.Class<T> cls)
cls
- the class of the object to be returned. This is normally either the
underlying Cache implementation class or an interface that it implements.
PersistenceException
- if the provider does not support the call
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |