|
EclipseLink1.0 - 20080707 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 set an org.eclipse.persistence.descriptors.invalidation.CacheInvalidationPolicy which sets objects in TopLink's identity maps to be invalid following given rules. By default in TopLink, objects do not expire in the cache. Several different policies are available to allow objects to expire.
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.
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. |
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
(Optional) Cached instances in the shared cache or a client isolated cache. |
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
public abstract boolean shared
public abstract int expiry
public abstract TimeOfDay expiryTimeOfDay
public abstract boolean alwaysRefresh
public abstract boolean refreshOnlyIfNewer
public abstract boolean disableHits
public abstract CacheCoordinationType coordinationType
|
EclipseLink1.0 - 20080707 API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |