blob: 35978947a05a5a3dd5145ce69b6b46cdf12f29fc [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="de">
<head>
<!-- Generated by javadoc (version 1.7.0_79) on Mon Mar 21 21:59:40 CET 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PreparedQueryCache (OpenJPA Parent POM 2.4.1 API)</title>
<meta name="date" content="2016-03-21">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="PreparedQueryCache (OpenJPA Parent POM 2.4.1 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PreparedQueryCache.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/openjpa/kernel/PreparedQueryCache.html" target="_top">Frames</a></li>
<li><a href="PreparedQueryCache.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.openjpa.kernel</div>
<h2 title="Interface PreparedQueryCache" class="title">Interface PreparedQueryCache</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="../../../../org/apache/openjpa/lib/conf/Configurable.html" title="interface in org.apache.openjpa.lib.conf">Configurable</a></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.html" title="class in org.apache.openjpa.jdbc.kernel">PreparedQueryCacheImpl</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="strong">PreparedQueryCache</span>
extends <a href="../../../../org/apache/openjpa/lib/conf/Configurable.html" title="interface in org.apache.openjpa.lib.conf">Configurable</a></pre>
<div class="block">A cache to create and maintain <a href="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel"><code>prepared queries</code></a>.
To cache a PreparedQuery is two-stage process. In the first stage,
<a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#register(java.lang.String,%20org.apache.openjpa.kernel.Query,%20org.apache.openjpa.kernel.FetchConfiguration)"><code>register(String, Query, FetchConfiguration)</code></a> register}
an identification key and a compiled Query Q to create a
hollow PreparedQuery instance P in the cache. In the second stage, after Q
executes, <a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#initialize(java.lang.String,%20java.lang.Object)"><code>initialize(String, Object)</code></a> initialize} the hollow
Prepared Query P from the result of execution such as the target
database query PQ and its parameters. After initialization, P can
be used with re-parameterization for subsequent execution of the original
Query Q.
The target database query PQ associated to a cached prepared query P
<em>may</em> depend upon query execution context such as fetch plan or
lock group. This cache, by design, does not monitor the context or
automatically invalidate an entry P when the original query Q is executed
with context parameters that affect the target query PQ.
The user must notify this receiver to invalidate a cached entry P when
execution context changes in a way that will modify the resultant database
language query PQ.
One of the built-in mechanism (available in JPA facade) is to set query hints
to either invalidate the query entirely or ignore the cached version for the
current execution.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>2.0.0</dd>
<dt><span class="strong">Author:</span></dt>
<dd>Pinaki Poddar</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/openjpa/kernel/QueryHints.html#HINT_IGNORE_PREPARED_QUERY"><code>QueryHints.HINT_IGNORE_PREPARED_QUERY</code></a>,
<a href="../../../../org/apache/openjpa/kernel/QueryHints.html#HINT_INVALIDATE_PREPARED_QUERY"><code>This cache allows customization of whether a query can be cached or not
via either explicit marking of certain keys as non-cachable (which is
irreversible or <em>strong</em>) or addition/removal of exclusion patterns
(which is reversible or <em>weak</em>).</code></a>,
<code>#markUncachable(String)</code>,
<a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#addExclusionPattern(java.lang.String)"><code>addExclusionPattern(String)</code></a>,
<a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#setExcludes(java.lang.String)"><code>setExcludes(String)</code></a>,
<a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#removeExclusionPattern(java.lang.String)"><code>removeExclusionPattern(String)</code></a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Interface and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel">PreparedQueryCache.Exclusion</a></strong></code>
<div class="block">A structure to describe the strength and reason for excluding a query from the cache.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#addExclusionPattern(java.lang.String)">addExclusionPattern</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;pattern)</code>
<div class="block">Adds the given pattern to the list of excluded patterns.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#cache(org.apache.openjpa.kernel.PreparedQuery)">cache</a></strong>(<a href="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel">PreparedQuery</a>&nbsp;q)</code>
<div class="block">Cache the given PreparedQuery.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#clear()">clear</a></strong>()</code>
<div class="block">Clears all cached queries.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel">PreparedQuery</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#get(java.lang.String)">get</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id)</code>
<div class="block">Get the PreparedQuery with the given identifier if it exists. null
otherwise.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#getEnableStatistics()">getEnableStatistics</a></strong>()</code>
<div class="block">Affirm if statistics is gathered.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel">PreparedQueryCache.Exclusion</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#getExcludes()">getExcludes</a></strong>()</code>
<div class="block">Gets the exclusion patterns.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#getMapView()">getMapView</a></strong>()</code>
<div class="block">Get a map view of the cached queries indexed by identifier.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/openjpa/kernel/QueryStatistics.html" title="interface in org.apache.openjpa.kernel">QueryStatistics</a>&lt;<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#getStatistics()">getStatistics</a></strong>()</code>
<div class="block">Gets the simple statistics for executed queries.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel">PreparedQuery</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#initialize(java.lang.String,%20java.lang.Object)">initialize</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key,
<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;executionResult)</code>
<div class="block">Initialize the cached Prepared Query registered with the given
key earlier by the given execution result.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#invalidate(java.lang.String)">invalidate</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id)</code>
<div class="block">Remove the PreparedQuery with the given identifier from this cache.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#isCachable(java.lang.String)">isCachable</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id)</code>
<div class="block">Affirms if a PreparedQuery can be cached against the given key.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel">PreparedQueryCache.Exclusion</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#isExcluded(java.lang.String)">isExcluded</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id)</code>
<div class="block">Returns the exclusion status of if the given query key.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel">PreparedQuery</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#markUncachable(java.lang.String,%20org.apache.openjpa.kernel.PreparedQueryCache.Exclusion)">markUncachable</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id,
<a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel">PreparedQueryCache.Exclusion</a>&nbsp;exclusion)</code>
<div class="block">Marks the given key as not amenable to caching.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#register(java.lang.String,%20org.apache.openjpa.kernel.Query,%20org.apache.openjpa.kernel.FetchConfiguration)">register</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key,
<a href="../../../../org/apache/openjpa/kernel/Query.html" title="interface in org.apache.openjpa.kernel">Query</a>&nbsp;query,
<a href="../../../../org/apache/openjpa/kernel/FetchConfiguration.html" title="interface in org.apache.openjpa.kernel">FetchConfiguration</a>&nbsp;hints)</code>
<div class="block">Register the given query for caching against the given key if it has not
already been cached.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#removeExclusionPattern(java.lang.String)">removeExclusionPattern</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;pattern)</code>
<div class="block">Removes the given pattern from the list of excluded patterns.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#setEnableStatistics(boolean)">setEnableStatistics</a></strong>(boolean&nbsp;enable)</code>
<div class="block">Enable/disable gathering of statistics.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#setExcludes(java.lang.String)">setExcludes</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;excludes)</code>
<div class="block">Sets one or more exclusion regular expression patterns separated by
semicolon.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.openjpa.lib.conf.Configurable">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.openjpa.lib.conf.<a href="../../../../org/apache/openjpa/lib/conf/Configurable.html" title="interface in org.apache.openjpa.lib.conf">Configurable</a></h3>
<code><a href="../../../../org/apache/openjpa/lib/conf/Configurable.html#endConfiguration()">endConfiguration</a>, <a href="../../../../org/apache/openjpa/lib/conf/Configurable.html#setConfiguration(org.apache.openjpa.lib.conf.Configuration)">setConfiguration</a>, <a href="../../../../org/apache/openjpa/lib/conf/Configurable.html#startConfiguration()">startConfiguration</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="register(java.lang.String, org.apache.openjpa.kernel.Query, org.apache.openjpa.kernel.FetchConfiguration)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>register</h4>
<pre><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a>&nbsp;register(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key,
<a href="../../../../org/apache/openjpa/kernel/Query.html" title="interface in org.apache.openjpa.kernel">Query</a>&nbsp;query,
<a href="../../../../org/apache/openjpa/kernel/FetchConfiguration.html" title="interface in org.apache.openjpa.kernel">FetchConfiguration</a>&nbsp;hints)</pre>
<div class="block">Register the given query for caching against the given key if it has not
already been cached. If the query can not be cached, then mark it as such
to avoid computing for the same key again.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>TRUE the query is registered in the cache by this call
null if the query is already registered in the cache
FALSE if can not be registered in the cache, either because
it is known not to be cacheable from a previous attempt or
a hint is given to ignore the cached version.</dd></dl>
</li>
</ul>
<a name="initialize(java.lang.String, java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>initialize</h4>
<pre><a href="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel">PreparedQuery</a>&nbsp;initialize(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key,
<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;executionResult)</pre>
<div class="block">Initialize the cached Prepared Query registered with the given
key earlier by the given execution result. If it is not possible to
initialize the Prepared Query from the given execution result, then
the corresponding key will be marked as invalid for caching.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key used during registration</dd><dd><code>executionResult</code> - an opaque instance carrying the execution result
of the original query.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the initialized Prepared Query. If it is not possible to
initialize the cached, possibly hollow Prepared Query from the given
result, return null.</dd></dl>
</li>
</ul>
<a name="getMapView()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMapView</h4>
<pre><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;getMapView()</pre>
<div class="block">Get a map view of the cached queries indexed by identifier.</div>
</li>
</ul>
<a name="cache(org.apache.openjpa.kernel.PreparedQuery)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cache</h4>
<pre>boolean&nbsp;cache(<a href="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel">PreparedQuery</a>&nbsp;q)</pre>
<div class="block">Cache the given PreparedQuery.
The key is the identifier of the given PreparedQuery itself.
The query must not be cached if either the key matches any exclusion
pattern or the key has been marked non-cachable.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if the given query is cached. false if it can not be cached
due to exclusion.</dd><dt><span class="strong">See Also:</span></dt><dd><code>#markUncachable(String)</code>,
<a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#setExcludes(java.lang.String)"><code>setExcludes(String)</code></a>,
<a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#addExclusionPattern(java.lang.String)"><code>addExclusionPattern(String)</code></a></dd></dl>
</li>
</ul>
<a name="invalidate(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>invalidate</h4>
<pre>boolean&nbsp;invalidate(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id)</pre>
<div class="block">Remove the PreparedQuery with the given identifier from this cache.</div>
</li>
</ul>
<a name="get(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>get</h4>
<pre><a href="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel">PreparedQuery</a>&nbsp;get(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id)</pre>
<div class="block">Get the PreparedQuery with the given identifier if it exists. null
otherwise.</div>
</li>
</ul>
<a name="isCachable(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isCachable</h4>
<pre><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a>&nbsp;isCachable(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id)</pre>
<div class="block">Affirms if a PreparedQuery can be cached against the given key.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Boolean.FALSE if the given key is explicitly marked before as not
be cached or matches any of the exclusion patterns.
Boolean.TRUE if the given key currently exists in the cache.
Otherwise, return null implying this receiver can not determine whether
this key can be cached on not.</dd></dl>
</li>
</ul>
<a name="markUncachable(java.lang.String, org.apache.openjpa.kernel.PreparedQueryCache.Exclusion)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>markUncachable</h4>
<pre><a href="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel">PreparedQuery</a>&nbsp;markUncachable(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id,
<a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel">PreparedQueryCache.Exclusion</a>&nbsp;exclusion)</pre>
<div class="block">Marks the given key as not amenable to caching.
Explicit marking helps to avoid repeated computational cost of
determining whether a query can be cached or not.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>id</code> - is the key to be excluded</dd><dd><code>exclusion</code> - directs whether exclusion is irreversible or not.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The value for the given key if it had been cached before. null
otherwise.</dd></dl>
</li>
</ul>
<a name="isExcluded(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isExcluded</h4>
<pre><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel">PreparedQueryCache.Exclusion</a>&nbsp;isExcluded(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id)</pre>
<div class="block">Returns the exclusion status of if the given query key.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>null implies that the key is not excluded.</dd></dl>
</li>
</ul>
<a name="getExcludes()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getExcludes</h4>
<pre><a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel">PreparedQueryCache.Exclusion</a>&gt;&nbsp;getExcludes()</pre>
<div class="block">Gets the exclusion patterns.</div>
</li>
</ul>
<a name="setExcludes(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setExcludes</h4>
<pre>void&nbsp;setExcludes(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;excludes)</pre>
<div class="block">Sets one or more exclusion regular expression patterns separated by
semicolon. Any existing cache entry whose key matches any of the given
pattern will be marked non-cachable in a reversible manner.</div>
</li>
</ul>
<a name="addExclusionPattern(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addExclusionPattern</h4>
<pre>void&nbsp;addExclusionPattern(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;pattern)</pre>
<div class="block">Adds the given pattern to the list of excluded patterns. Any existing
cache entry whose key matches the given pattern will be marked
non-cachable in a reversible manner.</div>
</li>
</ul>
<a name="removeExclusionPattern(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeExclusionPattern</h4>
<pre>void&nbsp;removeExclusionPattern(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;pattern)</pre>
<div class="block">Removes the given pattern from the list of excluded patterns.
Any excluded key that matches the given pattern can now be cached
again, unless it has been marked non-cachable explicitly.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#markUncachable(java.lang.String,%20org.apache.openjpa.kernel.PreparedQueryCache.Exclusion)"><code>markUncachable(String, Exclusion)</code></a></dd></dl>
</li>
</ul>
<a name="clear()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre>void&nbsp;clear()</pre>
<div class="block">Clears all cached queries.</div>
</li>
</ul>
<a name="setEnableStatistics(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEnableStatistics</h4>
<pre>void&nbsp;setEnableStatistics(boolean&nbsp;enable)</pre>
<div class="block">Enable/disable gathering of statistics.</div>
</li>
</ul>
<a name="getEnableStatistics()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEnableStatistics</h4>
<pre>boolean&nbsp;getEnableStatistics()</pre>
<div class="block">Affirm if statistics is gathered.</div>
</li>
</ul>
<a name="getStatistics()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getStatistics</h4>
<pre><a href="../../../../org/apache/openjpa/kernel/QueryStatistics.html" title="interface in org.apache.openjpa.kernel">QueryStatistics</a>&lt;<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;getStatistics()</pre>
<div class="block">Gets the simple statistics for executed queries.
If the statistics gathering is disabled, an empty statistics is returned.</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PreparedQueryCache.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/openjpa/kernel/PreparedQueryCache.html" target="_top">Frames</a></li>
<li><a href="PreparedQueryCache.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2006&#x2013;2016 <a href="http://www.apache.org">Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>