| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <link rel="canonical" href="https://ignite.apache.org/jcache/1.0.0/javadoc/javax/cache/annotation/CacheRemoveAll.html" /> |
| <!-- Generated by javadoc (version 1.7.0_25) on Fri Mar 28 13:34:25 EST 2014 --> |
| <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> |
| <title>CacheRemoveAll (JSR107 API and SPI 1.0.0 API)</title> |
| <meta name="date" content="2014-03-28"> |
| <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> |
| |
| <script> |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); |
| |
| ga('create', 'UA-61232409-1', 'auto'); |
| ga('send', 'pageview'); |
| |
| </script></head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="CacheRemoveAll (JSR107 API and SPI 1.0.0 API)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/CacheRemoveAll.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="../../../javax/cache/annotation/CacheRemove.html" title="annotation in javax.cache.annotation"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../javax/cache/annotation/CacheResolver.html" title="interface in javax.cache.annotation"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?javax/cache/annotation/CacheRemoveAll.html" target="_top">Frames</a></li> |
| <li><a href="CacheRemoveAll.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>Required | </li> |
| <li><a href="#annotation_type_optional_element_summary">Optional</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#annotation_type_element_detail">Element</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">javax.cache.annotation</div> |
| <h2 title="Annotation Type CacheRemoveAll" class="title">Annotation Type CacheRemoveAll</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre><a href="http://download.oracle.com/javase/6/docs/api/java/lang/annotation/Target.html?is-external=true" title="class or interface in java.lang.annotation">@Target</a>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/annotation/Target.html?is-external=true#value()" title="class or interface in java.lang.annotation">value</a>={<a href="http://download.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#METHOD" title="class or interface in java.lang.annotation">METHOD</a>,<a href="http://download.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#TYPE" title="class or interface in java.lang.annotation">TYPE</a>}) |
| <a href="http://download.oracle.com/javase/6/docs/api/java/lang/annotation/Retention.html?is-external=true" title="class or interface in java.lang.annotation">@Retention</a>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/annotation/Retention.html?is-external=true#value()" title="class or interface in java.lang.annotation">value</a>=<a href="http://download.oracle.com/javase/6/docs/api/java/lang/annotation/RetentionPolicy.html?is-external=true#RUNTIME" title="class or interface in java.lang.annotation">RUNTIME</a>) |
| public @interface <span class="strong">CacheRemoveAll</span></pre> |
| <div class="block">When a method annotated with <a href="../../../javax/cache/annotation/CacheRemoveAll.html" title="annotation in javax.cache.annotation"><code>CacheRemoveAll</code></a> is invoked all elements in |
| the specified cache will be removed via the |
| <a href="../../../javax/cache/Cache.html#removeAll()"><code>Cache.removeAll()</code></a> method |
| <p> |
| The default behavior is to call <a href="../../../javax/cache/Cache.html#removeAll()"><code>Cache.removeAll()</code></a> after the |
| annotated method is invoked, this behavior can be changed by setting <a href="../../../javax/cache/annotation/CacheRemoveAll.html#afterInvocation()"><code>afterInvocation()</code></a> to false in which case <a href="../../../javax/cache/Cache.html#removeAll()"><code>Cache.removeAll()</code></a> |
| will be called before the annotated method is invoked. |
| <p> |
| Example of removing all Domain objects from the "domainCache". <a href="../../../javax/cache/Cache.html#removeAll()"><code>Cache.removeAll()</code></a> will be called after deleteAllDomains() returns |
| successfully. |
| <pre><code> |
| package my.app; |
| |
| public class DomainDao { |
| @CacheRemoveAll(cacheName="domainCache") |
| public void deleteAllDomains() { |
| ... |
| } |
| } |
| </code></pre> |
| <p> |
| Exception Handling, only used if <a href="../../../javax/cache/annotation/CacheRemoveAll.html#afterInvocation()"><code>afterInvocation()</code></a> is true. |
| <ol> |
| <li>If <a href="../../../javax/cache/annotation/CacheRemoveAll.html#evictFor()"><code>evictFor()</code></a> and <a href="../../../javax/cache/annotation/CacheRemoveAll.html#noEvictFor()"><code>noEvictFor()</code></a> are both empty then all |
| exceptions prevent the removeAll</li> |
| <li>If <a href="../../../javax/cache/annotation/CacheRemoveAll.html#evictFor()"><code>evictFor()</code></a> is specified and <a href="../../../javax/cache/annotation/CacheRemoveAll.html#noEvictFor()"><code>noEvictFor()</code></a> is not |
| specified then only exceptions that pass an instanceof check against the |
| evictFor list result in a removeAll</li> |
| <li>If <a href="../../../javax/cache/annotation/CacheRemoveAll.html#noEvictFor()"><code>noEvictFor()</code></a> is specified and <a href="../../../javax/cache/annotation/CacheRemoveAll.html#evictFor()"><code>evictFor()</code></a> is not |
| specified then all exceptions that do not pass an instanceof check against the |
| noEvictFor result in a removeAll</li> |
| <li>If <a href="../../../javax/cache/annotation/CacheRemoveAll.html#evictFor()"><code>evictFor()</code></a> and <a href="../../../javax/cache/annotation/CacheRemoveAll.html#noEvictFor()"><code>noEvictFor()</code></a> are both specified then |
| exceptions that pass an instanceof check against the evictFor list but do not |
| pass an instanceof check against the noEvictFor list result in a removeAll</li> |
| </ol></div> |
| <dl><dt><span class="strong">Since:</span></dt> |
| <dd>1.0</dd> |
| <dt><span class="strong">Author:</span></dt> |
| <dd>Eric Dalquist, Rick Hightower</dd></dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="annotation_type_optional_element_summary"> |
| <!-- --> |
| </a> |
| <h3>Optional Element Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation"> |
| <caption><span>Optional Elements</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Optional Element and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/annotation/CacheRemoveAll.html#afterInvocation()">afterInvocation</a></strong></code> |
| <div class="block">When <a href="../../../javax/cache/Cache.html#removeAll()"><code>Cache.removeAll()</code></a> should be called.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <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="../../../javax/cache/annotation/CacheRemoveAll.html#cacheName()">cacheName</a></strong></code> |
| <div class="block">/** |
| The name of the cache.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../javax/cache/annotation/CacheResolverFactory.html" title="interface in javax.cache.annotation">CacheResolverFactory</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/annotation/CacheRemoveAll.html#cacheResolverFactory()">cacheResolverFactory</a></strong></code> |
| <div class="block">The <a href="../../../javax/cache/annotation/CacheResolverFactory.html" title="interface in javax.cache.annotation"><code>CacheResolverFactory</code></a> used to find the <a href="../../../javax/cache/annotation/CacheResolver.html" title="interface in javax.cache.annotation"><code>CacheResolver</code></a> to |
| use at runtime.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a>>[]</code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/annotation/CacheRemoveAll.html#evictFor()">evictFor</a></strong></code> |
| <div class="block">Defines zero (0) or more exception <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>classes</code></a>, that must be a |
| subclass of <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang"><code>Throwable</code></a>, indicating the exception types that must |
| cause a cache eviction.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a>>[]</code></td> |
| <td class="colLast"><code><strong><a href="../../../javax/cache/annotation/CacheRemoveAll.html#noEvictFor()">noEvictFor</a></strong></code> |
| <div class="block">Defines zero (0) or more exception <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Classes</code></a>, that must be a |
| subclass of <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang"><code>Throwable</code></a>, indicating the exception types that must |
| <b>not</b> cause a cache eviction.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="annotation_type_element_detail"> |
| <!-- --> |
| </a> |
| <h3>Element Detail</h3> |
| <a name="cacheName()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>cacheName</h4> |
| <pre>public abstract <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> cacheName</pre> |
| <div class="block">/** |
| The name of the cache. |
| <p> |
| If not specified defaults first to <a href="../../../javax/cache/annotation/CacheDefaults.html#cacheName()"><code>CacheDefaults.cacheName()</code></a> and if |
| that is not set it defaults to: |
| package.name.ClassName.methodName(package.ParameterType,package.ParameterType)</div> |
| <dl> |
| <dt>Default:</dt> |
| <dd>""</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="afterInvocation()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>afterInvocation</h4> |
| <pre>public abstract boolean afterInvocation</pre> |
| <div class="block">When <a href="../../../javax/cache/Cache.html#removeAll()"><code>Cache.removeAll()</code></a> should be called. If true it is called after |
| the annotated method invocation completes successfully. If false it is called |
| before the annotated method is invoked. |
| <p> |
| Defaults to true. |
| <p> |
| If true and the annotated method throws an exception the put will not be |
| executed.</div> |
| <dl> |
| <dt>Default:</dt> |
| <dd>true</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="cacheResolverFactory()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>cacheResolverFactory</h4> |
| <pre>public abstract <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../javax/cache/annotation/CacheResolverFactory.html" title="interface in javax.cache.annotation">CacheResolverFactory</a>> cacheResolverFactory</pre> |
| <div class="block">The <a href="../../../javax/cache/annotation/CacheResolverFactory.html" title="interface in javax.cache.annotation"><code>CacheResolverFactory</code></a> used to find the <a href="../../../javax/cache/annotation/CacheResolver.html" title="interface in javax.cache.annotation"><code>CacheResolver</code></a> to |
| use at runtime. |
| <p> |
| The default resolver pair will resolve the cache by name from the default |
| <a href="../../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a></div> |
| <dl> |
| <dt>Default:</dt> |
| <dd>javax.cache.annotation.CacheResolverFactory.class</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="evictFor()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>evictFor</h4> |
| <pre>public abstract <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a>>[] evictFor</pre> |
| <div class="block">Defines zero (0) or more exception <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>classes</code></a>, that must be a |
| subclass of <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang"><code>Throwable</code></a>, indicating the exception types that must |
| cause a cache eviction. Only used if <a href="../../../javax/cache/annotation/CacheRemoveAll.html#afterInvocation()"><code>afterInvocation()</code></a> is true.</div> |
| <dl> |
| <dt>Default:</dt> |
| <dd>{}</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="noEvictFor()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>noEvictFor</h4> |
| <pre>public abstract <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a>>[] noEvictFor</pre> |
| <div class="block">Defines zero (0) or more exception <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Classes</code></a>, that must be a |
| subclass of <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang"><code>Throwable</code></a>, indicating the exception types that must |
| <b>not</b> cause a cache eviction. Only used if <a href="../../../javax/cache/annotation/CacheRemoveAll.html#afterInvocation()"><code>afterInvocation()</code></a> is |
| true.</div> |
| <dl> |
| <dt>Default:</dt> |
| <dd>{}</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/CacheRemoveAll.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="../../../javax/cache/annotation/CacheRemove.html" title="annotation in javax.cache.annotation"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../javax/cache/annotation/CacheResolver.html" title="interface in javax.cache.annotation"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?javax/cache/annotation/CacheRemoveAll.html" target="_top">Frames</a></li> |
| <li><a href="CacheRemoveAll.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>Required | </li> |
| <li><a href="#annotation_type_optional_element_summary">Optional</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#annotation_type_element_detail">Element</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2014. All Rights Reserved.</small></p> |
| </body> |
| </html> |