Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

B32476-03

oracle.toplink.queryframework
Class QueryResultsCachePolicy

java.lang.Object
  extended by oracle.toplink.queryframework.QueryResultsCachePolicy
All Implemented Interfaces:
java.io.Serializable

public class QueryResultsCachePolicy
extends java.lang.Object
implements java.io.Serializable

A QueryResultsCache policy dicates how a query's results will be cached. It allows an invalidation policy and a maximum number of results to be set. Query results are cached based on the parameter values of a query, and the maximum number of results refers to the maxmium number of parameter sets results will be ached for.

See Also:
oracle.toplink.queryframework.ReadQuery#setQueryCachePolicy(QueryResultsCachePolicy), Serialized Form

Constructor Summary
QueryResultsCachePolicy()
          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)
          Build a QueryResultsCachePolicy and supply a CacheInvalidationPolicy.
QueryResultsCachePolicy(CacheInvalidationPolicy policy, int maximumResultSets)
          Build a QueryResultsCachePolicy and supply a CacheInvalidationPolicy and a maximum number of results sets.
QueryResultsCachePolicy(int maximumResultSets)
          Build a QueryResultsCachePolicy and supply a maximum for the number of results sets.
 
Method Summary
 CacheInvalidationPolicy getCacheInvalidationPolicy()
          Return the query cache invalidation policy.
 int getMaximumCachedResults()
          Return the maximum cached results.
 void setCacheInvalidationPolicy(CacheInvalidationPolicy invalidationPolicy)
          Set the query cache invalidation policy.
 void setMaximumCachedResults(int maximumResultSets)
          Set the maximum cached results.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryResultsCachePolicy

public QueryResultsCachePolicy()
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

public QueryResultsCachePolicy(CacheInvalidationPolicy policy,
                               int maximumResultSets)
Build a QueryResultsCachePolicy and supply a CacheInvalidationPolicy and a maximum number of results sets.

See Also:
CacheInvalidationPolicy

QueryResultsCachePolicy

public QueryResultsCachePolicy(CacheInvalidationPolicy policy)
Build a QueryResultsCachePolicy and supply a CacheInvalidationPolicy. The default value of 100 will be used for the maximum number of result sets

See Also:
CacheInvalidationPolicy

QueryResultsCachePolicy

public QueryResultsCachePolicy(int maximumResultSets)
Build a QueryResultsCachePolicy and supply a maximum for the number of results sets. Results will be set not to expire in the cache.

Method Detail

getCacheInvalidationPolicy

public CacheInvalidationPolicy getCacheInvalidationPolicy()
Return the query cache invalidation policy. The cache invalidation policy defines how the query results are invalidated.


setCacheInvalidationPolicy

public void setCacheInvalidationPolicy(CacheInvalidationPolicy invalidationPolicy)
Set the query cache invalidation policy. The cache invalidation policy defines how the query results are invalidated.


getMaximumCachedResults

public int getMaximumCachedResults()
Return the maximum cached results. This defines the number of query result sets that will be cached. The LRU query results will be discarded when the max size is reached.


setMaximumCachedResults

public void setMaximumCachedResults(int maximumResultSets)
Set the maximum cached results. This defines the number of query result sets that will be cached. The LRU query results will be discarded when the max size is reached.


Copyright © 1998, 2010, Oracle. All Rights Reserved.