<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<!--NewPage--> | |
<HTML> | |
<HEAD> | |
<!-- Generated by javadoc (build 1.6.0_11) on Wed Jul 20 09:13:18 CDT 2011 --> | |
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<TITLE> | |
PreparedQueryCache (OpenJPA Parent POM 2.1.1 API) | |
</TITLE> | |
<META NAME="date" CONTENT="2011-07-20"> | |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> | |
<SCRIPT type="text/javascript"> | |
function windowTitle() | |
{ | |
if (location.href.indexOf('is-external=true') == -1) { | |
parent.document.title="PreparedQueryCache (OpenJPA Parent POM 2.1.1 API)"; | |
} | |
} | |
</SCRIPT> | |
<NOSCRIPT> | |
</NOSCRIPT> | |
</HEAD> | |
<BODY BGCOLOR="white" onload="windowTitle();"> | |
<HR> | |
<!-- ========= START OF TOP NAVBAR ======= --> | |
<A NAME="navbar_top"><!-- --></A> | |
<A HREF="#skip-navbar_top" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_top_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PreparedQueryCache.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel"><B>PREV CLASS</B></A> | |
<A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../index.html?org/apache/openjpa/kernel/PreparedQueryCache.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="PreparedQueryCache.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_top"></A> | |
<!-- ========= END OF TOP NAVBAR ========= --> | |
<HR> | |
<!-- ======== START OF CLASS DATA ======== --> | |
<H2> | |
<FONT SIZE="-1"> | |
org.apache.openjpa.kernel</FONT> | |
<BR> | |
Interface PreparedQueryCache</H2> | |
<DL> | |
<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../org/apache/openjpa/lib/conf/Configurable.html" title="interface in org.apache.openjpa.lib.conf">Configurable</A></DD> | |
</DL> | |
<DL> | |
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.html" title="class in org.apache.openjpa.jdbc.kernel">PreparedQueryCacheImpl</A></DD> | |
</DL> | |
<HR> | |
<DL> | |
<DT><PRE>public interface <B>PreparedQueryCache</B><DT>extends <A HREF="../../../../org/apache/openjpa/lib/conf/Configurable.html" title="interface in org.apache.openjpa.lib.conf">Configurable</A></DL> | |
</PRE> | |
<P> | |
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. | |
<P> | |
<P> | |
<DL> | |
<DT><B>Since:</B></DT> | |
<DD>2.0.0</DD> | |
<DT><B>Author:</B></DT> | |
<DD>Pinaki Poddar</DD> | |
<DT><B>See Also:</B><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></DL> | |
<HR> | |
<P> | |
<!-- ======== NESTED CLASS SUMMARY ======== --> | |
<A NAME="nested_class_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Nested Class Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static interface</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel">PreparedQueryCache.Exclusion</A></B></CODE> | |
<BR> | |
A structure to describe the strength and reason for excluding a query from the cache.</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ========== METHOD SUMMARY =========== --> | |
<A NAME="method_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Method Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#addExclusionPattern(java.lang.String)">addExclusionPattern</A></B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> pattern)</CODE> | |
<BR> | |
Adds the given pattern to the list of excluded patterns.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#cache(org.apache.openjpa.kernel.PreparedQuery)">cache</A></B>(<A HREF="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel">PreparedQuery</A> q)</CODE> | |
<BR> | |
Cache the given PreparedQuery.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#clear()">clear</A></B>()</CODE> | |
<BR> | |
Clears all cached queries.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel">PreparedQuery</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#get(java.lang.String)">get</A></B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> id)</CODE> | |
<BR> | |
Get the PreparedQuery with the given identifier if it exists.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#getEnableStatistics()">getEnableStatistics</A></B>()</CODE> | |
<BR> | |
Affirm if statistics is gathered.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/6/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></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#getExcludes()">getExcludes</A></B>()</CODE> | |
<BR> | |
Gets the exclusion patterns.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#getMapView()">getMapView</A></B>()</CODE> | |
<BR> | |
Get a map view of the cached queries indexed by identifier.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../org/apache/openjpa/kernel/QueryStatistics.html" title="interface in org.apache.openjpa.kernel">QueryStatistics</A><<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#getStatistics()">getStatistics</A></B>()</CODE> | |
<BR> | |
Gets the simple statistics for executed queries.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel">PreparedQuery</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#initialize(java.lang.String, java.lang.Object)">initialize</A></B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> key, | |
<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> executionResult)</CODE> | |
<BR> | |
Initialize the cached Prepared Query registered with the given | |
key earlier by the given execution result.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#invalidate(java.lang.String)">invalidate</A></B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> id)</CODE> | |
<BR> | |
Remove the PreparedQuery with the given identifier from this cache.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#isCachable(java.lang.String)">isCachable</A></B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> id)</CODE> | |
<BR> | |
Affirms if a PreparedQuery can be cached against the given key.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel">PreparedQueryCache.Exclusion</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#isExcluded(java.lang.String)">isExcluded</A></B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> id)</CODE> | |
<BR> | |
Returns the exclusion status of if the given query key.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel">PreparedQuery</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#markUncachable(java.lang.String, org.apache.openjpa.kernel.PreparedQueryCache.Exclusion)">markUncachable</A></B>(<A HREF="http://java.sun.com/j2se/6/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> | |
<BR> | |
Marks the given key as not amenable to caching.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#register(java.lang.String, org.apache.openjpa.kernel.Query, org.apache.openjpa.kernel.FetchConfiguration)">register</A></B>(<A HREF="http://java.sun.com/j2se/6/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> | |
<BR> | |
Register the given query for caching against the given key if it has not | |
already been cached.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#removeExclusionPattern(java.lang.String)">removeExclusionPattern</A></B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> pattern)</CODE> | |
<BR> | |
Removes the given pattern from the list of excluded patterns.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#setEnableStatistics(boolean)">setEnableStatistics</A></B>(boolean enable)</CODE> | |
<BR> | |
Enable/disable gathering of statistics.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html#setExcludes(java.lang.String)">setExcludes</A></B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> excludes)</CODE> | |
<BR> | |
Sets one or more exclusion regular expression patterns separated by | |
semicolon.</TD> | |
</TR> | |
</TABLE> | |
<A NAME="methods_inherited_from_class_org.apache.openjpa.lib.conf.Configurable"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> | |
<TH ALIGN="left"><B>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></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><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></TD> | |
</TR> | |
</TABLE> | |
| |
<P> | |
<!-- ============ METHOD DETAIL ========== --> | |
<A NAME="method_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Method Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="register(java.lang.String, org.apache.openjpa.kernel.Query, org.apache.openjpa.kernel.FetchConfiguration)"><!-- --></A><H3> | |
register</H3> | |
<PRE> | |
<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</A> <B>register</B>(<A HREF="http://java.sun.com/j2se/6/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> | |
<DL> | |
<DD>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. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><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.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="initialize(java.lang.String, java.lang.Object)"><!-- --></A><H3> | |
initialize</H3> | |
<PRE> | |
<A HREF="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel">PreparedQuery</A> <B>initialize</B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> key, | |
<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> executionResult)</PRE> | |
<DL> | |
<DD>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. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key used during registration<DD><CODE>executionResult</CODE> - an opaque instance carrying the execution result | |
of the original query. | |
<DT><B>Returns:</B><DD>the initialized Prepared Query. If it is not possible to | |
initialize the cached, possibly hollow Prepared Query from the given | |
result, return null.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getMapView()"><!-- --></A><H3> | |
getMapView</H3> | |
<PRE> | |
<A HREF="http://java.sun.com/j2se/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>> <B>getMapView</B>()</PRE> | |
<DL> | |
<DD>Get a map view of the cached queries indexed by identifier. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="cache(org.apache.openjpa.kernel.PreparedQuery)"><!-- --></A><H3> | |
cache</H3> | |
<PRE> | |
boolean <B>cache</B>(<A HREF="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel">PreparedQuery</A> q)</PRE> | |
<DL> | |
<DD>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. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the given query is cached. false if it can not be cached | |
due to exclusion.<DT><B>See Also:</B><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></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="invalidate(java.lang.String)"><!-- --></A><H3> | |
invalidate</H3> | |
<PRE> | |
boolean <B>invalidate</B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> id)</PRE> | |
<DL> | |
<DD>Remove the PreparedQuery with the given identifier from this cache. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="get(java.lang.String)"><!-- --></A><H3> | |
get</H3> | |
<PRE> | |
<A HREF="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel">PreparedQuery</A> <B>get</B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> id)</PRE> | |
<DL> | |
<DD>Get the PreparedQuery with the given identifier if it exists. null | |
otherwise. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isCachable(java.lang.String)"><!-- --></A><H3> | |
isCachable</H3> | |
<PRE> | |
<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</A> <B>isCachable</B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> id)</PRE> | |
<DL> | |
<DD>Affirms if a PreparedQuery can be cached against the given key. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><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.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="markUncachable(java.lang.String, org.apache.openjpa.kernel.PreparedQueryCache.Exclusion)"><!-- --></A><H3> | |
markUncachable</H3> | |
<PRE> | |
<A HREF="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel">PreparedQuery</A> <B>markUncachable</B>(<A HREF="http://java.sun.com/j2se/6/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> | |
<DL> | |
<DD>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. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>id</CODE> - is the key to be excluded<DD><CODE>exclusion</CODE> - directs whether exclusion is irreversible or not. | |
<DT><B>Returns:</B><DD>The value for the given key if it had been cached before. null | |
otherwise.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isExcluded(java.lang.String)"><!-- --></A><H3> | |
isExcluded</H3> | |
<PRE> | |
<A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel">PreparedQueryCache.Exclusion</A> <B>isExcluded</B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> id)</PRE> | |
<DL> | |
<DD>Returns the exclusion status of if the given query key. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>null implies that the key is not excluded.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getExcludes()"><!-- --></A><H3> | |
getExcludes</H3> | |
<PRE> | |
<A HREF="http://java.sun.com/j2se/6/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>> <B>getExcludes</B>()</PRE> | |
<DL> | |
<DD>Gets the exclusion patterns. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setExcludes(java.lang.String)"><!-- --></A><H3> | |
setExcludes</H3> | |
<PRE> | |
void <B>setExcludes</B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> excludes)</PRE> | |
<DL> | |
<DD>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. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="addExclusionPattern(java.lang.String)"><!-- --></A><H3> | |
addExclusionPattern</H3> | |
<PRE> | |
void <B>addExclusionPattern</B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> pattern)</PRE> | |
<DL> | |
<DD>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. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="removeExclusionPattern(java.lang.String)"><!-- --></A><H3> | |
removeExclusionPattern</H3> | |
<PRE> | |
void <B>removeExclusionPattern</B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> pattern)</PRE> | |
<DL> | |
<DD>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. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>See Also:</B><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></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="clear()"><!-- --></A><H3> | |
clear</H3> | |
<PRE> | |
void <B>clear</B>()</PRE> | |
<DL> | |
<DD>Clears all cached queries. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setEnableStatistics(boolean)"><!-- --></A><H3> | |
setEnableStatistics</H3> | |
<PRE> | |
void <B>setEnableStatistics</B>(boolean enable)</PRE> | |
<DL> | |
<DD>Enable/disable gathering of statistics. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getEnableStatistics()"><!-- --></A><H3> | |
getEnableStatistics</H3> | |
<PRE> | |
boolean <B>getEnableStatistics</B>()</PRE> | |
<DL> | |
<DD>Affirm if statistics is gathered. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getStatistics()"><!-- --></A><H3> | |
getStatistics</H3> | |
<PRE> | |
<A HREF="../../../../org/apache/openjpa/kernel/QueryStatistics.html" title="interface in org.apache.openjpa.kernel">QueryStatistics</A><<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>> <B>getStatistics</B>()</PRE> | |
<DL> | |
<DD>Gets the simple statistics for executed queries. | |
If the statistics gathering is disabled, an empty statistics is returned. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<!-- ========= END OF CLASS DATA ========= --> | |
<HR> | |
<!-- ======= START OF BOTTOM NAVBAR ====== --> | |
<A NAME="navbar_bottom"><!-- --></A> | |
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_bottom_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PreparedQueryCache.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../org/apache/openjpa/kernel/PreparedQuery.html" title="interface in org.apache.openjpa.kernel"><B>PREV CLASS</B></A> | |
<A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../index.html?org/apache/openjpa/kernel/PreparedQueryCache.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="PreparedQueryCache.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_bottom"></A> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
<HR> | |
Copyright © 2006-2011 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved. | |
</BODY> | |
</HTML> |