|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value=TYPE) @Retention(value=RUNTIME) public @interface CacheStrategy
Specify the default cache use specific entity type.
Optional Element Summary | |
---|---|
boolean |
readOnly
When set to true the beans returned from the cache will be treated as readOnly (effectively immutable) and this means they can be safely shared by many users. |
boolean |
useBeanCache
When set to true the bean cache will be used unless explicitly stated not to in a query via Query.setUseCache(boolean) . |
String |
warmingQuery
Specify a query that can be used to warm the cache. |
public abstract boolean useBeanCache
Query.setUseCache(boolean)
.
public abstract boolean readOnly
If this is false then a copy of the bean is given back to the application and so the application code that modify that bean.
If you try to modify a readOnly bean it will throw an IllegalStateException.
public abstract String warmingQuery
All the beans fetched by this query will be loaded into the bean cache and the query itself will be loaded into the query cache.
The warming query will typically be executed at startup time after a short delay (defaults to a 30 seconds delay).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |