| <!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/CacheManager.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>CacheManager (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="CacheManager (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/CacheManager.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/CacheException.html" title="class in javax.cache"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../javax/cache/Caching.html" title="class in javax.cache"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../index.html?javax/cache/CacheManager.html" target="_top">Frames</a></li> |
| <li><a href="CacheManager.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>Nested | </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">javax.cache</div> |
| <h2 title="Interface CacheManager" class="title">Interface CacheManager</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Superinterfaces:</dt> |
| <dd><a href="http://download.oracle.com/javase/6/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public interface <span class="strong">CacheManager</span> |
| extends <a href="http://download.oracle.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></pre> |
| <div class="block">A <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> provides a means of establishing, configuring, |
| acquiring, closing and destroying uniquely named <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s. |
| <p> |
| <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s produced and owned by a <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> typically share |
| common infrastructure, for example, a common <a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang"><code>ClassLoader</code></a> and |
| implementation specific <a href="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util"><code>Properties</code></a>. |
| <p> |
| Implementations of <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> may additionally provide and share |
| external resources between the <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s being managed, for example, |
| the content of the managed <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s may be stored in the same cluster. |
| <p> |
| By default <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> instances are typically acquired through the |
| use of a <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a>. Implementations however may additionally |
| provide other mechanisms to create, acquire, manage and configure |
| <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>s, including: |
| <ul> |
| <li>making use of <a href="http://download.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html?is-external=true" title="class or interface in java.util"><code>ServiceLoader</code></a>s,</li> |
| <li>permitting the use of the <code>new</code> operator to create a |
| concrete implementation, </li> |
| <li>providing the construction through the use of one or more |
| builders, and</li> |
| <li>through the use of dependency injection.</li> |
| </ul> |
| <p> |
| The default <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> however can always be acquired using the |
| default configured <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> obtained by the <a href="../../javax/cache/Caching.html" title="class in javax.cache"><code>Caching</code></a> |
| class. For example: |
| <pre><code> |
| CachingProvider provider = Caching.getCachingProvider(); |
| CacheManager manager = provider.getCacheManager(); |
| </code></pre> |
| <p> |
| Within a Java process <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>s and the <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s they |
| manage are scoped and uniquely identified by a <a href="http://download.oracle.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net"><code>URI</code></a>, the meaning of |
| which is implementation specific. To obtain the default <a href="http://download.oracle.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net"><code>URI</code></a>, |
| <a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang"><code>ClassLoader</code></a> and <a href="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util"><code>Properties</code></a> for an implementation, consult the |
| <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> class.</div> |
| <dl><dt><span class="strong">Since:</span></dt> |
| <dd>1.0</dd> |
| <dt><span class="strong">Author:</span></dt> |
| <dd>Greg Luck, Yannis Cosmadopoulos, Brian Oliver</dd> |
| <dt><span class="strong">See Also:</span></dt><dd><a href="../../javax/cache/Caching.html" title="class in javax.cache"><code>Caching</code></a>, |
| <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a>, |
| <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a></dd></dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== 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"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../javax/cache/CacheManager.html#close()">close</a></strong>()</code> |
| <div class="block">Closes the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><K,V,C extends <a href="../../javax/cache/configuration/Configuration.html" title="interface in javax.cache.configuration">Configuration</a><K,V>> <br><a href="../../javax/cache/Cache.html" title="interface in javax.cache">Cache</a><K,V></code></td> |
| <td class="colLast"><code><strong><a href="../../javax/cache/CacheManager.html#createCache(java.lang.String, C)">createCache</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> cacheName, |
| C configuration)</code> |
| <div class="block">Creates a named <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> at runtime.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../javax/cache/CacheManager.html#destroyCache(java.lang.String)">destroyCache</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> cacheName)</code> |
| <div class="block">Destroys a specifically named and managed <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../javax/cache/CacheManager.html#enableManagement(java.lang.String, boolean)">enableManagement</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> cacheName, |
| boolean enabled)</code> |
| <div class="block">Controls whether management is enabled.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../javax/cache/CacheManager.html#enableStatistics(java.lang.String, boolean)">enableStatistics</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> cacheName, |
| boolean enabled)</code> |
| <div class="block">Enables or disables statistics gathering for a managed <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> at |
| runtime.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><K,V> <a href="../../javax/cache/Cache.html" title="interface in javax.cache">Cache</a><K,V></code></td> |
| <td class="colLast"><code><strong><a href="../../javax/cache/CacheManager.html#getCache(java.lang.String)">getCache</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> cacheName)</code> |
| <div class="block">Looks up a managed <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> given its name.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><K,V> <a href="../../javax/cache/Cache.html" title="interface in javax.cache">Cache</a><K,V></code></td> |
| <td class="colLast"><code><strong><a href="../../javax/cache/CacheManager.html#getCache(java.lang.String, java.lang.Class, java.lang.Class)">getCache</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> cacheName, |
| <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><K> keyType, |
| <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><V> valueType)</code> |
| <div class="block">Looks up a managed <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> given its name.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../javax/cache/CacheManager.html#getCacheNames()">getCacheNames</a></strong>()</code> |
| <div class="block">Obtains an <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang"><code>Iterable</code></a> over the names of <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s managed by the |
| <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi">CachingProvider</a></code></td> |
| <td class="colLast"><code><strong><a href="../../javax/cache/CacheManager.html#getCachingProvider()">getCachingProvider</a></strong>()</code> |
| <div class="block">Get the <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> that created and is responsible for |
| the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a></code></td> |
| <td class="colLast"><code><strong><a href="../../javax/cache/CacheManager.html#getClassLoader()">getClassLoader</a></strong>()</code> |
| <div class="block">Get the <a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang"><code>ClassLoader</code></a> used by the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a></code></td> |
| <td class="colLast"><code><strong><a href="../../javax/cache/CacheManager.html#getProperties()">getProperties</a></strong>()</code> |
| <div class="block">Get the <a href="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util"><code>Properties</code></a> that were used to create this |
| <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a></code></td> |
| <td class="colLast"><code><strong><a href="../../javax/cache/CacheManager.html#getURI()">getURI</a></strong>()</code> |
| <div class="block">Get the URI of the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../javax/cache/CacheManager.html#isClosed()">isClosed</a></strong>()</code> |
| <div class="block">Determines whether the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> instance has been closed.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><T> T</code></td> |
| <td class="colLast"><code><strong><a href="../../javax/cache/CacheManager.html#unwrap(java.lang.Class)">unwrap</a></strong>(<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><T> clazz)</code> |
| <div class="block">Provides a standard mechanism to access the underlying concrete caching |
| implementation to provide access to further, proprietary features.</div> |
| </td> |
| </tr> |
| </table> |
| </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="getCachingProvider()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCachingProvider</h4> |
| <pre><a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi">CachingProvider</a> getCachingProvider()</pre> |
| <div class="block">Get the <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> that created and is responsible for |
| the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the CachingProvider or <code>null</code> if the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> |
| was created without using a <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="getURI()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getURI</h4> |
| <pre><a href="http://download.oracle.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a> getURI()</pre> |
| <div class="block">Get the URI of the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the URI of the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="getClassLoader()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getClassLoader</h4> |
| <pre><a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a> getClassLoader()</pre> |
| <div class="block">Get the <a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang"><code>ClassLoader</code></a> used by the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the <a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang"><code>ClassLoader</code></a> used by the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="getProperties()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getProperties</h4> |
| <pre><a href="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a> getProperties()</pre> |
| <div class="block">Get the <a href="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util"><code>Properties</code></a> that were used to create this |
| <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>. |
| <p> |
| Implementations are not required to re-configure the |
| <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> should modifications to the returned |
| <a href="http://download.oracle.com/javase/6/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util"><code>Properties</code></a> be made.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the Properties used to create the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="createCache(java.lang.String,javax.cache.configuration.Configuration)"> |
| <!-- --> |
| </a><a name="createCache(java.lang.String, C)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createCache</h4> |
| <pre><K,V,C extends <a href="../../javax/cache/configuration/Configuration.html" title="interface in javax.cache.configuration">Configuration</a><K,V>> <a href="../../javax/cache/Cache.html" title="interface in javax.cache">Cache</a><K,V> createCache(<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, |
| C configuration) |
| throws <a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre> |
| <div class="block">Creates a named <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> at runtime. |
| <p> |
| If a <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> with the specified name is known to the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>, a CacheException is thrown. |
| <p> |
| If a <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> with the specified name is unknown the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>, one is created according to the provided <a href="../../javax/cache/configuration/Configuration.html" title="interface in javax.cache.configuration"><code>Configuration</code></a> |
| after which it becomes managed by the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>. |
| <p> |
| Prior to a <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> being created, the provided <a href="../../javax/cache/configuration/Configuration.html" title="interface in javax.cache.configuration"><code>Configuration</code></a>s is |
| validated within the context of the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> properties and |
| implementation. |
| <p> |
| Implementers should be aware that the <a href="../../javax/cache/configuration/Configuration.html" title="interface in javax.cache.configuration"><code>Configuration</code></a> may be used to |
| configure other <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s. |
| <p> |
| There's no requirement on the part of a developer to call this method for |
| each <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> an application may use. Implementations may support |
| the use of declarative mechanisms to pre-configure <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s, thus |
| removing the requirement to configure them in an application. In such |
| circumstances a developer may simply call either the |
| <a href="../../javax/cache/CacheManager.html#getCache(java.lang.String)"><code>getCache(String)</code></a> or <a href="../../javax/cache/CacheManager.html#getCache(java.lang.String, java.lang.Class, java.lang.Class)"><code>getCache(String, Class, Class)</code></a> |
| methods to acquire a previously established or pre-configured <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>cacheName</code> - the name of the <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a></dd><dd><code>configuration</code> - a <a href="../../javax/cache/configuration/Configuration.html" title="interface in javax.cache.configuration"><code>Configuration</code></a> for the <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a></dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> |
| <a href="../../javax/cache/CacheManager.html#isClosed()"><code>isClosed()</code></a></dd> |
| <dd><code><a href="../../javax/cache/CacheException.html" title="class in javax.cache">CacheException</a></code> - if there was an error configuring the |
| <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>, which includes trying |
| to create a cache that already exists.</dd> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the configuration is invalid</dd> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if the configuration specifies |
| an unsupported feature</dd> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the cache configuration or name |
| is null</dd> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></code> - when the operation could not be performed |
| due to the current security settings</dd></dl> |
| </li> |
| </ul> |
| <a name="getCache(java.lang.String, java.lang.Class, java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCache</h4> |
| <pre><K,V> <a href="../../javax/cache/Cache.html" title="interface in javax.cache">Cache</a><K,V> getCache(<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, |
| <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><K> keyType, |
| <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><V> valueType)</pre> |
| <div class="block">Looks up a managed <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> given its name. |
| <p> |
| This method must be used for <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s that were configured with |
| runtime key and value types. Use <a href="../../javax/cache/CacheManager.html#getCache(java.lang.String)"><code>getCache(String)</code></a> for |
| <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s where these were not specified. |
| <p> |
| Implementations must ensure that the key and value types are the same as |
| those configured for the <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> prior to returning from this method. |
| <p> |
| Implementations may further perform type checking on mutative cache operations |
| and throw a <a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang"><code>ClassCastException</code></a> if these checks fail. |
| <p> |
| Implementations that support declarative mechanisms for pre-configuring |
| <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s may return a pre-configured <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> instead of |
| <code>null</code>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>cacheName</code> - the name of the managed <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> to acquire</dd><dd><code>keyType</code> - the expected <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>Class</code></a> of the key</dd><dd><code>valueType</code> - the expected <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>Class</code></a> of the value</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the Cache or null if it does exist or can't be pre-configured</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> |
| is <a href="../../javax/cache/CacheManager.html#isClosed()"><code>isClosed()</code></a></dd> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the specified key and/or value types are |
| incompatible with the configured cache.</dd> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></code> - when the operation could not be performed |
| due to the current security settings</dd></dl> |
| </li> |
| </ul> |
| <a name="getCache(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCache</h4> |
| <pre><K,V> <a href="../../javax/cache/Cache.html" title="interface in javax.cache">Cache</a><K,V> getCache(<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">Looks up a managed <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> given its name. |
| <p> |
| This method may only be used to acquire <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s that were |
| configured without runtime key and value types, or were configured |
| to use Object.class key and value types. |
| <p> |
| Use the <a href="../../javax/cache/CacheManager.html#getCache(java.lang.String, java.lang.Class, java.lang.Class)"><code>getCache(String, Class, Class)</code></a> method to acquire |
| <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s that were configured with specific runtime types. |
| <p> |
| Implementations must check if key and value types were configured |
| for the requested <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>. If either the keyType or valueType of the |
| configured <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> were specified (other than <code>Object.class</code>) |
| an <a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> will be thrown. |
| <p> |
| Implementations that support declarative mechanisms for pre-configuring |
| <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s may return a pre-configured <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> instead of |
| <code>null</code>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>cacheName</code> - the name of the cache to look for</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the Cache or null if it does exist or can't be pre-configured</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the CacheManager is <a href="../../javax/cache/CacheManager.html#isClosed()"><code>isClosed()</code></a></dd> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> was configured with |
| specific types, this method cannot be used</dd> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></code> - when the operation could not be performed |
| due to the current security settings</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../javax/cache/CacheManager.html#getCache(java.lang.String, java.lang.Class, java.lang.Class)"><code>getCache(String, Class, Class)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="getCacheNames()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCacheNames</h4> |
| <pre><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> getCacheNames()</pre> |
| <div class="block">Obtains an <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang"><code>Iterable</code></a> over the names of <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s managed by the |
| <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>. |
| <p> |
| <a href="http://download.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util"><code>Iterator</code></a>s returned by the <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang"><code>Iterable</code></a> are immutable. |
| Any modification of the <a href="http://download.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util"><code>Iterator</code></a>, including remove, will |
| raise an <a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang"><code>IllegalStateException</code></a>. If the <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s managed by |
| the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> change, the <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang"><code>Iterable</code></a> and |
| associated <a href="http://download.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util"><code>Iterator</code></a>s are not affected. |
| <p> |
| <a href="http://download.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util"><code>Iterator</code></a>s returned by the <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang"><code>Iterable</code></a> may not provide |
| all of the <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s managed by the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>. For example: |
| Internally defined or platform specific <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s that may be accessible |
| by a call to <a href="../../javax/cache/CacheManager.html#getCache(java.lang.String)"><code>getCache(String)</code></a> or <a href="../../javax/cache/CacheManager.html#getCache(java.lang.String, java.lang.Class, java.lang.Class)"><code>getCache(String, Class, |
| Class)</code></a> may not be present in an iteration.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>an <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang"><code>Iterable</code></a> over the names of managed <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>s.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> |
| is <a href="../../javax/cache/CacheManager.html#isClosed()"><code>isClosed()</code></a></dd> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></code> - when the operation could not be performed |
| due to the current security settings</dd></dl> |
| </li> |
| </ul> |
| <a name="destroyCache(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>destroyCache</h4> |
| <pre>void destroyCache(<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">Destroys a specifically named and managed <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a>. Once destroyed |
| a new <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> of the same name but with a different <a href="../../javax/cache/configuration/Configuration.html" title="interface in javax.cache.configuration"><code>Configuration</code></a> may be configured. |
| <p> |
| This is equivalent to the following sequence of method calls: |
| <ol> |
| <li><a href="../../javax/cache/Cache.html#clear()"><code>Cache.clear()</code></a></li> |
| <li><a href="../../javax/cache/Cache.html#close()"><code>Cache.close()</code></a></li> |
| </ol> |
| followed by allowing the name of the <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> to be used for other |
| <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> configurations. |
| <p> |
| From the time this method is called, the specified <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> is not |
| available for operational use. An attempt to call an operational method on |
| the <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> will throw an <a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang"><code>IllegalStateException</code></a>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>cacheName</code> - the cache to destroy</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> |
| <a href="../../javax/cache/CacheManager.html#isClosed()"><code>isClosed()</code></a></dd> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if cacheName is null</dd> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></code> - when the operation could not be performed |
| due to the current security settings</dd></dl> |
| </li> |
| </ul> |
| <a name="enableManagement(java.lang.String, boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>enableManagement</h4> |
| <pre>void enableManagement(<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, |
| boolean enabled)</pre> |
| <div class="block">Controls whether management is enabled. If enabled the <a href="../../javax/cache/management/CacheMXBean.html" title="interface in javax.cache.management"><code>CacheMXBean</code></a> |
| for each cache is registered in the platform MBean server. The platform |
| MBeanServer is obtained using |
| <a href="http://download.oracle.com/javase/6/docs/api/java/lang/management/ManagementFactory.html?is-external=true#getPlatformMBeanServer()" title="class or interface in java.lang.management"><code>ManagementFactory.getPlatformMBeanServer()</code></a>. |
| <p> |
| Management information includes the name and configuration information for |
| the cache. |
| <p> |
| Each cache's management object must be registered with an ObjectName that |
| is unique and has the following type and attributes: |
| <p> |
| Type: |
| <code>javax.cache:type=Cache</code> |
| <p> |
| Required Attributes: |
| <ul> |
| <li>CacheManager the name of the CacheManager |
| <li>Cache the name of the Cache |
| </ul></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>cacheName</code> - the name of the cache to register</dd><dd><code>enabled</code> - true to enable management, false to disable.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> or |
| <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> <a href="../../javax/cache/CacheManager.html#isClosed()"><code>isClosed()</code></a></dd> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></code> - when the operation could not be performed |
| due to the current security settings</dd></dl> |
| </li> |
| </ul> |
| <a name="enableStatistics(java.lang.String, boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>enableStatistics</h4> |
| <pre>void enableStatistics(<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, |
| boolean enabled)</pre> |
| <div class="block">Enables or disables statistics gathering for a managed <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> at |
| runtime. |
| <p> |
| Each cache's statistics object must be registered with an ObjectName that |
| is unique and has the following type and attributes: |
| <p> |
| Type: |
| <code>javax.cache:type=CacheStatistics</code> |
| <p> |
| Required Attributes: |
| <ul> |
| <li>CacheManager the name of the CacheManager |
| <li>Cache the name of the Cache |
| </ul></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>cacheName</code> - the name of the cache to register</dd><dd><code>enabled</code> - true to enable statistics, false to disable.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> or |
| <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> <a href="../../javax/cache/CacheManager.html#isClosed()"><code>isClosed()</code></a></dd> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if cacheName is null</dd> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></code> - when the operation could not be performed |
| due to the current security settings</dd></dl> |
| </li> |
| </ul> |
| <a name="close()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>close</h4> |
| <pre>void close()</pre> |
| <div class="block">Closes the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>. |
| <p> |
| For each <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> managed by the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>, the |
| <a href="../../javax/cache/Cache.html#close()"><code>Cache.close()</code></a> method will be invoked, in no guaranteed order. |
| <p> |
| If a <a href="../../javax/cache/Cache.html#close()"><code>Cache.close()</code></a> call throws an exception, the exception will be |
| ignored. |
| <p> |
| After executing this method, the <a href="../../javax/cache/CacheManager.html#isClosed()"><code>isClosed()</code></a> method will return |
| <code>true</code>. |
| <p> |
| All attempts to close a previously closed <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> will be |
| ignored.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/AutoCloseable.html?is-external=true#close()" title="class or interface in java.lang">close</a></code> in interface <code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></dd> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/io/Closeable.html?is-external=true#close()" title="class or interface in java.io">close</a></code> in interface <code><a href="http://download.oracle.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></code></dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></code> - when the operation could not be performed due to the |
| current security settings</dd></dl> |
| </li> |
| </ul> |
| <a name="isClosed()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isClosed</h4> |
| <pre>boolean isClosed()</pre> |
| <div class="block">Determines whether the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> instance has been closed. A |
| <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> is considered closed if; |
| <ol> |
| <li>the <a href="../../javax/cache/CacheManager.html#close()"><code>close()</code></a> method has been called</li> |
| <li>the associated <a href="../../javax/cache/CacheManager.html#getCachingProvider()"><code>getCachingProvider()</code></a> has been closed, or</li> |
| <li>the <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> has been closed using the associated |
| <a href="../../javax/cache/CacheManager.html#getCachingProvider()"><code>getCachingProvider()</code></a></li> |
| </ol> |
| <p> |
| This method generally cannot be called to determine whether the |
| <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> is valid or invalid. A typical client can determine |
| that a <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> is invalid by catching any exceptions that |
| might be thrown when an operation is attempted.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>true if this <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a> instance is closed; false if it |
| is still open</dd></dl> |
| </li> |
| </ul> |
| <a name="unwrap(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>unwrap</h4> |
| <pre><T> T unwrap(<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><T> clazz)</pre> |
| <div class="block">Provides a standard mechanism to access the underlying concrete caching |
| implementation to provide access to further, proprietary features. |
| <p> |
| If the provider's implementation does not support the specified class, |
| the <a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> is thrown.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>clazz</code> - the proprietary class or interface of the underlying concrete |
| <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>. It is this type that is returned.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>an instance of the underlying concrete <a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a></dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the caching provider doesn't support the |
| specified class.</dd> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></code> - when the operation could not be performed |
| due to the current security settings</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/CacheManager.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/CacheException.html" title="class in javax.cache"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../javax/cache/Caching.html" title="class in javax.cache"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../index.html?javax/cache/CacheManager.html" target="_top">Frames</a></li> |
| <li><a href="CacheManager.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>Nested | </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 © 2014. All Rights Reserved.</small></p> |
| </body> |
| </html> |