| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="it"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_171) on Thu Jun 14 10:06:05 CEST 2018 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>PreparedQueryCache (OpenJPA Parent POM 3.0.0 API)</title> |
| <meta name="date" content="2018-06-14"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="PreparedQueryCache (OpenJPA Parent POM 3.0.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <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="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel"><span class="typeNameLink">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: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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="typeNameLabel">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-org.apache.openjpa.kernel.Query-org.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-java.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="simpleTagLabel">Since:</span></dt> |
| <dd>2.0.0</dd> |
| <dt><span class="simpleTagLabel">Author:</span></dt> |
| <dd>Pinaki Poddar</dd> |
| <dt><span class="seeLabel">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="memberSummary" 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"> </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 </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel">PreparedQueryCache.Exclusion</a></span></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="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#addExclusionPattern-java.lang.String-">addExclusionPattern</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> pattern)</code> |
| <div class="block">Adds the given pattern to the list of excluded patterns.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#cache-org.apache.openjpa.kernel.PreparedQuery-">cache</a></span>(<a href="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel">PreparedQuery</a> q)</code> |
| <div class="block">Cache the given PreparedQuery.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#clear--">clear</a></span>()</code> |
| <div class="block">Clears all cached queries.</div> |
| </td> |
| </tr> |
| <tr id="i3" 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><span class="memberNameLink"><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#get-java.lang.String-">get</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> id)</code> |
| <div class="block">Get the PreparedQuery with the given identifier if it exists. null |
| otherwise.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#getEnableStatistics--">getEnableStatistics</a></span>()</code> |
| <div class="block">Affirm if statistics is gathered.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<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><span class="memberNameLink"><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#getExcludes--">getExcludes</a></span>()</code> |
| <div class="block">Gets the exclusion patterns.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#getMapView--">getMapView</a></span>()</code> |
| <div class="block">Get a map view of the cached queries indexed by identifier.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/openjpa/kernel/QueryStatistics.html" title="interface in org.apache.openjpa.kernel">QueryStatistics</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#getStatistics--">getStatistics</a></span>()</code> |
| <div class="block">Gets the simple statistics for executed queries.</div> |
| </td> |
| </tr> |
| <tr id="i8" 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><span class="memberNameLink"><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#initialize-java.lang.String-java.lang.Object-">initialize</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> 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 id="i9" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#invalidate-java.lang.String-">invalidate</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> id)</code> |
| <div class="block">Remove the PreparedQuery with the given identifier from this cache.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#isCachable-java.lang.String-">isCachable</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> id)</code> |
| <div class="block">Affirms if a PreparedQuery can be cached against the given key.</div> |
| </td> |
| </tr> |
| <tr id="i11" 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><span class="memberNameLink"><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#isExcluded-java.lang.String-">isExcluded</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> id)</code> |
| <div class="block">Returns the exclusion status of if the given query key.</div> |
| </td> |
| </tr> |
| <tr id="i12" 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><span class="memberNameLink"><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#markUncachable-java.lang.String-org.apache.openjpa.kernel.PreparedQueryCache.Exclusion-">markUncachable</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> id, |
| <a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel">PreparedQueryCache.Exclusion</a> exclusion)</code> |
| <div class="block">Marks the given key as not amenable to caching.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#register-java.lang.String-org.apache.openjpa.kernel.Query-org.apache.openjpa.kernel.FetchConfiguration-">register</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, |
| <a href="../../../../org/apache/openjpa/kernel/Query.html" title="interface in org.apache.openjpa.kernel">Query</a> query, |
| <a href="../../../../org/apache/openjpa/kernel/FetchConfiguration.html" title="interface in org.apache.openjpa.kernel">FetchConfiguration</a> 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 id="i14" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#removeExclusionPattern-java.lang.String-">removeExclusionPattern</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> pattern)</code> |
| <div class="block">Removes the given pattern from the list of excluded patterns.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#setEnableStatistics-boolean-">setEnableStatistics</a></span>(boolean enable)</code> |
| <div class="block">Enable/disable gathering of statistics.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#setExcludes-java.lang.String-">setExcludes</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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 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://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a> register(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, |
| <a href="../../../../org/apache/openjpa/kernel/Query.html" title="interface in org.apache.openjpa.kernel">Query</a> query, |
| <a href="../../../../org/apache/openjpa/kernel/FetchConfiguration.html" title="interface in org.apache.openjpa.kernel">FetchConfiguration</a> 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="returnLabel">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> initialize(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> 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="paramLabel">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="returnLabel">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://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> 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 cache(<a href="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel">PreparedQuery</a> 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="returnLabel">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="seeLabel">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 invalidate(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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> get(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a> isCachable(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> id)</pre> |
| <div class="block">Affirms if a PreparedQuery can be cached against the given key.</div> |
| <dl> |
| <dt><span class="returnLabel">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> markUncachable(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> id, |
| <a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel">PreparedQueryCache.Exclusion</a> 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="paramLabel">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="returnLabel">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> isExcluded(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> id)</pre> |
| <div class="block">Returns the exclusion status of if the given query key.</div> |
| <dl> |
| <dt><span class="returnLabel">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://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel">PreparedQueryCache.Exclusion</a>> 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 setExcludes(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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 addExclusionPattern(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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 removeExclusionPattern(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#markUncachable-java.lang.String-org.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 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 setEnableStatistics(boolean 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 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><<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> 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> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <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="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel"><span class="typeNameLink">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: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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 © 2006–2018 <a href="http://www.apache.org">Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |