|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value=TYPE) @Retention(value=RUNTIME) public @interface Cache
The Cache annotation is used to configure the EclipseLink object cache. By default EclipseLink uses a shared object cache to cache all objects. The caching type and options can be configured on a per class basis to allow optimal caching.
This includes options for configuring the type of caching, setting the size, disabling the shared cache, expiring objects, refreshing, and cache coordination (clustering).
A Cache annotation may be defined on an Entity or MappedSuperclass. In the case of inheritance, a Cache annotation should only be defined on the root of the inheritance hierarchy.
CacheType
,
CacheCoordinationType
,
ClassDescriptor
,
CacheInvalidationPolicy
Optional Element Summary | |
---|---|
boolean |
alwaysRefresh
(Optional) Force all queries that go to the database to always refresh the cache. |
CacheCoordinationType |
coordinationType
(Optional) The cache coordination mode. |
boolean |
disableHits
(Optional) Setting to true will force all queries to bypass the cache for hits but still resolve against the cache for identity. |
int |
expiry
(Optional) Expire cached instance after a fix period of time (ms). |
TimeOfDay |
expiryTimeOfDay
(Optional) Expire cached instance a specific time of day. |
CacheIsolationType |
isolation
(Optional) Controls the level of caching this Entity will use. |
boolean |
refreshOnlyIfNewer
(Optional) For all queries that go to the database, refresh the cache only if the data received from the database by a query is newer than the data in the cache (as determined by the optimistic locking field). |
boolean |
shared
Deprecated. As of Eclipselink 2.2. See the attribute 'isolation' |
int |
size
(Optional) The size of cache to use. |
CacheType |
type
(Optional) The type of cache to use. |
public abstract CacheType type
public abstract int size
@Deprecated public abstract boolean shared
public abstract CacheIsolationType isolation
CacheIsolationType
public abstract int expiry
public abstract TimeOfDay expiryTimeOfDay
public abstract boolean alwaysRefresh
public abstract boolean refreshOnlyIfNewer
public abstract boolean disableHits
public abstract CacheCoordinationType coordinationType
|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |