Interface Cache
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.- Since:
- Java Persistence 2.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether the cache contains data for the given entity.voidRemove the data for entities of the specified class (and its subclasses) from the cache.voidRemove the data for the given entity from the cache.voidevictAll()Clear the cache.
-
Method Details
-
contains
-
evict
-
evict
Remove the data for entities of the specified class (and its subclasses) from the cache.- Parameters:
cls- entity class
-
evictAll
void evictAll()Clear the cache.
-