blob: 599441a8b78b3b851fc438308d4e1af52bbd9596 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_121) on Fri Jan 06 19:36:28 UTC 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>TypeBasedCacheDistributionPolicy (OpenJPA Parent POM 2.4.2 API)</title>
<meta name="date" content="2017-01-06">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="TypeBasedCacheDistributionPolicy (OpenJPA Parent POM 2.4.2 API)";
}
}
catch(err) {
}
//-->
</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/TypeBasedCacheDistributionPolicy.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/datacache/QueryResult.html" title="class in org.apache.openjpa.datacache"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/openjpa/datacache/TypesChangedEvent.html" title="class in org.apache.openjpa.datacache"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/openjpa/datacache/TypeBasedCacheDistributionPolicy.html" target="_top">Frames</a></li>
<li><a href="TypeBasedCacheDistributionPolicy.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>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&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><a href="#constructor_detail">Constr</a>&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.datacache</div>
<h2 title="Class TypeBasedCacheDistributionPolicy" class="title">Class TypeBasedCacheDistributionPolicy</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../org/apache/openjpa/datacache/DefaultCacheDistributionPolicy.html" title="class in org.apache.openjpa.datacache">org.apache.openjpa.datacache.DefaultCacheDistributionPolicy</a></li>
<li>
<ul class="inheritance">
<li>org.apache.openjpa.datacache.TypeBasedCacheDistributionPolicy</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../org/apache/openjpa/datacache/CacheDistributionPolicy.html" title="interface in org.apache.openjpa.datacache">CacheDistributionPolicy</a>, <a href="../../../../org/apache/openjpa/lib/conf/Configurable.html" title="interface in org.apache.openjpa.lib.conf">Configurable</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">TypeBasedCacheDistributionPolicy</span>
extends <a href="../../../../org/apache/openjpa/datacache/DefaultCacheDistributionPolicy.html" title="class in org.apache.openjpa.datacache">DefaultCacheDistributionPolicy</a>
implements <a href="../../../../org/apache/openjpa/datacache/CacheDistributionPolicy.html" title="interface in org.apache.openjpa.datacache">CacheDistributionPolicy</a></pre>
<div class="block">A cache distribution policy based on the type of the managed objects.
<br>
The policy is configured by specifying list of included or excluded types.
The lists are specified as fully-qualified persistence class names separated by semicolon.
<br>
The policy checks for the given instance by its type whether the class name appears in
exclusion or inclusion lists. If the class name appears in exclusion list then the
instance is not cached. Otherwise, if an inclusion list exists and the class name appears in inclusion list
or @DataCache annotation is specified on the class meta data, then the instance is cached.</div>
<dl><dt><span class="strong">Author:</span></dt>
<dd>Pinaki Poddar</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/openjpa/datacache/TypeBasedCacheDistributionPolicy.html#TypeBasedCacheDistributionPolicy()">TypeBasedCacheDistributionPolicy</a></strong>()</code>&nbsp;</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><a href="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</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/datacache/TypeBasedCacheDistributionPolicy.html#getExcludedTypes()">getExcludedTypes</a></strong>()</code>
<div class="block">Gets the excluded types, if configured.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</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/datacache/TypeBasedCacheDistributionPolicy.html#getIncludedTypes()">getIncludedTypes</a></strong>()</code>
<div class="block">Gets the included types, if configured.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><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></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/datacache/TypeBasedCacheDistributionPolicy.html#selectCache(org.apache.openjpa.kernel.OpenJPAStateManager,%20java.lang.Object)">selectCache</a></strong>(<a href="../../../../org/apache/openjpa/kernel/OpenJPAStateManager.html" title="interface in org.apache.openjpa.kernel">OpenJPAStateManager</a>&nbsp;sm,
<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;context)</code>
<div class="block">Selects the name of the cache where the given managed proxy object state be cached.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/datacache/TypeBasedCacheDistributionPolicy.html#setExcludedTypes(java.lang.String)">setExcludedTypes</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;types)</code>
<div class="block">Sets excluded types from a semicolon separated list of type names.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/datacache/TypeBasedCacheDistributionPolicy.html#setIncludedTypes(java.lang.String)">setIncludedTypes</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;types)</code>
<div class="block">Sets included types from a semicolon separated list of type names.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.openjpa.datacache.DefaultCacheDistributionPolicy">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.openjpa.datacache.<a href="../../../../org/apache/openjpa/datacache/DefaultCacheDistributionPolicy.html" title="class in org.apache.openjpa.datacache">DefaultCacheDistributionPolicy</a></h3>
<code><a href="../../../../org/apache/openjpa/datacache/DefaultCacheDistributionPolicy.html#endConfiguration()">endConfiguration</a>, <a href="../../../../org/apache/openjpa/datacache/DefaultCacheDistributionPolicy.html#setConfiguration(org.apache.openjpa.lib.conf.Configuration)">setConfiguration</a>, <a href="../../../../org/apache/openjpa/datacache/DefaultCacheDistributionPolicy.html#startConfiguration()">startConfiguration</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<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></h3>
<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
<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">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="TypeBasedCacheDistributionPolicy()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>TypeBasedCacheDistributionPolicy</h4>
<pre>public&nbsp;TypeBasedCacheDistributionPolicy()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getExcludedTypes()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getExcludedTypes</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</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;getExcludedTypes()</pre>
<div class="block">Gets the excluded types, if configured.</div>
</li>
</ul>
<a name="setExcludedTypes(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setExcludedTypes</h4>
<pre>public&nbsp;void&nbsp;setExcludedTypes(<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;types)</pre>
<div class="block">Sets excluded types from a semicolon separated list of type names.</div>
</li>
</ul>
<a name="getIncludedTypes()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIncludedTypes</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</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;getIncludedTypes()</pre>
<div class="block">Gets the included types, if configured.</div>
</li>
</ul>
<a name="setIncludedTypes(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIncludedTypes</h4>
<pre>public&nbsp;void&nbsp;setIncludedTypes(<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;types)</pre>
<div class="block">Sets included types from a semicolon separated list of type names.</div>
</li>
</ul>
<a name="selectCache(org.apache.openjpa.kernel.OpenJPAStateManager, java.lang.Object)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>selectCache</h4>
<pre>public&nbsp;<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;selectCache(<a href="../../../../org/apache/openjpa/kernel/OpenJPAStateManager.html" title="interface in org.apache.openjpa.kernel">OpenJPAStateManager</a>&nbsp;sm,
<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;context)</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/apache/openjpa/datacache/CacheDistributionPolicy.html#selectCache(org.apache.openjpa.kernel.OpenJPAStateManager,%20java.lang.Object)">CacheDistributionPolicy</a></code></strong></div>
<div class="block">Selects the name of the cache where the given managed proxy object state be cached.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/openjpa/datacache/CacheDistributionPolicy.html#selectCache(org.apache.openjpa.kernel.OpenJPAStateManager,%20java.lang.Object)">selectCache</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/openjpa/datacache/CacheDistributionPolicy.html" title="interface in org.apache.openjpa.datacache">CacheDistributionPolicy</a></code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../org/apache/openjpa/datacache/DefaultCacheDistributionPolicy.html#selectCache(org.apache.openjpa.kernel.OpenJPAStateManager,%20java.lang.Object)">selectCache</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/openjpa/datacache/DefaultCacheDistributionPolicy.html" title="class in org.apache.openjpa.datacache">DefaultCacheDistributionPolicy</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>sm</code> - the managed proxy object to be cached. The actual managed instance can be accessed from the proxy
instance simply as <code>sm.getManagedInstance()</code>.</dd><dd><code>context</code> - the context of invocation. No specific semantics is attributed currently. Can be null.</dd>
<dt><span class="strong">Returns:</span></dt><dd>name of the cache or null, implying that that the instance should not be cached.</dd></dl>
</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/TypeBasedCacheDistributionPolicy.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/datacache/QueryResult.html" title="class in org.apache.openjpa.datacache"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/openjpa/datacache/TypesChangedEvent.html" title="class in org.apache.openjpa.datacache"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/openjpa/datacache/TypeBasedCacheDistributionPolicy.html" target="_top">Frames</a></li>
<li><a href="TypeBasedCacheDistributionPolicy.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>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&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><a href="#constructor_detail">Constr</a>&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;2017 <a href="http://www.apache.org">Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>