public class QueryResultsCachePolicy
extends java.lang.Object
implements java.io.Serializable
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 |
---|---|
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.
|
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 |
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 boolean isNullIgnored()
public void setIsNullIgnored(boolean isNullIgnored)
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)