blob: 044cc85f417ab6d1086a0208578d2b331f34a296 [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>
<link rel="canonical" href="https://ignite.apache.org/jcache/1.0.0/javadoc/javax/cache/Caching.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>Caching (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="Caching (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/Caching.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/CacheManager.html" title="interface in javax.cache"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../index.html?javax/cache/Caching.html" target="_top">Frames</a></li>
<li><a href="Caching.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><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&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">javax.cache</div>
<h2 title="Class Caching" class="title">Class Caching</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>javax.cache.Caching</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="strong">Caching</span>
extends <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></pre>
<div class="block">The <a href="../../javax/cache/Caching.html" title="class in javax.cache"><code>Caching</code></a> class provides a convenient means for an application to
acquire an appropriate <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> implementation.
<p>
While defined as part of the specification, its use is not required.
Applications and/or containers may instead choose to directly instantiate a
<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> implementation based on implementation specific
instructions.
<p>
When using the <a href="../../javax/cache/Caching.html" title="class in javax.cache"><code>Caching</code></a> class, <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> implementations
are automatically discovered when they follow the conventions outlined by the
Java Development Kit <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> class.
<p>
Although automatically discovered, applications that choose to use this class
should not make assumptions regarding the order in which implementations are
returned by the <a href="../../javax/cache/Caching.html#getCachingProviders()"><code>getCachingProviders()</code></a> or
<a href="../../javax/cache/Caching.html#getCachingProviders(java.lang.ClassLoader)"><code>getCachingProviders(ClassLoader)</code></a> methods.
<p>
For a <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> to be automatically discoverable by the
<a href="../../javax/cache/Caching.html" title="class in javax.cache"><code>Caching</code></a> class, the fully qualified class name of the
<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> implementation must be declared in the following
file:
<pre>
META-INF/services/javax.cache.spi.CachingProvider
</pre>
This file must be resolvable via the class path.
<p>
For example, in the reference implementation the contents of this file are:
<code>org.jsr107.ri.RICachingProvider</code>
<p>
Alternatively when the fully qualified class name of a
<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> implementation is specified using the system property
<code>javax.cache.spi.cachingprovider</code>, that implementation will be used
as the default <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a>.
<p>
All <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a>s that are automatically detected or explicitly
declared and loaded by the <a href="../../javax/cache/Caching.html" title="class in javax.cache"><code>Caching</code></a> class are maintained in an
internal registry. Consequently when a previously loaded
<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> is requested, it will be simply returned from the
internal registry, without reloading and/or instantiating the said
implementation again.
<p>
As required by some applications and containers, multiple co-existing
<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a>s implementations, from the same or different
implementors are permitted at runtime.
<p>
To iterate through those that are currently registered a developer may use
the following methods:
<ol>
<li><a href="../../javax/cache/Caching.html#getCachingProviders()"><code>getCachingProviders()</code></a></li>
<li><a href="../../javax/cache/Caching.html#getCachingProviders(java.lang.ClassLoader)"><code>getCachingProviders(ClassLoader)</code></a></li>
</ol>
To request a specific <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> implementation, a developer
should use either the <a href="../../javax/cache/Caching.html#getCachingProvider(java.lang.String)"><code>getCachingProvider(String)</code></a> or
<a href="../../javax/cache/Caching.html#getCachingProvider(java.lang.String, java.lang.ClassLoader)"><code>getCachingProvider(String, ClassLoader)</code></a> method.
<p>
Where multiple <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a>s are present, the
<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> returned by getters <a href="../../javax/cache/Caching.html#getCachingProvider()"><code>getCachingProvider()</code></a> and
<a href="../../javax/cache/Caching.html#getCachingProvider(java.lang.ClassLoader)"><code>getCachingProvider(ClassLoader)</code></a> is undefined and as a result a
<a href="../../javax/cache/CacheException.html" title="class in javax.cache"><code>CacheException</code></a> will be thrown when attempted.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.0</dd>
<dt><span class="strong">Author:</span></dt>
<dd>Brian Oliver, Greg Luck, Yannis Cosmadopoulos</dd>
<dt><span class="strong">See Also:</span></dt><dd><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>,
<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <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/Caching.html#JAVAX_CACHE_CACHING_PROVIDER">JAVAX_CACHE_CACHING_PROVIDER</a></strong></code>
<div class="block">The <code>javax.cache.spi.cachingprovider</code> constant.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="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>static &lt;K,V&gt;&nbsp;<a href="../../javax/cache/Cache.html" title="interface in javax.cache">Cache</a>&lt;K,V&gt;</code></td>
<td class="colLast"><code><strong><a href="../../javax/cache/Caching.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>&nbsp;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>&lt;K&gt;&nbsp;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>&lt;V&gt;&nbsp;valueType)</code>
<div class="block">A convenience that method that 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>static <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/Caching.html#getCachingProvider()">getCachingProvider</a></strong>()</code>
<div class="block">Obtains the default <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> available via the
<a href="../../javax/cache/Caching.html#getDefaultClassLoader()"><code>getDefaultClassLoader()</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <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/Caching.html#getCachingProvider(java.lang.ClassLoader)">getCachingProvider</a></strong>(<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>&nbsp;classLoader)</code>
<div class="block">Obtains the single <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> visible to the specified
<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>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <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/Caching.html#getCachingProvider(java.lang.String)">getCachingProvider</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;fullyQualifiedClassName)</code>
<div class="block">Obtain the <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> that is implemented by the specified
fully qualified class name using the <a href="../../javax/cache/Caching.html#getDefaultClassLoader()"><code>getDefaultClassLoader()</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <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/Caching.html#getCachingProvider(java.lang.String, java.lang.ClassLoader)">getCachingProvider</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;fullyQualifiedClassName,
<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>&nbsp;classLoader)</code>
<div class="block">Obtain the <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> that is implemented by the specified
fully qualified class name using the provided <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>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <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>&lt;<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi">CachingProvider</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../javax/cache/Caching.html#getCachingProviders()">getCachingProviders</a></strong>()</code>
<div class="block">Obtains the <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a>s that are available via the
<a href="../../javax/cache/Caching.html#getDefaultClassLoader()"><code>getDefaultClassLoader()</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <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>&lt;<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi">CachingProvider</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../javax/cache/Caching.html#getCachingProviders(java.lang.ClassLoader)">getCachingProviders</a></strong>(<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>&nbsp;classLoader)</code>
<div class="block">Obtains the <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a>s that are available via the specified
<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>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <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/Caching.html#getDefaultClassLoader()">getDefaultClassLoader</a></strong>()</code>
<div class="block">Obtains 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> to use for API methods that don't
explicitly require 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> but internally require one.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../javax/cache/Caching.html#setDefaultClassLoader(java.lang.ClassLoader)">setDefaultClassLoader</a></strong>(<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>&nbsp;classLoader)</code>
<div class="block">Set 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> to use for API methods that don't explicitly
require 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>, but internally use one.</div>
</td>
</tr>
</table>
<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, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="JAVAX_CACHE_CACHING_PROVIDER">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>JAVAX_CACHE_CACHING_PROVIDER</h4>
<pre>public static final&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> JAVAX_CACHE_CACHING_PROVIDER</pre>
<div class="block">The <code>javax.cache.spi.cachingprovider</code> constant.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#javax.cache.Caching.JAVAX_CACHE_CACHING_PROVIDER">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getDefaultClassLoader()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDefaultClassLoader</h4>
<pre>public static&nbsp;<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>&nbsp;getDefaultClassLoader()</pre>
<div class="block">Obtains 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> to use for API methods that don't
explicitly require 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> but internally require one.
<p>
By default this is the <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Thread.html?is-external=true#getContextClassLoader()" title="class or interface in java.lang"><code>Thread.getContextClassLoader()</code></a>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the default <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></dd></dl>
</li>
</ul>
<a name="setDefaultClassLoader(java.lang.ClassLoader)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDefaultClassLoader</h4>
<pre>public static&nbsp;void&nbsp;setDefaultClassLoader(<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>&nbsp;classLoader)</pre>
<div class="block">Set 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> to use for API methods that don't explicitly
require 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>, but internally use one.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>classLoader</code> - 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> or <code>null</code> if the
calling <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Thread.html?is-external=true#getContextClassLoader()" title="class or interface in java.lang"><code>Thread.getContextClassLoader()</code></a> should
be used</dd></dl>
</li>
</ul>
<a name="getCachingProvider()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCachingProvider</h4>
<pre>public static&nbsp;<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi">CachingProvider</a>&nbsp;getCachingProvider()</pre>
<div class="block">Obtains the default <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> available via the
<a href="../../javax/cache/Caching.html#getDefaultClassLoader()"><code>getDefaultClassLoader()</code></a>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../javax/cache/CacheException.html" title="class in javax.cache">CacheException</a></code> - should zero, or more than one
<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> be available on the
classpath, or it could not be loaded</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="getCachingProvider(java.lang.ClassLoader)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCachingProvider</h4>
<pre>public static&nbsp;<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi">CachingProvider</a>&nbsp;getCachingProvider(<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>&nbsp;classLoader)</pre>
<div class="block">Obtains the single <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> visible to the specified
<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>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>classLoader</code> - 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> to use for loading the
<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a></dd>
<dt><span class="strong">Returns:</span></dt><dd>the <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../javax/cache/CacheException.html" title="class in javax.cache">CacheException</a></code> - should zero, or more than one
<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> be available on the
classpath, or it could not be loaded</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/Caching.html#getCachingProviders(java.lang.ClassLoader)"><code>getCachingProviders(ClassLoader)</code></a></dd></dl>
</li>
</ul>
<a name="getCachingProviders()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCachingProviders</h4>
<pre>public static&nbsp;<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>&lt;<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi">CachingProvider</a>&gt;&nbsp;getCachingProviders()</pre>
<div class="block">Obtains the <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a>s that are available via the
<a href="../../javax/cache/Caching.html#getDefaultClassLoader()"><code>getDefaultClassLoader()</code></a>.
<p>
If a <code>javax.cache.spi.cachingprovider</code> system property is defined,
only that <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> specified by that property is returned.
Otherwise all <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a>s that are available via a
<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> for <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a>s using the default
<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> (including those previously requested via
<a href="../../javax/cache/Caching.html#getCachingProvider(java.lang.String)"><code>getCachingProvider(String)</code></a>) are returned.</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> of <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a>s loaded by the
specified <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></dd></dl>
</li>
</ul>
<a name="getCachingProviders(java.lang.ClassLoader)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCachingProviders</h4>
<pre>public static&nbsp;<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>&lt;<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi">CachingProvider</a>&gt;&nbsp;getCachingProviders(<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>&nbsp;classLoader)</pre>
<div class="block">Obtains the <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a>s that are available via the specified
<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>.
<p>
If a <code>javax.cache.spi.cachingprovider</code> system property is defined,
only that <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> specified by that property is returned.
Otherwise all <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a>s that are available via a
<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> for <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a>s using the specified
<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> (including those previously requested via
<a href="../../javax/cache/Caching.html#getCachingProvider(java.lang.String, java.lang.ClassLoader)"><code>getCachingProvider(String, ClassLoader)</code></a>) are returned.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>classLoader</code> - 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> of the returned
<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a>s</dd>
<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> of <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a>s loaded by the
specified <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></dd></dl>
</li>
</ul>
<a name="getCachingProvider(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCachingProvider</h4>
<pre>public static&nbsp;<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi">CachingProvider</a>&nbsp;getCachingProvider(<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;fullyQualifiedClassName)</pre>
<div class="block">Obtain the <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> that is implemented by the specified
fully qualified class name using the <a href="../../javax/cache/Caching.html#getDefaultClassLoader()"><code>getDefaultClassLoader()</code></a>.
Should this <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> already be loaded it is simply returned,
otherwise an attempt will be made to load and instantiate the specified
class (using a no-args constructor).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>fullyQualifiedClassName</code> - the fully qualified class name of the
<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a></dd>
<dt><span class="strong">Returns:</span></dt><dd>the <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../javax/cache/CacheException.html" title="class in javax.cache">CacheException</a></code> - if the <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> cannot be created</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="getCachingProvider(java.lang.String, java.lang.ClassLoader)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCachingProvider</h4>
<pre>public static&nbsp;<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi">CachingProvider</a>&nbsp;getCachingProvider(<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;fullyQualifiedClassName,
<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>&nbsp;classLoader)</pre>
<div class="block">Obtain the <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> that is implemented by the specified
fully qualified class name using the provided <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>.
Should this <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> already be loaded it is returned,
otherwise an attempt will be made to load and instantiate the specified
class (using a no-args constructor).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>fullyQualifiedClassName</code> - the fully qualified class name of the
<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a></dd><dd><code>classLoader</code> - 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> to load the
<a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a></dd>
<dt><span class="strong">Returns:</span></dt><dd>the <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../javax/cache/CacheException.html" title="class in javax.cache">CacheException</a></code> - if the <a href="../../javax/cache/spi/CachingProvider.html" title="interface in javax.cache.spi"><code>CachingProvider</code></a> cannot be created</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="blockListLast">
<li class="blockList">
<h4>getCache</h4>
<pre>public static&nbsp;&lt;K,V&gt;&nbsp;<a href="../../javax/cache/Cache.html" title="interface in javax.cache">Cache</a>&lt;K,V&gt;&nbsp;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>&nbsp;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>&lt;K&gt;&nbsp;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>&lt;V&gt;&nbsp;valueType)</pre>
<div class="block">A convenience that method that looks up a managed <a href="../../javax/cache/Cache.html" title="interface in javax.cache"><code>Cache</code></a> given its
name. using the default <code>CachingProvider</code> and <code>CacheManager
</code>. For the full range of <code>Cache</code> look up methods see
<a href="../../javax/cache/CacheManager.html" title="interface in javax.cache"><code>CacheManager</code></a>.
<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>CacheManager.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 CacheManager is
<a href="../../javax/cache/CacheManager.html#isClosed()"><code>CacheManager.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><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>CacheManager.getCache(String, Class, Class)</code></a>,
<a href="../../javax/cache/CacheManager.html#getCache(java.lang.String)"><code>CacheManager.getCache(String)</code></a></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/Caching.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/CacheManager.html" title="interface in javax.cache"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../index.html?javax/cache/Caching.html" target="_top">Frames</a></li>
<li><a href="Caching.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><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&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; 2014. All Rights Reserved.</small></p>
</body>
</html>