public class QueryResultsCachePolicy
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
org.eclipse.persistence.queries.ReadQuery#setQueryCachePolicy(QueryResultsCachePolicy)
, Serialized FormConstructor and Description |
---|
QueryResultsCachePolicy()
PUBLIC: Build a QueryResultsCachePolicy with the default settings By default there is no invalidation of query results and the maximum number of results sets is 100.
|
QueryResultsCachePolicy(CacheInvalidationPolicy policy)
PUBLIC: Build a QueryResultsCachePolicy and supply a CacheInvalidationPolicy.
|
QueryResultsCachePolicy(CacheInvalidationPolicy policy, int maximumResultSets)
PUBLIC: Build a QueryResultsCachePolicy and supply a CacheInvalidationPolicy and a maximum number of results sets.
|
QueryResultsCachePolicy(int maximumResultSets)
PUBLIC: Build a QueryResultsCachePolicy and supply a maximum for the number of results sets.
|
Modifier and Type | Method and Description |
---|---|
QueryResultsCachePolicy |
clone() |
CacheInvalidationPolicy |
getCacheInvalidationPolicy()
PUBLIC: Return the query cache invalidation policy.
|
java.lang.Class |
getCacheType()
PUBLIC: Return the type of the cache used for the query results.
|
boolean |
getInvalidateOnChange()
PUBLIC: Return if any change to any object of the query class should cause the query results to be invalidated.
|
java.util.Set<java.lang.Class> |
getInvalidationClasses()
ADVANCED: Return the set of classes that should trigger the query cached results to be invalidated.
|
int |
getMaximumCachedResults()
PUBLIC: Return the maximum cached results.
|
boolean |
isNullIgnored()
PUBLIC: Return if null results should be cached or ignored.
|
void |
setCacheInvalidationPolicy(CacheInvalidationPolicy invalidationPolicy)
PUBLIC: Set the query cache invalidation policy.
|
void |
setCacheType(java.lang.Class cacheType)
PUBLIC: Set the type of the cache used for the query results.
|
void |
setInvalidateOnChange(boolean invalidateOnChange)
PUBLIC: Configure if any change to any object of the query class should cause the query results to be invalidated.
|
void |
setInvalidationClasses(java.util.Set<java.lang.Class> invalidationClasses)
ADVANCED: Set the set of classes that should trigger the query cached results to be invalidated.
|
void |
setIsNullIgnored(boolean isNullIgnored)
PUBLIC: Set if null results should be cached or ignored.
|
void |
setMaximumCachedResults(int maximumResultSets)
PUBLIC: Set the maximum cached results.
|
void |
useFullCache()
PUBLIC: Set the type of the cache used for the query results to a FullIdentityMap.
|
void |
useLRUCache()
PUBLIC: Set the type of the cache used for the query results to a CacheIdentityMap.
|
void |
useSoftCache()
PUBLIC: Set the type of the cache used for the query results to a SoftIdentityMap.
|
void |
useSoftLRUCache()
PUBLIC: Set the type of the cache used for the query results to a SoftCacheWeakIdentityMap.
|
public QueryResultsCachePolicy()
public QueryResultsCachePolicy(CacheInvalidationPolicy policy, int maximumResultSets)
CacheInvalidationPolicy
public QueryResultsCachePolicy(CacheInvalidationPolicy policy)
CacheInvalidationPolicy
public QueryResultsCachePolicy(int maximumResultSets)
public QueryResultsCachePolicy clone()
clone
in class java.lang.Object
public java.util.Set<java.lang.Class> getInvalidationClasses()
public void setInvalidationClasses(java.util.Set<java.lang.Class> invalidationClasses)
public boolean isNullIgnored()
public void setIsNullIgnored(boolean isNullIgnored)
public boolean getInvalidateOnChange()
public void setInvalidateOnChange(boolean invalidateOnChange)
public java.lang.Class getCacheType()
public void setCacheType(java.lang.Class cacheType)
public void useFullCache()
public void useSoftCache()
public void useSoftLRUCache()
public void useLRUCache()
public CacheInvalidationPolicy getCacheInvalidationPolicy()
public void setCacheInvalidationPolicy(CacheInvalidationPolicy invalidationPolicy)
public int getMaximumCachedResults()
public void setMaximumCachedResults(int maximumResultSets)